Gateway beta documentation

Product boundary: The public model and provider intelligence directory is VerticalAPI's primary product. This page documents a secondary BYOK gateway utility in beta. Test compatibility and limits against your workload before relying on it.

The gateway exposes an OpenAI-compatible /v1/chat/completions endpoint at https://api.verticalapi.com/v1. Authenticate with a VerticalAPI Bearer token, set model to a vertical slug and pass the upstream LLM provider key via X-Provider-Key.

Quickstart

Use an OpenAI SDK or a direct HTTP request. The endpoint follows the OpenAI Chat Completions shape; beta clients should verify each required option.

Base URL: https://api.verticalapi.com/v1

Python (OpenAI SDK)

quickstart.pypython
from openai import OpenAI

client = OpenAI(
    base_url="https://api.verticalapi.com/v1",
    api_key="vapi_your_key_here",
    default_headers={"X-Provider-Key": "your_provider_key"},
)

response = client.chat.completions.create(
    model="geopolitical-risk",
    messages=[{"role": "user", "content": "Analyze Iran-Israel escalation dynamics"}],
)

print(response.choices[0].message.content)

cURL

terminalbash
curl -X POST https://api.verticalapi.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer vapi_your_key_here" \
  -H "X-Provider-Key: your_provider_key" \
  -d '{
    "model": "geopolitical-risk",
    "messages": [{"role": "user", "content": "Risk level for Strait of Hormuz?"}],
    "stream": false
  }'

Streaming

streaming.pypython
stream = client.chat.completions.create(
    model="geopolitical-risk",
    messages=[{"role": "user", "content": "Analyze Iran-Israel escalation"}],
    stream=True,
)

for chunk in stream:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

Authentication

All API requests require a vapi_ API key passed via the Authorization header.

headerhttp
Authorization: Bearer vapi_your_key_here

VerticalAPI access keys are hashed server-side. Upstream provider credentials can be sent per request through X-Provider-Key.

Beta access is issued directly. Contact VerticalAPI with the provider and workload you want to test.

Chat Completions

POST /v1/chat/completions

Create a chat completion using a vertical model. The request and response are designed around the OpenAI Chat Completions shape.

Request body

ParameterTypeRequiredDescription
modelstringYesVertical slug (e.g. "geopolitical-risk")
messagesarrayYesArray of message objects with role and content
streambooleanNoEnable SSE streaming (default: false)
temperaturefloatNoSampling temperature (0.0 - 1.0)
max_tokensintegerNoMaximum output tokens (default: 4096, max: 8192)
toolsarrayNoAdditional tool definitions (merged with vertical's built-in tools)
tool_choicestringNoTool selection mode

Response

response.jsonjson
{
  "id": "chatcmpl-vapi-abc123",
  "object": "chat.completion",
  "created": 1234567890,
  "model": "geopolitical-risk",
  "choices": [{
    "index": 0,
    "message": {
      "role": "assistant",
      "content": "Based on current intelligence signals..."
    },
    "finish_reason": "stop"
  }],
  "usage": {
    "prompt_tokens": 1847,
    "completion_tokens": 256,
    "total_tokens": 2103
  }
}
Note: The model field in the response always returns the vertical slug, not the backend model. This is by design — the backend model is an implementation detail.

Streaming

Set "stream": true to receive Server-Sent Events (SSE) in OpenAI format:

SSE streamtext
data: {"id":"chatcmpl-vapi-abc123","choices":[{"delta":{"role":"assistant"},"finish_reason":null}]}

data: {"id":"chatcmpl-vapi-abc123","choices":[{"delta":{"content":"Based on"},"finish_reason":null}]}

data: {"id":"chatcmpl-vapi-abc123","choices":[{"delta":{"content":" current"},"finish_reason":null}]}

data: {"id":"chatcmpl-vapi-abc123","choices":[{"delta":{},"finish_reason":"stop"}]}

data: [DONE]

List Models

GET /v1/models

Returns available verticals in OpenAI models list format.

responsejson
{
  "object": "list",
  "data": [
    {
      "id": "geopolitical-risk",
      "object": "model",
      "owned_by": "verticalapi",
      "description": "AI model specialized in geopolitical risk analysis"
    }
  ]
}

Health Check

GET /health

responsejson
{"status": "ok", "version": "0.1.0"}

Errors

VerticalAPI returns OpenAI-compatible error responses:

StatusTypeDescription
401authentication_errorMissing or invalid API key
404not_found_errorUnknown vertical/model slug
429rate_limit_errorRate limit exceeded (check Retry-After header)
400invalid_request_errorMalformed request body
502api_errorBackend provider error
error responsejson
{
  "error": {
    "message": "Model 'xxx' not found. Available: geopolitical-risk",
    "type": "not_found_error",
    "code": "model_not_found"
  }
}

Verticals

Each vertical is a pre-configured AI model with a built-in system prompt, tool definitions, and intelligent model routing.

geopolitical-risk

Senior geopolitical risk analyst with expertise in conflict dynamics, economic warfare, and strategic intelligence.

Current catalogue: Use GET /v1/models for the verticals available to your key. Do not rely on a static marketing list for beta availability.

SDK Support

VerticalAPI is designed for OpenAI SDK compatibility. Change base_url, use the VerticalAPI key as api_key, pass the provider credential as a default header and test the options your application requires.

Python

python
from openai import OpenAI
client = OpenAI(
    base_url="https://api.verticalapi.com/v1",
    api_key="vapi_...",
    default_headers={"X-Provider-Key": "your_provider_key"},
)

JavaScript / TypeScript

javascript
import OpenAI from 'openai';
const client = new OpenAI({
  baseURL: 'https://api.verticalapi.com/v1',
  apiKey: 'vapi_...',
  defaultHeaders: { 'X-Provider-Key': 'your_provider_key' },
});

Go

go
client := openai.NewClient(
    option.WithBaseURL("https://api.verticalapi.com/v1"),
    option.WithAPIKey("vapi_..."),
)

cURL

bash
curl https://api.verticalapi.com/v1/chat/completions \
  -H "Authorization: Bearer vapi_..." \
  -H "X-Provider-Key: your_provider_key" \
  -H "Content-Type: application/json" \
  -d '{"model":"geopolitical-risk","messages":[...]}'

Access & Rate Limits

The gateway is a secondary beta utility and does not currently publish self-serve subscription tiers on this page. Access and limits are confirmed directly for the workload being tested. The public model directory and comparisons remain free to read.

Rate limit headers are included in every response:

Changelog

v0.1.0 — April 2026