LLM GatewayInference (OpenAI Compatible)
Chat completions
OpenAI-compatible chat completions endpoint. Supports streaming via stream=true.
Authorization
BearerAuth AuthorizationBearer <token>
API key passed as Bearer token
In: header
Request Body
application/json
model*string
messages*array<>
temperature?number
max_tokens?integer
stream?boolean
Response Body
application/json
curl -X POST "https://example.com/rest/v1/llm-gateway/v1/chat/completions" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the capital of France?" } ], "temperature": 0.7, "max_tokens": 256 }'{ "id": "chatcmpl-abc123", "object": "chat.completion", "created": 1716825600, "model": "gpt-4o", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "The capital of France is Paris." }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 25, "completion_tokens": 8, "total_tokens": 33 }}