GizStack
View .mdOpen in ChatGPTOpen in Claude

Use the AI Gateway

The AI Gateway serves language, image, video, audio and speech models of many providers through one API and one key. A request names a model; the gateway chooses a route of a provider that serves it, and the call is paid from the team's plan or credits at the price GET /v1/models lists.

  • The base address is https://gizstack.com/v1. Send the key as Authorization: Bearer KEY. Make a key on the terminal token page.
  • The API follows the OpenAI API, so an OpenAI client works with the base address and the key changed.
  • The machine-readable form of this page is /v1/openapi.json. The same operations are MCP tools at /v1/mcp.
sh
curl https://gizstack.com/v1/chat/completions \
  -H "Authorization: Bearer $GIZSTACK_KEY" -H "Content-Type: application/json" \
  -d '{"model": "MODEL", "messages": [{"role": "user", "content": "Hello"}]}'

Operations

The table and the sections below are made from the table that serves the API.

OperationRequestWhat it does
modelsGET /v1/modelsThe models of the catalog, with their kinds and prices.
chatPOST /v1/chat/completionsAsk a language model: a chat completion request (model, messages and its other fields); the answer is the completion object.
responsesPOST /v1/responsesAsk a language model, or an Agent of the team as agent:ID, in the form of the Responses API.
responseGET /v1/responses/{id}An Agent's turn that a response started.
messagesPOST /v1/messagesAsk a language model in the form of the Messages API.
generatePOST /v1/generationsStart a media generation (image, video, audio, speech or 3D): the model and its fields; wait (s) waits for it.
taskGET /v1/tasks/{id}A generation's task: its state and outputs.
imagesPOST /v1/images/generationsMake pictures of a prompt, in the form of the Images API.
speechPOST /v1/audio/speechSpeak a text, in the form of the Audio API.
transcriptionsPOST /v1/audio/transcriptionsWrite what a recording says (a multipart form with its file).
embeddingsPOST /v1/embeddingsTurn texts into vectors, in the form of the Embeddings API.
rerankPOST /v1/rerankOrder documents by how well each answers a query.
uploadPOST /v1/filesKeep an input file (a picture, a video or a sound) in the team's Drive: ?name=cat.png, the file as the body. The answer's address is what a generation's file field takes; it ends in an hour.
usageGET /v1/usageWhat the key stands at: plan, windows, what its team can spend and its rules.

GET /v1/models

The models of the catalog, with their kinds and prices. It is also the MCP tool models.

POST /v1/chat/completions

Ask a language model: a chat completion request (model, messages and its other fields); the answer is the completion object. With "stream": true the answer comes as server-sent events. It is also the MCP tool chat.

FieldTypeRequiredMeaning
modelstringyesThe model id, from models.
messagesarrayyesThe chat messages: role and content.

POST /v1/responses

Ask a language model, or an Agent of the team as agent:ID, in the form of the Responses API. With "stream": true the answer comes as server-sent events.

FieldTypeRequiredMeaning
modelstringyesThe model id, from models.
inputstringyesThe text, or the list of input items.

GET /v1/responses/{id}

An Agent's turn that a response started.

FieldTypeRequiredMeaning
idstringyesThe response id.

POST /v1/messages

Ask a language model in the form of the Messages API. With "stream": true the answer comes as server-sent events.

FieldTypeRequiredMeaning
modelstringyesThe model id, from models.
messagesarrayyesThe messages: role and content.
max_tokensintegeryesThe most tokens of the answer.

POST /v1/generations

Start a media generation (image, video, audio, speech or 3D): the model and its fields; wait (s) waits for it. It is also the MCP tool generate.

FieldTypeRequiredMeaning
modelstringyesThe media model id, from models.
waitintegernoSeconds to wait for the result.

GET /v1/tasks/{id}

A generation's task: its state and outputs. It is also the MCP tool task.

FieldTypeRequiredMeaning
idstringyesThe task id.

POST /v1/images/generations

Make pictures of a prompt, in the form of the Images API.

FieldTypeRequiredMeaning
modelstringyesThe image model id, from models.
promptstringyesWhat the picture shows.

POST /v1/audio/speech

Speak a text, in the form of the Audio API.

FieldTypeRequiredMeaning
modelstringyesThe speech model id, from models.
inputstringyesThe text to speak.

POST /v1/audio/transcriptions

Write what a recording says (a multipart form with its file).

FieldTypeRequiredMeaning
modelstringyesThe transcription model id, from models.

POST /v1/embeddings

Turn texts into vectors, in the form of the Embeddings API. It is also the MCP tool embeddings.

FieldTypeRequiredMeaning
modelstringyesThe embedding model id, from models.
inputstringyesA text, or an array of texts.

POST /v1/rerank

Order documents by how well each answers a query. It is also the MCP tool rerank.

FieldTypeRequiredMeaning
modelstringyesThe rerank model id, from models.
querystringyesThe question.
documentsarrayyesThe texts to order.
top_nintegernoHow many to return.

POST /v1/files

Keep an input file (a picture, a video or a sound) in the team's Drive: ?name=cat.png, the file as the body. The answer's address is what a generation's file field takes; it ends in an hour.

FieldTypeRequiredMeaning
namestringyesThe file's name, with its extension (in the query).

GET /v1/usage

What the key stands at: plan, windows, what its team can spend and its rules. It is also the MCP tool usage.