Back to overview
model gateway

One OpenAI-compatible API for every model and provider.

Route chat, images, embeddings, audio, and video through app.nz. Point any OpenAI or Anthropic SDK at the base URL below, keep your code, and switch models with one field. Smart auto routing, automatic failover, usage metering, and one API key.

Base URL
https://app.nz/v1
Send messages, stream tokens back. OpenAI SDK drop-in — just change base_url + key.
from openai import OpenAI

client = OpenAI(base_url="https://app.nz/v1", api_key="pk_live_...")

resp = client.chat.completions.create(
    model="auto",  # smart routing, or pin a model like "gpt-4o"
    messages=[{"role": "user", "content": "Write a tiny SSE server in Go."}],
    reasoning_effort="auto",  # none | low | medium | high | auto
)
print(resp.choices[0].message.content)

Authentication

Send your key as Authorization: Bearer pk_live_.... Create one on the account page. Signed in here? Same-origin calls use your session automatically.

Smart auto routing

Send "model": "auto" and the gateway classifies the prompt and routes to the right tier — or pin an explicit model id.

autoDefault chat. Classifies the prompt and routes to the best tier.
openpaths/auto-codeAgents, refactors, and bug fixes.
openpaths/auto-reasoningPlanning, math, and hard reasoning (auto thinking depth).
openpaths/auto-cheapTrivial / classification prompts on the cheapest capable model.
openpaths/auto-visionPrompts that include images.
openpaths/auto-imageImage generation with a hosted fallback.

Endpoints

POST/v1/chat/completions

OpenAI-compatible chat completions (streaming + tools).

POST/v1/messages

Anthropic-compatible Messages API for Claude + agent SDKs.

POST/v1/images/generations

Generate images (GPT Image, Flux, and more).

POST/v1/embeddings

Vector embeddings for search and RAG.

POST/v1/audio/speech

Text-to-speech (also /v1/tts).

POST/v1/audio/transcriptions

Speech-to-text transcription.

POST/v1/videos/generations

Generate video clips (job-based).

POST/v1/music/generations

Generate music (job-based).

POST/v1/3d/generations

Generate textured 3D models (job-based).

GET/api/gateway/models

List every routable model + provider metadata.

GET/api/gateway/resolve?model=

Preview how a model name routes (provider, fallbacks).

POST/api/gateway/route

Preview which model a bare "auto" request resolves to.

Playground

Run real requests against any model right here — chat, image, embeddings, video, music, speech, transcription, and image→3D, each with a live preview and the raw JSON response. Signed in, it uses your session; otherwise paste an API key.

Send a message to try the gateway.

Models

Loading catalogue…

Providers