Python quickstart — 5 lines to ship

VerticalAPI is a drop-in replacement for the OpenAI Python SDK. Install the official openai package, point base_url at api.verticalapi.com, and pass your provider key in the X-Provider-Key header. You're calling Claude, Gemini or any of 25+ providers in 5 lines.

From zero to first call

  1. Sign up at verticalapi.com/dashboard

    Free tier — no card required. Generates your vapi_ key automatically.

  2. Add a provider key

    Paste your OpenAI sk-..., Anthropic sk-ant-..., or Google AIza... into the dashboard. Encrypted at rest.

  3. Install the Python SDK

    pip install openai

  4. Run the example below

    Drop-in OpenAI SDK pattern — base_url + api_key + provider key header. That's it.

  5. Inspect the trace

    Every call gets a unique request ID. Find it in the dashboard with full latency, tokens, and cost breakdown.

Python — first call

quickstart.pythonPython
from openai import OpenAI

client = OpenAI(
    base_url="https://api.verticalapi.com/v1",
    api_key="vapi_...",  # your VerticalAPI key
    default_headers={"X-Provider-Key": "sk-..."}  # your provider key
)

response = client.chat.completions.create(
    model="gpt-4o",  # or claude-sonnet-4-5, gemini-2.5-pro, ...
    messages=[{"role": "user", "content": "Hello, world"}]
)
print(response.choices[0].message.content)

Swap model for claude-sonnet-4-5, gemini-2.5-pro, or any of 25+ supported providers. Update X-Provider-Key to match.

Common errors and fixes

401 Unauthorized — invalid VerticalAPI key
Check that api_key starts with vapi_ and matches a key in your VerticalAPI dashboard. Trial keys expire after 14 days — refresh in the dashboard.
402 Provider key invalid
X-Provider-Key must match the model's provider. sk-... for OpenAI, sk-ant-... for Anthropic, AIza... for Google. VerticalAPI returns the provider's exact error code so you can debug at the source.
429 Rate limited
VerticalAPI inherits your provider account's rate limits. Slow down or upgrade the underlying provider plan. Check VerticalAPI's dashboard rate-limit panel for live status.

Where to go from here

Pick a model: browse all 25+ providers. Compare two: read head-to-head comparisons. Or jump to a use case: chatbot, RAG, autonomous agents.