API Endpoints
AI Foundation Services provides an OpenAI-compatible REST API. All endpoints use the base URL:
https://llm-server.llmhub.t-systems.net/v2For the complete OpenAPI specification, see the interactive API docs (Redoc).
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
GET | /models | List all available models |
GET | /models/{model_id} | Get model details and metadata |
POST | /chat/completions | Create a chat completion |
POST | /completions | Create a text completion |
POST | /embeddings | Create embeddings |
POST | /audio/transcriptions | Transcribe audio to text |
POST | /audio/translations | Translate audio to English |
GET | /audio/models | List available audio models |
POST | /images/generations | Generate images from text |
POST | /responses | Create a response (Responses API) |
POST | /files | Upload a file |
GET | /files | List uploaded files |
DELETE | /files/{id} | Delete a file |
Queue Endpoints
Section titled “Queue Endpoints”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.
| Method | Endpoint | Description |
|---|---|---|
POST | /queue/chat/completions | Chat completion (queued) |
POST | /queue/completions | Text completion (queued) |
POST | /queue/embeddings | Embeddings (queued) |
POST | /queue/audio/transcriptions | Audio transcription (queued) |
POST | /queue/audio/translations | Audio translation (queued) |
POST | /queue/images/generations | Image generation (queued) |
POST | /queue/images/edits | Image editing (queued) |
GET | /queue/models | List models (queue) |
API Versioning
Section titled “API Versioning”The API uses versioned paths:
| Path Prefix | Purpose | Examples |
|---|---|---|
/v2 | Default — LLM inference, embeddings, audio, images | /v2/chat/completions, /v2/embeddings |
/v1 | Visual RAG, vector stores, file management | /v1/vector_stores, /v1/files |
/queue | Same as /v2, but waits up to two minutes when over the rate limit | /queue/chat/completions |
- Use
/v2for all standard LLM API calls (this is the default when using OpenAI SDKs with our base URL) - Use
/v1for Visual RAG and file management operations - Use
/queuefor batch jobs that sometimes go over the rate limit
Authentication
Section titled “Authentication”All requests require an API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYSee Authentication for setup details.
Request Format
Section titled “Request Format”All POST requests use JSON:
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"}]}'Response Format
Section titled “Response Format”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 }}