LLMoxy supports multiple request formats. Existing applications usually only need to replace the Base URL and API Key to migrate.
OpenAI Compatible
OpenAI SDK configuration:
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.LLMOXY_API_KEY,
baseURL: "https://llmoxy.com/v1",
});
Main routes:
| Route | Purpose |
|---|---|
POST /v1/chat/completions | Chat Completions. |
POST /v1/completions | Legacy text completions. |
POST /v1/responses | Responses API. |
POST /v1/embeddings | Embeddings. |
POST /v1/images/generations | Image generation. |
POST /v1/audio/transcriptions | Audio transcription. |
POST /v1/audio/translations | Audio translation. |
POST /v1/audio/speech | Text-to-speech. |
GET /v1/realtime | Realtime WebSocket. |
Anthropic Messages
curl https://llmoxy.com/v1/messages \
-H "x-api-key: <LLMOXY_API_KEY>" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-3-5-sonnet-latest",
"max_tokens": 256,
"messages": [
{ "role": "user", "content": "Hello" }
]
}'
Anthropic routes accept system, max_tokens, temperature, top_p, top_k, stop_sequences, tools, tool_choice, thinking, metadata.user_id, and other fields.
Gemini
curl "https://llmoxy.com/v1beta/models/gpt-5.4:generateContent" \
-H "x-goog-api-key: <LLMOXY_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"role": "user",
"parts": [{ "text": "Explain LLMoxy in one sentence." }]
}
]
}'
Gemini-style model lists can use GET /v1beta/models.
Not Yet Implemented Routes
Currently Relay returns not implemented for the following OpenAI-compatible routes:
POST /v1/images/variations/v1/files/v1/fine-tunesDELETE /v1/models/{model}
