Skip to main content

API Reference Overview

Base URL

https://api.openproxy.ai

Two API surfaces

Proxy endpoints — OpenAI-compatible, used to actually call a model:

POST /v1/chat/completions
POST /v1/embeddings
GET /v1/models

Management endpoints — used to configure your organization, under /api/v1/:

/api/v1/auth/*
/api/v1/api-keys
/api/v1/provider-keys
/api/v1/organizations/current
/api/v1/teams
/api/v1/analytics/*
/api/v1/prompt-templates
/api/v1/experiments

Authentication

Both surfaces use a bearer token, but different tokens: proxy endpoints take an API key (Authorization: Bearer sk_live_... or opai_... depending on how it was issued), management endpoints take a session token issued by /api/v1/auth/login. See Authentication.

Response headers on proxy requests

Every proxy response includes gateway metadata as response headers, regardless of which client you use to call it:

HeaderMeaning
x-openproxyai-request-idUnique ID for this request, for correlating with the audit log
x-openproxyai-providerUpstream provider actually used
x-openproxyai-modelModel actually used
x-openproxyai-cost-usdCost of this request in USD
x-openproxyai-latency-msTotal latency including proxy overhead
x-openproxyai-ttft-msTime to first token (streaming requests)
x-openproxyai-cacheWhich cache tier served this response, if any
x-openproxyai-policy-actionPolicy action taken, if any (e.g. redacted)
x-openproxyai-policy-reasonHuman-readable reason for the policy action

Sections