Back to API Reference
Gateway API
POST
/gateway/chatSend a chat completion request through the gateway
Request Body
{
"model": "gpt-4",
"messages": [
{ "role": "system", "content": "You are helpful." },
{ "role": "user", "content": "Hello!" }
],
"temperature": 0.7,
"max_tokens": 1000,
"fallbackModels": ["claude-3-opus"],
"security": { "scanInput": true }
}Response
{
"id": "chat_abc123",
"model": "gpt-4",
"choices": [{
"message": { "role": "assistant", "content": "Hello!" },
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 10, "completion_tokens": 5 }
}POST
/gateway/embeddingsGenerate embeddings for text
{
"model": "text-embedding-3-small",
"input": ["Hello world", "How are you?"]
}GET
/gateway/modelsList available models