API integration
documentation
Endpoints, supported model features, request examples and billing responses.
Quickstart
Supported API models
claude-sonnet-5-5claude-opus-5-5claude-haiku-5-5claude-opus-5claude-fable-5claude-sonnet-5claude-fable-5-1claude-sonnet-4-6claude-opus-4-8claude-opus-4-6claude-opus-4-7claude-opus-5[1m]claude-sonnet-5-5[1m]claude-sonnet-5[1m]glm-5.2glm-5.3-flashglm-5.3kimi-k3deepseek-v4-prodeepseek-v4.1-flashdeepseek-v4-flashqwen3.8-flashqwen3.7-plusqwen3.8-maxclaude-opus-4-8[1m]Feature labels apply to the named model and API format. Select a model for the complete capability table.
Full directory and prices- Create an account and project key. Keep separate keys for separate applications.
- Select a supported model and API format. Copy the exact model ID, including version suffixes.
- Send a request using the example below. Review the request ID, usage and settled charge in the console.
Text input is limited to 32 KiB of UTF-8 text, with up to 64 messages and 8,192 output tokens. Image input, where marked, accepts up to two inline PNG/JPEG/WebP files of 2 MiB each.
Streaming-labelled interfaces use standard SSE. Consume the terminal event before treating the operation as complete. Multi-turn, tools, JSON and image support are specific to each model and protocol.
Protocols and clients
| API format | SDK base URL | HTTP endpoint |
|---|---|---|
| Anthropic Messages | https://vimuroute.com | POST /v1/messages |
| OpenAI Chat Completions | https://vimuroute.com/v1 | POST /v1/chat/completions |
Use x-api-key with Anthropic Messages, or Authorization: Bearer with OpenAI-compatible endpoints. Only combinations marked as supported for the chosen model can be used.
| Client | Compatibility |
|---|---|
| Claude Code | Client compatibility has not passed acceptance. Model API support is listed separately. |
| Codex CLI | Client compatibility has not passed acceptance. Model API support is listed separately. |
A successful HTTP API test does not establish CLI compatibility. These client results do not change ordinary model API availability.
Request examples
Select a model, supported API format and programming language.
VM API and feature support
✓ Verified through VimuRoute; — currently not supported. QC directory information is listed separately below.
https://vimuroute.comPOST https://vimuroute.com/v1/messages
Use a VM project key. The address above is the VimuRoute endpoint; no upstream key is required.
SDK examples disable automatic retries. Idempotency-Key accepts a UUID; reuse it only for the same operation. A 202 result requires reconciliation rather than a new request.
python -m pip install anthropicfrom uuid import uuid4
from anthropic import Anthropic
client = Anthropic(
base_url="https://vimuroute.com",
api_key="YOUR_VM_API_KEY",
max_retries=0
)
request_id = str(uuid4())
response = client.messages.create(
model="claude-haiku-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}],
extra_headers={"Idempotency-Key": request_id}
)
print(response.content[0].text)Run the example on your server or trusted client. Keep project keys out of public browser code.
Feature parameters
Use the following parameters only when the selected model and protocol show the corresponding feature as supported. Client function tools do not include hosted search, code execution or other server-side paid tools.
| Feature | Anthropic Messages | OpenAI Chat | OpenAI Responses |
|---|---|---|---|
| Strict JSON | output_config.format | response_format | text.format |
| Function tools | tools / tool_use / tool_result | tools / tool_calls / role: tool | tools / function_call / function_call_output |
| Streaming | stream: true · SSE | ||
| Image input | image.source | image_url | input_image |
Responses requests use store=false and do not accept remote conversation state or background jobs. Image-generation APIs return base64 output and do not support streaming.
Response handling
| HTTP | Handling |
|---|---|
| 200 | Completed response. Reconcile the request ID and settled charge in the console. |
| 202 | The result or charge requires reconciliation. Keep the request ID and idempotency key; do not start a replacement request. |
| 400 / 404 | Check the exact model, supported feature parameters and endpoint. |
| 401 / 403 | Check the project key status and account access. Never send a complete key to support. |
| 402 | Check available balance, pending reservations and the key spending limit. |
| 429 / 5xx / timeout | Retain the original idempotency key and check request status before retrying. |
Idempotent replays return status information rather than replaying generated text or images.
Technical support
Include the model ID, protocol, client/version, request ID, time with timezone and a redacted error message. Do not include complete keys or private input.