HTTP API

API reference

Direct API clients authenticate with an Edy API key. The VS Code extension uses a short-lived OAuth Bearer token instead. Public requests always use an Edy model slug, never an upstream provider model ID.

POST/api/v1/chat/completions

Streams an OpenAI-compatible chat completion as Server-Sent Events.

curl -X POST https://edycode.vercel.app/api/v1/chat/completions \
  -H "Authorization: Bearer $EDY_API_KEY"
GET/api/v1/models

Lists active public model slugs, capabilities, controls, defaults, and premium classification.

curl https://edycode.vercel.app/api/v1/models \
  -H "Authorization: Bearer $EDY_API_KEY"
GET/api/v1/account/models

Lists only the models currently usable by the authenticated account. OAuth access requires the models:read scope.

curl https://edycode.vercel.app/api/v1/account/models \
  -H "Authorization: Bearer $EDY_API_KEY"

Errors

401
Missing, expired, invalid, or revoked credential. The VS Code extension refreshes an expired OAuth access token once before asking you to sign in again.
402
A Paid-mode request cannot reserve its maximum estimated cost from the wallet.
403
A premium model was requested while the account is in Free mode. The error code is paid_mode_required.
429
User quota or shared upstream capacity is exhausted. Quota responses identify request or token limits, include retryAfter, and return an x-request-id header.
503
Required capacity coordination is temporarily unavailable.
503
An active model is missing complete Paid-mode pricing. The error code is model_pricing_not_configured.
stream
If an upstream 500, 502, 503, 504, or 529 persists after two safe pre-output retries, the SSE stream returns upstream_overloaded with Edy's request ID.