Cursor API Relay

Cursor API Relay Guide

Cursor supports custom API keys for standard chat models from providers such as OpenAI, Anthropic, Google, Azure OpenAI and AWS Bedrock. This page helps you decide when a relay or gateway is worth testing, and what public evidence to verify before adding balance.

Quick answer

Use official provider keys as the safety baseline. Consider an API relay for Cursor only when it documents provider support, model names, pricing, privacy policy and OpenAI-compatible behavior clearly enough for a small non-sensitive test.

  • Cursor custom API keys are configured from Cursor Settings > Models.
  • Custom API keys apply to standard chat models; specialized Cursor models may still use Cursor's own models.
  • Relays need extra checks for model substitution, logging, token billing and refund rules.

Verify before testing a Cursor relay

  • Official docs or provider pages mention Cursor, OpenAI-compatible APIs or supported model families.
  • Base URL, API key format, model names, streaming behavior and error format are documented.
  • Pricing is public enough to compare input/output token costs and failed-request billing.
  • Privacy, log retention, terms and support channels are visible before sending repository context.
  • The provider page has a clear update path so missing fields can be corrected by the provider.

Cursor-compatible provider shortlist

This shortlist is based on visible Cursor or OpenAI-compatible signals in the current public-data directory. It is a starting point for verification, not a final recommendation.

Entry Provider Type Best for Tool compatibility Public links Notes Source / action
Listed 1 MoleAPI
moleapi.com
Claude Code friendly Developers who want one endpoint for Claude Code, Cursor, Codex CLI, and common OpenAI SDK workflows.
Claude Code Codex CLI Cursor Cline
Run low-balance test first
Details Website
Listed 2 API易
apiyi.com
Claude Code friendly Teams that care about documentation, invoices, and visible model/pricing references.
Claude Code Codex CLI Cursor Cline
Run low-balance test first
Details Website
Listed 3 灵芽 API
api.lingyaai.cn
Claude Code friendly Users who primarily need copyable setup steps for AI coding terminals and editors.
Claude Code Codex CLI Cursor Cline
Run low-balance test first
Details Website
Listed 4 OpenRouter
openrouter.ai
Global aggregator Benchmarking model availability, pricing, and a global API gateway baseline.
Codex CLI Cursor Cline
Run low-balance test first
Details Website
Listed 5 302.AI
302.ai
Global aggregator Users who want both AI tools and API access under one account, while still checking official docs, pricing and privacy links before production use.
Codex CLI Cursor Cline
Run low-balance test first
Details Website
Listed 6 SiliconFlow
siliconflow.com
China model platform Low-cost DeepSeek, Qwen, embedding, image, and open model workloads.
Codex CLI Cursor Cline
Run low-balance test first
Details Website
Listed 7 柏拉图 AI
api.bltcy.ai
Claude Code friendly Users comparing Chinese relay services with coding-tool setup support.
Claude Code Codex CLI Cursor Cline
Pricing needs checking
Details Website
Listed 8 DMXAPI
dmxapi.com.cn
Enterprise gateway Companies that need private deployment, auditability, and a managed API control layer.
Codex CLI Cursor Cline
Docs need checkingPricing needs checking
Details Website

Official and public sources

These sources anchor the page. Provider-specific claims should still be checked from each provider's current docs and pricing pages.

  • Cursor's official documentation for custom API keys and supported providers.
  • OpenAI-compatible providers that may also be useful for Cursor-style workflows.
  • Privacy, billing and model-substitution risks to check before testing relays.

Provider update and sponsored inquiries

If a Cursor-compatible provider has missing docs, pricing, model coverage, privacy or support fields, use the update path to send public sources. Sponsored placements must be labeled and do not remove risk notes.

FAQ

Can Cursor use a custom API key?

Yes. Cursor's official settings documentation describes custom API key configuration under Cursor Settings > Models for supported providers such as OpenAI, Anthropic, Google, Azure OpenAI and AWS Bedrock.

Can every OpenAI-compatible relay work with Cursor?

No. OpenAI-compatible support is only a starting signal. Verify base URL behavior, model names, streaming, pricing, privacy and whether Cursor's exact workflow accepts that provider.

Should I use a relay for sensitive Cursor projects?

Prefer official APIs, cloud-provider routes or self-hosted gateways for sensitive repositories. Test relays only with non-sensitive code and a small balance first.