Skip to content

API Endpoints

AI Foundation Services provides an OpenAI-compatible REST API. All endpoints use the base URL:

https://llm-server.llmhub.t-systems.net/v2

For the complete OpenAPI specification, see the interactive API docs (Redoc).

MethodEndpointDescription
GET/modelsList all available models
GET/models/{model_id}Get model details and metadata
POST/chat/completionsCreate a chat completion
POST/completionsCreate a text completion
POST/embeddingsCreate embeddings
POST/audio/transcriptionsTranscribe audio to text
POST/audio/translationsTranslate audio to English
GET/audio/modelsList available audio models
POST/images/generationsGenerate images from text
POST/responsesCreate a response (Responses API)
POST/filesUpload a file
GET/filesList uploaded files
DELETE/files/{id}Delete a file

All major endpoints have /queue variants. They work like /v2, but when you are over your rate limit they wait until it frees up instead of returning 429 right away. They are not asynchronous. See the Queued Requests guide.

MethodEndpointDescription
POST/queue/chat/completionsChat completion (queued)
POST/queue/completionsText completion (queued)
POST/queue/embeddingsEmbeddings (queued)
POST/queue/audio/transcriptionsAudio transcription (queued)
POST/queue/audio/translationsAudio translation (queued)
POST/queue/images/generationsImage generation (queued)
POST/queue/images/editsImage editing (queued)
GET/queue/modelsList models (queue)

The API uses versioned paths:

Path PrefixPurposeExamples
/v2Default — LLM inference, embeddings, audio, images/v2/chat/completions, /v2/embeddings
/v1Visual RAG, vector stores, file management/v1/vector_stores, /v1/files
/queueSame as /v2, but waits up to two minutes when over the rate limit/queue/chat/completions
  • Use /v2 for all standard LLM API calls (this is the default when using OpenAI SDKs with our base URL)
  • Use /v1 for Visual RAG and file management operations
  • Use /queue for batch jobs that sometimes go over the rate limit

All requests require an API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

See Authentication for setup details.

All POST requests use JSON:

Terminal window
curl -X POST "https://llm-server.llmhub.t-systems.net/v2/chat/completions" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-oss-120b", "messages": [{"role": "user", "content": "Hello"}]}'

Responses follow the OpenAI response format. For chat completions:

{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1710000000,
"model": "gpt-oss-120b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 9,
"total_tokens": 19
}
}