Skip to main content
The Flatkey API is a REST API that is fully compatible with the OpenAI API specification. Every request goes to https://router.flatkey.ai/v1 — the same base URL for all endpoints, providers, and models. Authentication uses a Bearer token in the Authorization header.

Base URL

Authentication

All requests must include your Flatkey API key as a Bearer token:
Generate your API key in the console. See Authentication for full details.

Request format

  • All requests use HTTPS
  • Request bodies must be JSON (Content-Type: application/json)
  • Responses are JSON (or SSE for streaming)

Available endpoints

OpenAI SDK compatibility

Because the API is OpenAI-compatible, you can use the official OpenAI Python or Node.js SDK with no changes to the request code — just set base_url:

Versioning

Flatkey uses the same versioning scheme as the OpenAI API. The /v1 path prefix is stable. When new OpenAI API versions are released, Flatkey adds support while maintaining backward compatibility with /v1.

Rate limits

Rate limits are applied per API key. If you exceed the limit, you receive a 429 Too Many Requests response. Contact support@flatkey.ai if you need higher rate limits for production workloads.

Supported content types