1. Create or open a project
At Projects, open the project you want to use. To create one, select New project, then Start from scratch, enter a name, and select Create Project. Studio opens the project workspace.2. Create and save a project key
- In the workspace’s panel picker, open API Keys.
- Select Create API key and give the key a name identifying its client or owner.
- Keep Read enabled for model discovery and enable Write for inference. The form defaults to Read only. Leave Delete off unless the client needs it.
- Select Create API Key. Copy the secret from API key created and save it. The secret is shown once.
- Select Connect to the AI gateway to open this guide in a new tab, then select Done in the key dialog.
Terminal
3. Discover a model
List the models your project key can access:list-models.sh
<openai-model-id> with a Responses-capable OpenAI model and <claude-model-id> with an available Claude model. Clients using Chat Completions need a model supporting that format. A model listed for a project is not a guarantee that every client protocol or hosted tool works with it.
An empty list means no suitable model is available under the current project policy and key limits. Resolve that before configuring the client.
4. Configure your client
Use the tab for your installed client. Replace the model placeholders with the IDs selected above and the key placeholder with your saved project key.- Claude Code
- Codex CLI
- Cursor
- OpenCode
- Pi
- OpenClaw
- Any client
Run these variables in the terminal that starts Claude Code. The
/model picker uses gateway discovery. Claude Code uses Claude models through the Anthropic Messages format. Its base URL is /ai because the client appends /v1/messages.Terminal
Application SDKs
For server-side application code, use the same project key and returned model ID. Install the SDK shown in the selected tab, save its.mts TypeScript example, and run it with npx tsx <filename>. The .mts extension supports top-level await in existing CommonJS projects as well as ESM projects.
The endpoint prefix depends on the SDK: OpenAI clients use /ai/v1, the official Anthropic SDK uses /ai, and the Vercel Anthropic provider uses /ai/v1. Native Google clients use /ai with API version v1beta, which produces requests under /ai/v1beta. Do not substitute one prefix for every SDK.
Terminal
- OpenAI SDK
- Vercel AI SDK
- LangChain
- Anthropic SDK
- Google Gemini
Terminal
openai-gateway.mts
Veryfront Code applications
For a Veryfront Code application, follow Code getting started and its model/provider configuration. The framework CLI’s login and linked-project flow remain separate from the direct gateway-key configuration above. A project API key does not replaceveryfront login.
5. Verify one request
In your configured client, send:Reply with gateway connected. Confirm that it returns an answer without an authentication, model, or policy error. The request consumes project credits.
For an HTTP-level check of a Responses-capable model, run:
first-response.sh
A successful discovery request proves Read access, not inference access. Check the project key’s usage after the inference test. A successful request is the completion check; saving a configuration alone does not prove it works.
Next
- API Keys in Studio: Rotate or revoke the client key and inspect usage.
- Create an API key: Manage credentials for other API clients.
Related
- Authenticate API requests: Bearer credentials and resource access.
- AI Gateway API: Request formats, model discovery, and project policy.
- Codex configuration: Local Codex settings, including hosted web search.