POST /v1/chat/completions. Set MIXROUTE_API_KEY before running the examples.
Quick example
- cURL
- Python
Chat Completions parameters
In a non-streaming Chat Completions response, read
choices[0].message.content for the final answer. The reasoning_content field, when returned, is separate from the final answer.
Image input
Sendtext and image_url blocks in the same user message. Replace the example URL with an accessible HTTPS URL, or use a Base64 data URL. This request returns text, not a generated image.
Anthropic-compatible text
For text requests using an Anthropic-compatible client,POST /v1/messages also returned text in MixRoute tests. This is not the primary endpoint listed in the Console. The example below demonstrates text only; do not assume Chat Completions parameters or capabilities carry over.
text blocks in content for the final answer. Give the model enough output tokens to finish thinking and return text.