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
POST /api-keys with a signed-in user session (see Authentication).
A signed-in user session token is the authToken cookie of a browser signed in to Veryfront. Export it first:
session.sh
scopes explicitly: a key created without scopes gets only read and can list models but not run inference.
create-key.sh
key and the key ID in id. Veryfront returns the secret only once. If you created the key in Studio, find its id with GET /api-keys before step 6.
Project keys identify their project automatically. These examples require no project-selector header. An account-level key follows the separate authentication guide.
3. Discover a model
Each model family has its own list. Every list comes from the Veryfront catalog and shows only models that family’s request format can serve.list-models.sh
veryfront object. veryfront.processing names where inference runs, such as eu or worldwide, and veryfront.processing_label describes it in words. If your deployment retains the EU-only default, list the EU models with:
list-eu-models.sh
<openai-model-id> with a Responses-capable model from the OpenAI-format list and <claude-model-id> with an ID from the Anthropic-format list.
A listed model is not a guarantee that every client protocol or hosted tool works with it. Clients using Chat Completions need a model supporting that format.
Each model family is served on its native request format. A client using the wrong format gets a 404 naming the surface that serves the model:
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.
6. Check the key’s usage
In Studio, open API Keys and select the key. Over REST, callGET /api-keys/{id}/usage with the key ID from step 2:
key-usage.sh
summary holds the request count, tokens, and credits for the time frame. Account billing endpoints such as /account/usage need a signed-in user, not a machine credential.
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.