Quickstart

Get your first response in 3 lines of code. VerticalAPI is 100% OpenAI SDK compatible.

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",
)

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" \
  -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

API keys are tied to a tier (Free, Pro, Enterprise) which determines rate limits and available backend models. Keys are hashed server-side — we never store the raw key.

To get an API key, contact us.

Chat Completions

POST /v1/chat/completions

Create a chat completion using a vertical model. Follows the exact OpenAI Chat Completions API schema.

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.

Coming soon: Financial Analyst, Legal Research, Technical Writer, Customer Intelligence.

SDK Support

VerticalAPI is 100% OpenAI SDK compatible. Any library that supports the OpenAI Chat Completions API works — just change base_url and api_key.

Python

python
from openai import OpenAI
client = OpenAI(base_url="https://api.verticalapi.com/v1", api_key="vapi_...")

JavaScript / TypeScript

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

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 "Content-Type: application/json" \
  -d '{"model":"geopolitical-risk","messages":[...]}'

Pricing & Rate Limits

TierPriceReq/minReq/dayReq/monthBackend
Free$0101003,000Haiku
Pro$49/mo6010,000300,000Sonnet
EnterpriseCustom300100,0003,000,000Opus

Rate limit headers are included in every response:

Changelog

v0.1.0 — April 2026