Cursor BYOK
Cursor BYOK is available on the Spanway gateway through the cursor/ model prefix. You register a Cursor BYOK model once in the gateway's config.yaml (or through the Admin UI), and every application then calls it through the gateway's OpenAI-compatible API with a Spanway virtual key. The provider credential stays on the gateway, and every request is authenticated, rate limited, logged and costed in the same way as any other provider.
Supported endpoints
The gateway's endpoint support matrix lists the following endpoints for Cursor BYOK. Each link explains the request shape and the gateway features that apply to that endpoint.
- OpenAI Chat Completions API (
/chat/completions) - Anthropic Messages API (
/messages) - OpenAI Responses API (
/responses) - A2A (Agent-to-Agent) protocol for agent communication (
/a2a) - Google Interactions API (
/interactions)
Credentials
The Cursor BYOK integration does not read a provider specific environment variable. Set api_base, and api_key when the server requires one, directly in spanway_params. Use the os.environ/ prefix to pull those values from the environment or from a configured secret manager.
Pricing
The price map bundled with this Spanway build has no entries for Cursor BYOK. Without a price the gateway still serves and logs requests, but it cannot compute their cost. Add input_cost_per_token and output_cost_per_token to the deployment to enable spend tracking, as described in custom pricing.