Grok API
  1. Guides
Grok API
  • Getting started
    • Introduction
    • Models and Pricing
    • Billing
    • Consumption and Rate Limits
    • Usage Explorer
    • Free Credits
  • Guides
    • Asynchronous Requests
    • Image Understanding
    • Structured Outputs
    • Migration from Other Providers
    • Chat
      POST
    • Reasoning
      POST
    • Streaming Response
      POST
    • Deferred Chat Completions
      POST
    • Image Generations
      POST
    • Fingerprint
      POST
  1. Guides

Fingerprint

POST
https://api.x.ai/v1/chat/completions
For each request to the xAI API, the response body will include a unique system_fingerprint value. This fingerprint serves as an identifier for the current state of the backend system's configuration.

Usage of fingerprint#

Monitoring System Changes: The system fingerprint acts as a version control for the backend configuration. If any part of the backend system—such as model parameters, server settings, or even the underlying infrastructure—changes, the fingerprint will also change. This allows developers to track when and how the system has evolved over time. This is crucial for debugging, performance optimization, and ensuring consistency in API responses.
Security and Integrity: The fingerprint can be used to ensure the integrity of the response. If a response's fingerprint matches the expected one based on a recent system configuration, it helps in verifying that the data hasn't been tampered with during transmission or that the service hasn't been compromised. The fingerprint will change over time and it is expected.
Compliance and Auditing: For regulated environments, this fingerprint can serve as part of an audit trail, showing when specific configurations were in use for compliance purposes.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.x.ai/v1/chat/completions' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
        "messages": [
          {
            "role": "system",
            "content": "You are Grok, a chatbot inspired by the Hitchhikers Guide to the Galaxy."
          },
          {
            "role": "user",
            "content": "What is the meaning of life, the universe, and everything?"
          }
        ],
        "model": "grok-3-latest",
        "stream": false,
        "temperature": 0
      }'
Response Response Example
{}

Request

Header Params
Content-Type
string 
required
Example:
application/json
Authorization
string 
required
Example:
Bearer {{XAI_API_KEY}}
Body Params application/json
messages
array [object {2}] 
required
role
string 
required
content
string 
required
model
string 
required
stream
boolean 
required
temperature
integer 
required
Examples

Responses

🟢200Success
application/json
Body
object {0}
Modified at 2025-04-10 09:06:25
Previous
Image Generations
Built with