API Reference
Reference for the WOX AI OpenAI-compatible API
Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Query Parameters
Google API Key (for the Gemini format)
Header Parameters
Anthropic API Key (for the Claude format)
Anthropic API version
Google API Key (for the Gemini format)
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/models" \ -H "x-api-key: " \ -H "anthropic-version: " \ -H "x-goog-api-key: "{ "object": "string", "data": [ { "id": "string", "object": "string", "created": 0, "owned_by": "string" } ]}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Response Body
application/json
curl -X GET "https://example.com/v1beta/models"{ "models": [ { "name": "string", "version": "string", "displayName": "string", "description": "string", "inputTokenLimit": 0, "outputTokenLimit": 0, "supportedGenerationMethods": [ "string" ] } ]}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "messages": [ { "role": "system", "content": "string" } ] }'{ "id": "string", "object": "string", "created": 0, "model": "string", "choices": [ { "index": 0, "message": { "role": "system", "content": "string", "name": "string", "tool_calls": [ { "id": "string", "type": "string", "function": { "name": "string", "arguments": "string" } } ], "tool_call_id": "string", "reasoning_content": "string" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "prompt_tokens_details": { "cached_tokens": 0, "text_tokens": 0, "audio_tokens": 0, "image_tokens": 0 }, "completion_tokens_details": { "text_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0 } }, "system_fingerprint": "string"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/responses" \ -H "Content-Type: application/json" \ -d '{ "model": "string" }'{ "id": "string", "object": "string", "created_at": 0, "status": "completed", "model": "string", "output": [ { "type": "string", "id": "string", "status": "string", "role": "string", "content": [ { "type": "string", "text": "string" } ] } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "prompt_tokens_details": { "cached_tokens": 0, "text_tokens": 0, "audio_tokens": 0, "image_tokens": 0 }, "completion_tokens_details": { "text_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0 } }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/responses/compact" \ -H "Content-Type: application/json" \ -d '{ "model": "string" }'{ "id": "string", "object": "string", "created_at": 0, "output": [ {} ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "prompt_tokens_details": { "cached_tokens": 0, "text_tokens": 0, "audio_tokens": 0, "image_tokens": 0 }, "completion_tokens_details": { "text_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0 } }, "error": {}}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/images/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen-image-plus", "input": { "messages": [ { "role": "user", "content": [ { "text": "An elegant and stately pair of calligraphy scrolls hangs in a hall. The room has a quiet, classical Chinese interior, with blue-and-white porcelain on the table. The left scroll reads \\"Righteousness is innate; humans and machines share the Way and think wisely of the new,\\" the right scroll reads \\"Cloud-connected intelligence awakens the universe; numbers carry lofty aspirations,\\" and the horizontal plaque reads \\"Wisdom Awakens through Shared Understanding.\\" The calligraphy is graceful, and a Chinese-style painting of Yueyang Tower hangs in the center." } ] } ] }, "parameters": { "negative_prompt": "", "prompt_extend": true, "watermark": false, "size": "1328*1328" } }'{ "created": 0, "data": [ { "url": "string", "b64_json": "string", "revised_prompt": "string" } ]}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/images/edits" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen-image-edit-plus", "input": { "messages": [ { "role": "user", "content": [ { "image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/fpakfo/image36.webp" }, { "text": "Generate an image that follows the depth map and this description: a weathered red bicycle is parked on a muddy path, with a dense primeval forest in the background" } ] } ] }, "parameters": { "n": 2, "negative_prompt": " ", "prompt_extend": true, "watermark": false } }'{ "created": 0, "data": [ { "url": "string", "b64_json": "string", "revised_prompt": "string" } ]}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/videos"{ "id": "sora-2-123456", "object": "video", "model": "sora-2", "status": "queued", "progress": 0, "created_at": 1764347090922, "seconds": "8"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Video task ID
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/videos/sora-2-123456"{ "id": "sora-2-123456", "object": "video", "model": "sora-2", "status": "queued", "progress": 0, "created_at": 1764347090922, "seconds": "8"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Video task ID
Response Body
video/mp4
application/json
curl -X GET "https://example.com/v1/videos/video-abc123/content""string"Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Video generation request
Response Body
application/json
application/json
curl -X POST "https://example.com/kling/v1/videos/text2video" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-v1", "prompt": "The astronaut stands up and walks away", "duration": 5, "width": 1280, "height": 720, "fps": 30 }'{ "task_id": "string", "status": "string"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Task ID
Response Body
application/json
application/json
curl -X GET "https://example.com/kling/v1/videos/text2video/task-abc123"{ "task_id": "string", "status": "queued", "url": "string", "format": "string", "metadata": { "duration": 0, "fps": 0, "width": 0, "height": 0, "seed": 0 }, "error": { "code": 0, "message": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Video generation request
Response Body
application/json
application/json
curl -X POST "https://example.com/kling/v1/videos/image2video" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-v1", "prompt": "The person turns around and walks away", "image": "https://example.com/image.jpg", "duration": 5, "width": 1280, "height": 720 }'{ "task_id": "string", "status": "string"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Task ID
Response Body
application/json
application/json
curl -X GET "https://example.com/kling/v1/videos/image2video/task-abc123"{ "task_id": "string", "status": "queued", "url": "string", "format": "string", "metadata": { "duration": 0, "fps": 0, "width": 0, "height": 0, "seed": 0 }, "error": { "code": 0, "message": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Query Parameters
API operation type
Value in
- "CVSync2AsyncSubmitTask"
- "CVSync2AsyncGetResult"
API version
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Official Jimeng API request format
Response Body
application/json
application/json
curl -X POST "https://example.com/jimeng/?Action=CVSync2AsyncSubmitTask&Version=2022-08-31" \ -H "Content-Type: application/json" \ -d '{ "req_key": "jimeng_video_generation", "prompt": "A cat playing the piano" }'{ "code": 0, "message": "string", "data": {}}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Video generation request
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/video/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-v1", "prompt": "An astronaut walking on the Moon", "duration": 5, "width": 1280, "height": 720 }'{ "task_id": "string", "status": "string"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Task ID
Response Body
application/json
application/json
curl -X GET "https://example.com/v1/video/generations/abcd1234efgh"{ "task_id": "string", "status": "queued", "url": "string", "format": "string", "metadata": { "duration": 0, "fps": 0, "width": 0, "height": 0, "seed": 0 }, "error": { "code": 0, "message": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Header Parameters
Anthropic API version
Anthropic API Key (optional; a Bearer Token can also be used)
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/messages" \ -H "anthropic-version: " \ -H "x-api-key: " \ -H "Content-Type: application/json" \ -d '{ "model": "string", "messages": [ { "role": "user", "content": "string" } ], "max_tokens": 1 }'{ "id": "string", "type": "string", "role": "string", "content": [ { "type": "string", "text": "string" } ], "model": "string", "stop_reason": "end_turn", "usage": { "input_tokens": 0, "output_tokens": 0, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0 }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Model name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1beta/models/gemini-3-pro-image-preview:generateContent" \ -H "Content-Type: application/json" \ -d '{ "contents": [ { "role": "user", "parts": [ { "text": "draw a cat" } ] } ], "generationConfig": { "responseModalities": [ "TEXT", "IMAGE" ], "imageConfig": { "aspectRatio": "16:9", "imageSize": "4K" } } }'{ "candidates": [ { "content": { "role": "string", "parts": [ {} ] }, "finishReason": "string", "safetyRatings": [ {} ] } ], "usageMetadata": { "promptTokenCount": 0, "candidatesTokenCount": 0, "totalTokenCount": 0 }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Model or engine ID
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/engines//embeddings" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "input": "string" }'{ "object": "string", "data": [ { "object": "string", "index": 0, "embedding": [ 0 ] } ], "model": "string", "usage": { "prompt_tokens": 0, "total_tokens": 0 }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/embeddings" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "input": "string" }'{ "object": "string", "data": [ { "object": "string", "index": 0, "embedding": [ 0 ] } ], "model": "string", "usage": { "prompt_tokens": 0, "total_tokens": 0 }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "prompt": "string" }'{ "id": "string", "object": "string", "created": 0, "model": "string", "choices": [ { "text": "string", "index": 0, "finish_reason": "string" } ], "usage": { "prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0, "prompt_tokens_details": { "cached_tokens": 0, "text_tokens": 0, "audio_tokens": 0, "image_tokens": 0 }, "completion_tokens_details": { "text_tokens": 0, "audio_tokens": 0, "reasoning_tokens": 0 } }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/audio/transcriptions" \ -F file="string" \ -F model="string"{ "text": "string"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/audio/translations" \ -F file="string" \ -F model="string"{ "text": "string"}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
audio/mpeg
curl -X POST "https://example.com/v1/audio/speech" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "input": "string", "voice": "alloy" }'"string"Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/rerank" \ -H "Content-Type: application/json" \ -d '{ "model": "string", "query": "string", "documents": [ "string" ] }'{ "id": "string", "results": [ { "index": 0, "relevance_score": 0, "document": {} } ], "meta": {}}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/moderations" \ -H "Content-Type: application/json" \ -d '{ "input": "string" }'{ "id": "string", "model": "string", "results": [ { "flagged": true, "categories": {}, "category_scores": {} } ]}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Query Parameters
Model to use
Response Body
application/json
curl -X GET "https://example.com/v1/realtime"Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Response Body
application/json
curl -X GET "https://example.com/v1/fine-tunes"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/fine-tunes" \ -H "Content-Type: application/json" \ -d '{}'{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/v1/fine-tunes/"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Response Body
application/json
curl -X POST "https://example.com/v1/fine-tunes//cancel"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/v1/fine-tunes//events"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Response Body
application/json
curl -X GET "https://example.com/v1/files"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Request Body
multipart/form-data
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/v1/files"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/v1/files/"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Response Body
application/json
curl -X DELETE "https://example.com/v1/files/"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}Authorization
BearerAuth Authenticate with a bearer token.
Format: Authorization: Bearer sk-xxxxxx
In: header
Path Parameters
Response Body
application/json
curl -X GET "https://example.com/v1/files//content"{ "error": { "message": "string", "type": "string", "param": "string", "code": "string" }}