Documentation

API Documentation & Multi-Language SDK Guide

Zero client setup required — pick your provider, copy a model ID, and call http://localhost:3000/v1 from any programming language.

Interactive Request Builder

BASE_URL: http://localhost:3000/v1

Select your provider, model, API key, and streaming mode below — all 16 language examples and the “Copy for LLM” prompt update automatically.

stream: true
Click any model below to select & copy its Model ID:0 active models

Every Language Integration

python
$pip install openai --break-system-packages
from openai import OpenAI

client = OpenAI(
    base_url="http://localhost:3000/v1",
    api_key="gw_live_sample_key_12345",
)

response = client.chat.completions.create(
    model="gemma4:31b-cloud",
    messages=[
        {"role": "system", "content": "You are a helpful AI assistant."},
        {"role": "user", "content": "Hello! Explain how you work briefly."},
    ],
    stream=True,
)

for chunk in response:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="", flush=True)
print()

OpenAI-Compatible Endpoints

Standard endpoints exposed by your gateway router.

POST /v1/chat/completionsSSE Stream & JSON

Routes requests to Gemini Web2API or Ollama Cloud based on the model parameter. Supports stream: true | false.

GET /v1/modelsModel Discovery

Returns all enabled models in OpenAI { object: "list", data: [...] } format.

Standardized OpenAI Error Format

All authentication, routing, and provider errors return a clean JSON structure.

{
  "error": {
    "message": "Invalid API key provided",
    "type": "authentication_error",
    "code": "invalid_api_key"
  }
}