curl gateway beta quickstart

VerticalAPI is just an HTTP API — you can call it from curl, httpie, Postman or any HTTP client. The endpoint is OpenAI-compatible. Two headers: Authorization for VerticalAPI, X-Provider-Key for the underlying provider.

From beta docs to a verified test

  1. Read the gateway beta documentation

    Confirm current access, supported providers, compatibility and limits.

  2. Prepare scoped credentials

    Follow your provider's current key-handling guidance and avoid production credentials during evaluation.

  3. Install the curl SDK

    # curl is preinstalled on macOS, Linux and Windows 10+

  4. Run the example below

    Use the documented base URL and required headers, then verify the returned shape for this beta path.

  5. Validate the result

    Check response shape, model behavior, limits and total cost against the provider before production.

curl — first call

quickstart.curlcurl
curl https://api.verticalapi.com/v1/chat/completions \
  -H "Authorization: Bearer vapi_..." \
  -H "X-Provider-Key: sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello, world"}]
  }'

Model IDs and provider support can drift. Check the source-dated model directory and current beta documentation before changing the model or provider header.

Common errors and fixes

401 missing Authorization header
The provider key goes in X-Provider-Key. Don't mix them up.
Streaming responses garbled in terminal
Add --no-buffer to curl: curl --no-buffer ... and parse data: lines. Each chunk is a server-sent-events line.
Special characters in JSON body
Use --data-binary @body.json with a real JSON file rather than inline -d for complex prompts. Avoids shell-escaping headaches.

Where to go from here

Pick a model in the source-dated directory. Compare two in the decision comparisons. Review the benchmark evidence policy before trusting performance claims.