Base URLs
The endpoints in this reference are served from the OpenAI-compatible base URL. See OpenAI compatibility for how they relate to the OpenAI API.
Authentication
Send your API key in theAuthorization header of every request:
Request header
Requests and responses
- Send request bodies as JSON with
Content-Type: application/json. A body sent without that header returns415. - Responses are JSON, except streamed chat completions, which use
text/event-stream. See Streaming. - Timestamps are Unix times in seconds.
- Errors return a JSON
errorobject. See Errors. - Responses include an
x-request-idheader that identifies the request. See Request IDs. - Responses can include
x-ratelimit-headers that report your organization’s remaining capacity. See Rate limits. - Responses to authenticated requests, including error responses, include a
reflection-data-retentionheader. See Data retention.
Data retention
Every response to an authenticated request, including an error response, has areflection-data-retention header that reports the data retention the request was served under:
A request whose retention can’t be determined is reported as
zero. More values may be added; read a value you don’t recognize as promising nothing about what is kept.