LLM API Reference
Overview
The CAIP LLM API provides unified access to multiple large language model (LLM) providers and embedding models. It enables you to interact with commercial and self-hosted LLMs for chat, embedding, image generation, video generation, audio, and responses use cases via a consistent REST interface.
- Base URL (RoW):
https://llm.api.caip.bmw.cloud - Base URL (China):
https://llm.api.caip.bmwchina.cloud
Authentication
All endpoints require an API key via the Authorization header.
RoW (new stack) — requires the standard OAuth2 Bearer token format:
Authorization: Bearer <your-api-key>
China (new stack) — uses the same OAuth2 Bearer token format as RoW:
Authorization: Bearer <your-api-key>
Only UUID-format API keys are accepted by the RoW endpoint. Old-format keys are deprecated. Request new keys via the Self-Service Portal.
Endpoints
Chat Completions
POST /v1/chat/completions
Initiate a chat with your preferred LLM model backend.
Request Body:
The model must be specified in the JSON body via the model parameter.
{
"model": "gpt-4o",
"messages": [
{ "role": "system", "content": "You are a mathematician" },
{ "role": "user", "content": "What is 1+1?" }
]
}
Response:
{
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "As a mathematician, I can confidently say that 1+1 = 2."
}
}
],
"object": "chat.completion",
"model": "gpt-4o-2024-08-06",
"usage": {
"completion_tokens": 42,
"prompt_tokens": 12,
"total_tokens": 54
}
}
Models Supported (RoW):
- AWS Bedrock:
claude-haiku-4.5,claude-sonnet-4.6,claude-opus-4.5,claude-opus-4.6,nova-lite,nova-micro,nova-pro,deepseek-r1,deepseek-v3,deepseek-v3.1,qwen-plus,qwen-flash,qwen3-30b-a3b-instruct-2507 - Azure OpenAI:
gpt-4o,gpt-4o-mini,gpt-41,gpt-41-mini,gpt-41-nano,gpt-5,gpt-5-mini,gpt-5-nano,gpt-5-2,gpt-5.5,o3
Realtime
GET wss://llm.api.caip.bmwchina.cloud/v1/realtime?model={model}
OpenAI Realtime-compatible WebSocket endpoint for bidirectional text and audio conversations in China. Authenticate the handshake with Authorization: Bearer {CAIP_API_KEY}.
Models Supported (China): qwen3.5-omni-plus-realtime, qwen3.5-omni-flash-realtime
Send OpenAI Realtime events such as session.update, conversation.item.create, and response.create. See the full realtime guide for a working example and audio requirements.
Responses
POST /v1/responses
OpenAI's advanced interface for generating model responses with stateful interactions. Supports text and image inputs.
Models Supported (RoW): gpt-5-codex, gpt-5-pro, o3-pro
Embeddings
POST /v1/embeddings
Generate vector embeddings from text input.
Request Body:
{
"model": "text-embedding-3-small",
"input": "Introduction to embedding models",
"dimensions": 1024,
"encoding_format": "float"
}
Response:
{
"data": [
{
"embedding": [ -0.033, -0.015, ... ],
"index": 0,
"object": "embedding"
}
],
"object": "list",
"model": "text-embedding-3-small",
"usage": {
"prompt_tokens": 6,
"total_tokens": 6
}
}
Models Supported (RoW):
- Azure:
text-embedding-3-small,text-embedding-3-large - AWS Bedrock:
titan-text-embeddings-v2
Image Generation
POST /v1/images/generations
Generate images from text prompts.
Models Supported (RoW): gpt-image-1, gpt-image-1-mini, gpt-image-1.5, gpt-image-2, titan-image-generator-v2
Video Generation
Video generation is asynchronous — submit a job, poll for completion, then download the result.
| Step | Method | Endpoint | Description |
|---|---|---|---|
| 1 | POST | /v1/videos | Create a video generation job |
| 2 | GET | /v1/videos/{video_id} | Poll until status is "completed" |
| 3 | GET | /v1/videos/{video_id}/content | Download the generated video file |
Models Supported (RoW): sora-2, wan-video
Audio Transcription
POST /v1/audio/transcriptions
Transcribe audio files to text.
Models Supported (RoW): gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper (deprecated)
Audio Speech (TTS)
POST /v1/audio/speech
Generate speech from text.
Models Supported (RoW): gpt-4o-mini-tts
Error Codes
400: Invalid input (e.g., missing model parameter, malformed request)401: Unauthorized (invalid API key, missing Bearer prefix, expired key)422: Validation exception429: Rate limit exceeded
External Documentation
Contact
For support, contact: ConnectedAI@bmw.de
License: Apache 2.0