Skip to main content
Make your first model call through Atlan Trident: create an agent, copy its key, pick a model, and call it. Do this when you set up a new client or coding agent. To move an app that already calls a provider, see Migrate existing model calls.

Before you begin

Before you start, make sure you have:
  • Atlan account: Access to the workspace you will work in.
  • Client or SDK: One that speaks the OpenAI or Anthropic API.
  • Model Gateway: Model Gateway is set up for your deployment, with at least one provider and model turned on. Your deployment’s built-in provider may already serve models with nothing to set up. If not, your administrator connects one.
  • Model endpoint: The examples use api.atlan.com. If your deployment uses another model endpoint, replace that host.
1

Create agent

Open Model Gateway studio at the address for your deployment. Go to Agent access and select Create agent. Enter a name. For Workspace, pick your personal workspace, the one with your name.Anyone can create an agent in their personal workspace. To create one in a shared workspace, you need to be an admin of that workspace.You can also create the agent from the studio’s Quick start page. Enter a name and select Create agent. The agent goes in the first workspace you can create agents in, which is your personal one if you have it.
2

Copy API key

The studio shows the API key once, right after you create the agent. Store it in your secret manager or shell environment as ATLAN_API_KEY. Copy export line copies export ATLAN_API_KEY=<key> for your shell.Never commit the key to a repository. If you lose it, select Rotate key on the agent’s row to get a new one.
3

List callable models

Each dialect has its own base URL:
The response lists the models you can call. Pick one whose modality is chat and whose is_routable is true. Its id looks like <provider>/<model>. Use that id as the model in the next step.
4

Make first call

Either base URL reaches any chat model the gateway routes, so you don’t need to match the SDK to the provider. The reply’s model field can differ from the id you sent. To see how the gateway translates between dialects and which response headers name the model that answered, see How Model Gateway works.To try a call without writing code, select Send a test call on the studio’s Quick start page. It runs as you and shows the reply, its token counts, and its cost. The page’s Coding agent tab has a prompt to paste into Claude Code or Codex. The prompt sets up your project to use the gateway and makes one streaming call to prove it works.
5

Verify call

A successful call returns the model’s reply. In the studio, check the agent’s and the model’s usage. Whether usage and cost show depends on the operation and on whether the model has prices. If you get an error instead, such as 401 for a key problem, see Model Gateway errors.
For what each provider needs, see Supported model providers.

Supported operations

Batches, assistants, vector stores, fine-tuning, and Anthropic’s token counting aren’t served. They return 404. Sometimes a request is served on a different API from the one you called. Then the gateway drops fields that API has no place for and names them in the x-gateway-model-dropped header. If a field would change what the reply carries, the gateway refuses the request with 400 instead. On the Anthropic dialect, metadata and context_management pass through as sent. Image generation sends your request body as is, except on a Vertex provider. There, only Gemini image models work, with an id like gemini-3.1-flash-lite-image. The gateway translates the request to Gemini’s native API. Other Vertex image models, such as Imagen, are refused with unsupported_operation. For Gemini image models:
  • Images come back as b64_json only, in png (the default) or jpeg.
  • size becomes the aspect ratio it reduces to, so 1792x1024 is 16:9. A long edge of 2048 or 4096 gives 2K or 4K output.
  • Asking for n images makes n calls. Gemini’s safety filter can block a call, so you may get fewer than n images. If every image is blocked, the request fails with 400 invalid_request.
  • These fields are refused with 400 model_request_unsupported, naming the field, before anything counts against your budget: response_format: url, background: transparent, an output_format other than png or jpeg, and a size whose ratio Gemini doesn’t serve.
  • quality and other OpenAI-specific fields are dropped.

Troubleshooting

For error responses, and for models missing from GET /models, see Model Gateway errors.

Next steps

See also