Choose an endpoint
Every model ID advertised by the language-model
catalog can be selected through any of
these three endpoints. The endpoint controls the request and response format;
the model controls available modalities, context and output limits, and
format-specific features.
All three endpoints are stateless. Send the conversation history needed for
the current answer in each request.
Quickstart
stream is optional. Omit it, as below, to receive one complete JSON response.
- cURL
- Node.js
- Python
Direct JSON or streaming
- Omit
streamor set"stream": falsefor one complete JSON response. - Set
"stream": trueto receive server-sent events as output is generated.
Images, PDFs, and attachments
Use a public HTTPS URL when possible. Inline base64 data increases request size and can reach a model’s request limit much sooner.- Chat Completions
- Messages
- Responses
Attachment support also depends on the selected model. Use the language-model
catalog to choose a model with the
capabilities and context size your input needs.
Models, limits, and usage
CallGET /v1/llm/models.json for current
model IDs, capabilities, context limits, request-size limits, and pricing.
Successful responses include token usage. Requests that exceed the selected
model’s limit return 413 rather than silently truncating history or
attachments.