Getting started, authentication, endpoints, and error codes
# Bash: replace YOUR_MODEL_ID with an eligible text model from the catalog.
read -r -s -p 'API key: ' ROBOVAI_API_KEY; printf '\n'
curl --fail-with-body 'https://api.robovai.com/v1/chat/completions' \
-H "Authorization: Bearer ${ROBOVAI_API_KEY}" \
-H 'Content-Type: application/json' \
--data '{"model":"YOUR_MODEL_ID","messages":[{"role":"user","content":"Reply with OK"}],"max_tokens":32}'
unset ROBOVAI_API_KEY401: check the key and endpoint; 402: check balance/quota; 429: reduce concurrency and respect retry hints; 503: check upstream status or contact support.
RoboVAI is compatible with OpenAI and Anthropic official clients — just swap the base_url and api_key.
https://api.robovai.comThe endpoint below is returned by the current gateway; put it into your client’s base_url / API endpoint field.
OpenAI-compatible clients use https://api.robovai.com/v1; Anthropic-compatible clients (e.g. Claude Code) use https://api.robovai.com.
Create a key in “Dashboard → API Keys”, then put it into your client’s api_key field.
Every request carries the API key via an HTTP header:
Authorization: Bearer <api_key>Key format: subscription keys start with sub_, pay-as-you-go keys start with api_.
Never hardcode keys in frontend code or public repos; reset immediately in the dashboard if leaked.
https://api.robovai.comCompatible with the Anthropic Messages API — for Claude Code, official Claude SDKs, etc. Full path: https://api.robovai.com
https://api.robovai.com/v1Compatible with the OpenAI Chat/Completions API — for ChatBox, OpenCat, etc. Full path: https://api.robovai.com/v1
Endpoints grouped by input/output modality. Text chat is sync/stream; image generation returns a URL synchronously; video generation is async (submit then poll). All request bodies are forwarded to the upstream provider — only model is required; other fields follow the corresponding model spec.
Async endpoint: submit to get a task_id, then poll for the result.
Sync or streaming text chat, compatible with both OpenAI and Anthropic protocols.
https://api.robovai.com/v1/chat/completionsOpenAI-compatible, supports streaming. Full path: https://api.robovai.com/v1/chat/completions
https://api.robovai.com/v1/messagesAnthropic-compatible, for Claude Code etc. Full path: https://api.robovai.com/v1/messages
| Status | Meaning | Suggestion |
|---|---|---|
| 400 Bad Request | Invalid request parameters | Check the body, model name, and parameter format. |
| 401 Unauthorized | Missing or invalid key | Ensure the Authorization header carries a valid API key. |
| 402 Payment Required | Insufficient balance or quota exhausted | Top up in the dashboard or switch keys. |
| 403 Forbidden | No access to this model | Confirm your key’s plan includes the target model. |
| 404 Not Found | Model or endpoint not found | Verify the model ID and endpoint path. |
| 429 Too Many Requests | Rate limited | Reduce request frequency or retry later. |
https://api.robovai.com/v1/responsesOpenAI Responses API (incl. WebSocket). Full path: https://api.robovai.com/v1/responses
https://api.robovai.com/v1/embeddingsText vectorization. Full path: https://api.robovai.com/v1/embeddings
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID. |
| messages | array | Yes | Conversation message array, with role and content. |
| stream | boolean | No | Stream the response, default false. |
| temperature | number | No | Sampling temperature, 0–2, default 1. |
| max_tokens | integer | No | Maximum tokens to generate. |
| tools |
{
"model": "<model_id>",
"messages": [
{ "role": "user", "content": "Hello" }
],
"stream": false
}{
"id": "chatcmpl-...",
"object": "chat.completion",
"choices": [
{ "index": 0, "message": { "role": "assistant", "content": "Hi!" }, "finish_reason": "stop" }
],
"usage": { "prompt_tokens": 4, "completion_tokens": 3 }
}Returns the generated image URL synchronously (OpenAI gpt-image via /v1; Volcengine Doubao Seedream etc. via /v1/multimodal; Midjourney via /v1/mj).
https://api.robovai.com/v1/images/generationsOpenAI gpt-image and similar models. Full path: https://api.robovai.com/v1/images/generations
https://api.robovai.com/v1/images/editsImage editing from a reference image. Full path: https://api.robovai.com/v1/images/edits
https://api.robovai.com/v1/multimodal/images/generationsVolcengine Doubao Seedream and similar multimodal models. Full path: https://api.robovai.com/v1/multimodal/images/generations
Async interface: submit a task to get a task_id, then poll until it succeeds and returns result_url.
https://api.robovai.com/v1/multimodal/videos/generationsSubmit a video generation, returns task_id. Full path: https://api.robovai.com/v1/multimodal/videos/generations
https://api.robovai.com/v1/multimodal/videos/tasks/:task_idQuery task status; returns result_url on success. Full path: https://api.robovai.com/v1/multimodal/videos/tasks/:task_id
https://api.robovai.com/v1/multimodal/videos/tasks/:task_id/contentContent proxy for succeeded tasks; returns the video file directly (succeeded tasks only). Full path: https://api.robovai.com/v1/multimodal/videos/tasks/:task_id/content
Flow: POST submit → get task_id → poll GET at intervals → read result_url when status is succeeded.
{
"task_id": "task_abc123",
"status": "succeeded",
"result_url": "https://.../video.mp4",
"expires_at": "2026-08-09T00:00:00Z"
}OpenAI-compatible audio endpoints: text-to-speech, transcription, translation.
https://api.robovai.com/v1/audio/speechTTS; takes text, returns audio. Full path: https://api.robovai.com/v1/audio/speech
https://api.robovai.com/v1/audio/transcriptionsAudio to text. Full path: https://api.robovai.com/v1/audio/transcriptions
https://api.robovai.com/v1/audio/translationsTranslate audio into text in the target language. Full path: https://api.robovai.com/v1/audio/translations
| Field |
|---|
| 500 Internal Server Error |
| Server error |
| Retry later; contact support if it persists. |
| 503 Service Unavailable | Service temporarily unavailable | Retry for transient errors; do not blindly retry non-idempotent endpoints. |
| array |
| No |
| List of callable tools/functions. |
https://api.robovai.com/v1/mj/submit/:actionimagine/blend/action/describe etc.; query via GET /v1/mj/task/:task_id. Full path: https://api.robovai.com/v1/mj/submit/:action
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID (e.g. gpt-image, Seedream series). |
| prompt | string | Yes | Image description prompt. |
| n | integer | No | Number of images, default 1. |
| size | string | No | Image size, e.g. 1024x1024. |
| quality | string | No | Quality (OpenAI): standard/hd. |
| response_format |
{
"model": "<model_id>",
"prompt": "a cat on the moon",
"size": "1024x1024",
"n": 1
}{
"created": 1700000000,
"data": [
{ "url": "https://.../image.png" }
]
}| Field | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID (e.g. Seedance series). |
| prompt | string | Yes | Video description prompt. |
| duration | number | No | Video length in seconds, e.g. 5. |
| resolution | string | No | Resolution, e.g. 720p, 1080p. |
| ratio | string | No | Aspect ratio, e.g. 16:9, 9:16. |
| fps |
{
"model": "<model_id>",
"prompt": "sunset over the waves"
}{
"task_id": "task_abc123",
"status": "pending",
"upstream_id": "upstream_xyz"
}| Type |
|---|
| Required |
|---|
| Description |
|---|
| model | string | Yes | Model ID (e.g. tts-1). |
| input | string | Yes | Text to synthesize. |
| voice | string | Yes | Voice, e.g. alloy, echo, nova. |
| response_format | string | No | Audio format: mp3/opus/aac/flac, default mp3. |
| speed | number | No | Speed, 0.25–4, default 1. |
{
"model": "tts-1",
"input": "Hello",
"voice": "alloy"
}(binary audio stream, Content-Type: audio/mpeg)| string |
| No |
| Return format: url or b64_json, default url. |
| style | string | No | Style (OpenAI): vivid/natural. |
| number |
| No |
| Frame rate, e.g. 24, 30. |