HooshyarDocs

Gateway API

The gateway speaks the OpenAI API and the Anthropic Messages API. This page lists every surface that a client can call.

Base address

https://gateway.example.com

Authentication

Send your client key in the Authorization: Bearer header. The Anthropic surface also accepts the x-api-key header.

Routes

Most surfaces use a route. The page `Connect a client` tells how to select one.

A surface that is off

An administrator can turn off a surface. A surface that is off answers 404 with the code surface_disabled.

Surfaces

chat

Send a chat completion in the OpenAI format. The gateway selects the route and the model.

MethodPath
POST/v1/chat/completions

messages

Send a message in the Anthropic Messages format. Claude Code uses this surface.

MethodPath
POST/v1/messages
POST/v1/messages/count_tokens

embeddings

Create embeddings. Name a concrete embedding model; the gateway does not route this surface.

MethodPath
POST/v1/embeddings

moderations

Check text with a moderation model. Name a concrete moderation model.

MethodPath
POST/v1/moderations

models

List the routes your key can use, plus auto. Each route is shown as a model name.

MethodPath
GET/v1/models

guard

Check text against the configured guardrails without a model call.

MethodPath
POST/v1/guard

classify

Ask which route a prompt goes to, and why, without a model call.

MethodPath
POST/v1/classify

responses

Use the OpenAI Responses API: create, read, cancel and delete a response.

MethodPath
POST/v1/responses
GET/v1/responses/{id}
DELETE/v1/responses/{id}
POST/v1/responses/{id}/cancel
GET/v1/responses/{id}/input_items

images

Generate, edit and vary images. Edits and variations are multipart: name a concrete model.

MethodPath
POST/v1/images/generations
POST/v1/images/edits
POST/v1/images/variations

audio

Make speech from text, or a transcript or translation from audio. Transcription is multipart.

MethodPath
POST/v1/audio/speech
POST/v1/audio/transcriptions
POST/v1/audio/translations

rerank

Sort a list of documents by relevance to a query.

MethodPath
POST/v1/rerank

files

Upload, list, read and delete files. Only the key that uploaded a file can use it.

MethodPath
POST/v1/files
GET/v1/files
GET/v1/files/{id}
GET/v1/files/{id}/content
DELETE/v1/files/{id}

batches

Submit, list, read and cancel batches. Use the same key that uploaded the input file.

MethodPath
POST/v1/batches
GET/v1/batches
GET/v1/batches/{id}
POST/v1/batches/{id}/cancel

mcp

Mount the company tools as an MCP server (revision 2026-07-28). Use your client key.

MethodPath
any/mcp
any/mcp/{mount}
GET/.well-known/oauth-protected-resource
GET/.well-known/oauth-protected-resource/mcp
GET/.well-known/oauth-protected-resource/mcp/{mount}
GET/oauth/callback

connect

Call a declared REST tool in its own HTTP shape. The gateway adds the credential.

MethodPath
any/connect/{server}
any/connect/{server}/{path}