Skip to content
GigadriveDocs

Models

How AI Gateway model identifiers work, how to list what you can call, and what a model record tells you before you call it.

The gateway carries a catalogue of close to two hundred chat models and a smaller set of video models, from owners including OpenAI, Google, Anthropic, Qwen, Mistral and DeepSeek. Every one of them is addressed the same way and returns the same response shape.

Model identifiers

An identifier is <owner>/<model>: openai/gpt-4o, anthropic/claude-haiku-4-5, google/gemini-2.5-flash. The owner is who made the model, not the route the request takes to reach it. Those are separate, and one model usually has several routes.

An identifier the gateway does not know is rejected with HTTP 400, param: model and code model_not_found, before any provider is contacted. When you put an id in a URL, encode the slash: GET /ai/v1/models/openai%2Fgpt-4o.

Listing what you can call

Discovery is filtered at runtime. A model appears only when at least one provider route for it is configured, so the list is what is actually routable for you rather than the whole catalogue.

import { GigadriveClient } from '@gigadrive/sdk';

const client = new GigadriveClient({
  clientId: process.env.GIGADRIVE_CLIENT_ID,
  clientSecret: process.env.GIGADRIVE_CLIENT_SECRET,
});

const { items } = await client.aiGateway.listModels();

for (const model of items.filter((entry) => entry.capabilities.tools)) {
  console.log(model.id, model.contextWindow, model.routingProviders.join(', '));
}

const gpt4o = await client.aiGateway.getModel('openai/gpt-4o');
console.log(gpt4o.maxOutputTokens, gpt4o.zdrProviders);

Both endpoints need the network:ai_gateway:models scope. The list returns { items, total }; asking for an unknown id returns HTTP 404 with { "error": "Model '<id>' not found" }.

What a model record tells you

FieldMeaning
idThe identifier you pass to model on an inference call
nameDisplay name
providerOwner family, such as openai or anthropic
capabilitieschat, streaming, tools, vision, json_mode, each a boolean
modalitiesInput and output modalities: text, image, audio, video, file
contextWindowInput plus output tokens the model accepts in one request
maxOutputTokensCeiling for the response
routingProvidersProvider routes that can serve this model
routingProviderDetailsEach route's id, display name and whether it supports zero data retention
zdrProvidersThe subset of routes with zero-data-retention handling

Choosing one

Filter on capabilities first. Sending tools to a model whose tools flag is false comes back as HTTP 400 with code unsupported_modality, before any provider is contacted, and so does response_format: json_object against a model without json_mode. Check contextWindow against your longest prompt, and maxOutputTokens against the longest answer you expect.

zdrProviders matters when your data cannot sit in a provider's logs. Setting require_zdr on the request, or requireZdr in a policy, restricts routing to those routes and fails the request rather than falling back to one without them.

In the console

Both /[org]/ai-gateway/models and the same page inside an application list the catalogue with capabilities, context, max output, input and output price, routes and zero-data-retention support, with a provider filter and free-text search. Prices there are shown in EUR per million tokens, converted from the catalogue's list rates. The catalogue is refreshed as providers change their line-up, so treat any price you read as current rather than fixed.