Docs/Get Started/Quickstart
Quickstart
Swap one base URL and make your first logged call in under five minutes.
Before you begin
You need a valite API key (prefixed vk_) — create one from the dashboard after signing up. You keep using your own OpenAI or Anthropic API key exactly as before; valite forwards it to the provider untouched and never stores it.
Five-minute setup
Point your SDK at the gateway
The gateway is a transparent proxy: the first path segment names the provider, and everything after it is forwarded unchanged.
from openai import OpenAI
client = OpenAI(
api_key="sk-...", # your OpenAI key, unchanged
base_url="https://gateway.valite.ai/openai/v1",
default_headers={"x-valite-api-key": "vk_..."},
)Tag your workflow
A workflow groups the calls that make up one unit of work in your product (an agent run, a document pipeline, a support reply). The simplest way to tag one is in the base URL itself — no per-request code:
export OPENAI_BASE_URL=https://gateway.valite.ai/openai/wf/support-triage/v1
You can also send an x-valite-workflow header per request, or rely on W3C traceparent propagation if you already emit it. See Workflows & Runs for all three channels.
Make calls as usual
That's the whole integration. Requests and responses are relayed byte-for-byte — streaming, tool calls, everything — and each call is logged off the hot path with zero added time-to-first-token.
Verify it's working
Every proxied response carries an x-gateway-request-id header. Make one request and check for it:
curl -sS -D - -o /dev/null \
https://gateway.valite.ai/openai/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "x-valite-api-key: $VALITE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"ping"}]}' \
| grep -i x-gateway-request-idThen open the dashboard — your workflow appears with its calls, token counts, and per-run cost as traffic arrives.
What happens next
Next steps
Read How valite Works for the full mental model, or go straight to Authentication to understand how the vk_ key and your provider key travel together.