valite
Docs navigation

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

1

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_..."},
)
2

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:

shell
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.

3

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:

shell
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-id

Then open the dashboard — your workflow appears with its calls, token counts, and per-run cost as traffic arrives.

What happens next

Once a workflow has ~5 complete runs logged, valite can freeze a quality bar from your baseline and start replaying candidates against it. Head to Testing New Models to run your first replay.

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.