Request Headers
Request Headers
To interact with the Supervised AI testing API, you must include specific headers in your HTTP requests. These headers are used for authentication, content negotiation, and platform-level tracking.
Standard Headers
These headers follow standard HTTP/1.1 protocols and are required for most write operations.
| Header | Required | Description |
| :--- | :--- | :--- |
| Authorization | Yes | Bearer token used to authenticate the request. Format: Bearer <YOUR_TOKEN>. |
| Content-Type | Yes | Specifies the media type of the resource. Use application/json. |
| Accept | No | Specifies the media type the client is willing to receive. Defaults to application/json. |
Platform Tracking & Metadata Headers
The Supervised AI platform utilizes custom headers to track request lifecycle and provide metadata for internal analytics and debugging.
| Header | Required | Type | Description |
| :--- | :--- | :--- | :--- |
| X-Supervised-Client-ID | Yes | String | A unique identifier for the client application or environment making the call. |
| X-Request-ID | No | UUID | A client-generated unique identifier used for distributed tracing across the platform logs. |
| X-Session-ID | No | String | Used to group multiple requests into a single testing session or user flow. |
| X-Platform-Version | No | String | Specifies the version of the API structure being targeted (e.g., v1.2.0). |
Example Usage
The following example demonstrates a standard request configuration using curl:
curl -X POST https://api.supervised.ai/v1/test/execute \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "X-Supervised-Client-ID: staging-env-01" \
-H "X-Request-ID: 7e26715e-4903-4c13-b5c7-e6863116987d" \
-d '{
"test_id": "suite_alpha_09",
"params": {
"iterations": 5
}
}'
Response Headers for Debugging
When a request is processed, the API will return the following headers to assist in tracking:
X-Correlation-ID: Matches theX-Request-IDif provided, otherwise generated by the server. Reference this ID when contacting support.X-Latency-MS: The internal processing time in milliseconds for the AI model or testing suite.