Gateway Quickstart
By the end of this guide, one model request will have passed through Provon AI Gateway and the same request will be visible as trace evidence in the Workbench.
Prerequisites#
- A Provon project in the hosted Workbench or a local/self-hosted deployment
- An upstream provider API key for the BYOK path
curl
1. Open Provon#
Open https://app.provon.dev and create an account, organization, and project when prompted.
To run a local development deployment instead:
pnpm install
pnpm devThen open http://127.0.0.1:3000.
2. Create The Application Key#
In the project:
- Open API keys.
- Select Create API key.
- Keep
gateway:invokeenabled. Keepworkspace:readtoo if this key will call Gateway discovery endpoints. - Copy the secret when shown; it cannot be retrieved later.
Export the hosted example values:
export PROVON_API_KEY="your_project_api_key"
export PROVON_GATEWAY_URL="https://gateway.provon.dev/v1"For local development, use http://127.0.0.1:3000/gateway/v1 for PROVON_GATEWAY_URL.
This key authenticates the application to Provon. It is not an OpenAI, Anthropic, or other upstream provider key.
3. Connect A Model Target#
For the first request, use one explicit target:
| Target access | Setup |
|---|---|
| Bring your own provider key | Create a Provider Key under Providers |
| Provon Cloud managed model | Use a hosted/PTB-enabled deployment with AI Gateway credits |
| Model on the Node runtime | Install and start the model, then use self/<model> |
The BYOK path is the portable default and is available in both local and hosted deployments. Managed Provon Cloud models require a deployment that exposes PTB targets; a BYOK-only self-hosted Gateway cannot route those models just by adding pricing metadata.
In the Workbench:
- Open Providers and select the upstream provider.
- Under Provider keys, select Add key.
- Store the upstream provider API key.
- Leave Models set to All, or add an explicit model mapping.
- Keep the Provider Key enabled.
- Set Request traces to All while validating the integration.
With an explicit mapping, AI Gateway model is the model ID sent by the application and Upstream model is the ID sent to the provider. Endpoint and feature declarations restrict when that mapping is eligible.
The application never receives the upstream credential. See Model providers for target access, Provider Keys, and model mappings.
4. Send The First Request#
Use a provider-qualified model for the first request so routing intent is unambiguous:
curl -i "$PROVON_GATEWAY_URL/chat/completions" \
-H "Authorization: Bearer $PROVON_API_KEY" \
-H "Content-Type: application/json" \
-H "x-otel-gen-ai-conversation-id: quickstart-conversation-1" \
-H "x-otel-gen-ai-agent-id: quickstart-agent" \
-H "x-otel-gen-ai-agent-name: Quickstart Agent" \
-d '{
"model": "openai/gpt-5-mini",
"messages": [
{
"role": "user",
"content": "Explain why an agent repair needs production evidence."
}
]
}'Replace openai/gpt-5-mini with a model available through the Provider Key you configured.
For a model, use its route instead:
{
"model": "self/<gateway-model-id>"
}Do not use a plain model name or provon/auto for this first check. Those forms add routing policy
to a transport test.
5. Verify The Response#
A successful model path returns:
- an HTTP
2xxresponse in the provider-compatible shape; - an
x-provon-request-idresponse header; - model output in the response body.
Record x-provon-request-id. The response proves that inference worked; it does not prove that the
evidence path worked.
If this step fails, start with Gateway troubleshooting before changing routing or guardrail settings.
6. Verify The Trace#
Open Traces in the same project and locate the request by its timestamp or
x-provon-request-id.
Verify:
- the root operation is
POST /v1/chat/completions; - the selected provider and model are correct;
- an upstream attempt appears as a child span;
- latency, status, token usage, and cost appear when available;
- the conversation is
quickstart-conversation-1; - the agent is
quickstart-agent.
If the response succeeded but no trace appears, confirm that Providers -> Request traces is set to All. Trace persistence may be asynchronous in some deployments. See Gateway evidence for capture modes and Gateway troubleshooting for the verification sequence.
You Are Ready#
The Gateway path is working when both checks pass:
- The client receives the expected provider-compatible response and
x-provon-request-id. - The same request appears in Traces with its provider attempt and conversation context.
Keep the project key and upstream provider key separate. Use stable, non-secret identifiers for conversation, user, session, and agent context because these values may be retained with telemetry.
Continue By Goal#
| Goal | Next page |
|---|---|
| Move an existing production application | Migration guide |
| Configure a client or framework | SDK integrations |
| Connect more targets or map model IDs | Model providers |
| Add policies, retry, or fallback | Routing and reliability |
| Add limits and guardrails | Gateway governance |
| Choose what evidence to retain | Gateway evidence |
| Prepare a production rollout | Production guide |
| Inspect the complete HTTP contract | Gateway API |