API Reference
Complete API reference documentation for Apertis AI
Welcome to the Apertis API Reference. This documentation covers all available API endpoints, SDKs, and integration guides.
Choosing an API format
The gateway accepts text generation requests in three formats: Chat Completions, Responses, and Messages. If you're not sure which to use, start with Chat Completions — it's the format the Python SDK's own quick start uses.
| Chat Completions | Responses | Messages | |
|---|---|---|---|
| Endpoint path | /v1/chat/completions |
/v1/responses |
/v1/messages |
| Compatible SDK | OpenAI SDK (chat.completions.create, base_url ends in /v1) or the Apertis SDK |
OpenAI SDK (responses.create, base_url ends in /v1) or the Apertis SDK |
Anthropic SDK (messages.create, base_url has no /v1) or the Apertis SDK |
| Best for | OpenAI-compatible chat API | Models that only support /v1/responses (e.g. gpt-5-pro, o1-pro, codex-mini); built-in tools; stateful multi-turn |
Claude models only, via Anthropic-type channels |
| Streaming | stream: true |
stream: true |
stream: true, with message_start / content_block_delta / message_stop SSE events |
| Tool calling | tools, tool_choice, parallel_tool_calls |
tools, tool_choice, max_tool_calls, parallel_tool_calls, plus built-in web_search, code_interpreter, file_search |
tools, tool_choice |
| Reasoning / thinking | reasoning_effort string; Claude thinking via extra_body; DeepSeek returns reasoning_content |
reasoning object (effort, summary) |
thinking object (type, budget_tokens) |
| Prompt caching | See Prompt Cache | See Prompt Cache | See Prompt Cache |
| Structured output | response_format with json_schema |
text.format |
response_format (OpenAI-compatible extended parameter) |
- Pick Chat Completions if you're already using an OpenAI-compatible client and the standard
messagesarray. - Pick Responses if your model only supports
/v1/responses, or you need built-in tools or stateful multi-turn viaprevious_response_id. - Pick Messages if you're calling Claude models directly and want the native Anthropic SDK and extended thinking.
Quick Links
Text Generation
- Chat Completions - OpenAI-compatible chat API
- Responses API - OpenAI Responses format
- Messages API - Anthropic Messages format
Multimodal
- Vision - Image understanding
- Image Generation - Create images with AI
- Audio - Speech-to-text and text-to-speech
- Video - Video generation (not currently available)
Utilities
- Billing Credits - Check remaining credits and subscription quota
SDKs & Libraries
- Python SDK - Official Python client
- AI SDK Provider - Vercel AI SDK integration
- LangChain - LangChain integration
- LlamaIndex - LlamaIndex integration
- LiteLLM - LiteLLM proxy support
Base URL
All API requests should be made to:
https://api.apertis.ai/v1Authentication
Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYSee API Keys for details on obtaining and managing your API keys.