Chat
Create Chat Completion
Changed onCreate a chat completion with automatic session creation if enabled.
Supports both streaming and non-streaming responses based on the 'stream' parameter. Tool calling is supported but may work better with streaming enabled.
Billing is applied to both streaming and non-streaming requests:
- Balance is checked before the request starts
- 402 Payment Required is returned if insufficient credits
- Usage is finalized after completion with actual token counts
- Holds are voided on failures or disconnects
post/api/v1/chat/completions
Request
- The document declares no server URL.
- AuthAPI key in header Authorization
Request body
Response
Successful Response
unknown required
Changes
- info
request property
//list-of-types was widened by adding typesarrayto media typeapplication/json
- info
- info
the endpoint scheme security
BearerAuthwas removed from the API - info
the endpoint scheme security
OAuth2was removed from the API
- info