Introducing Flynn: inference on the APIs you already use
Flynn is an OpenAI- and Anthropic-compatible API for open-weight models, with a router that picks the model for each request. Change the base URL and the key; keep your code.
Most teams that call a language model have already written their code against one API: OpenAI's or Anthropic's. Moving to another model provider usually means learning a new SDK, new request shapes and new errors.
Flynn doesn't ask for that. It is an inference API that speaks both formats, so the SDK you already use works by changing two values: the base URL and the key.
Two wire formats, one key
| You use | Endpoint | Base URL |
|---|---|---|
| an OpenAI-shaped client | POST /v1/chat/completions | https://api.flynn.digitalfrontier.so/v1 |
| an Anthropic-shaped client | POST /v1/messages | https://api.flynn.digitalfrontier.so |
The same API key works on both. GET /v1/models lists the models you can call,
with their prices.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.flynn.digitalfrontier.so/v1",
api_key=os.environ["FLYNN_API_KEY"],
)
reply = client.chat.completions.create(
model="flynn",
messages=[{"role": "user", "content": "Hello, Flynn"}],
)
print(reply.choices[0].message.content)
Pin a model, or let the router choose
Every request names a model. Pin one by its id from GET /v1/models, or send
"flynn" and the Flynn router picks the model that serves each request. A
routed request is billed at the list price of the model that served it.
Pricing you can read
You pay per token, with input and output priced separately, in US dollars per million tokens. The price shown is the price billed, and failed requests are not billed. You pay from prepaid credit, topped up from the console.
Prices are on the Flynn pricing page, which is generated
from the live API, and in GET /v1/models when you call it with your key. Prices
can change, so read them from there rather than copying them.
Start in a few minutes
- Sign in at flynn.digitalfrontier.so. A personal account is provisioned on first sign-in.
- Mint an API key in the console. You can keep as many keys as you need, and rotate or revoke them yourself.
- Add prepaid credit, then point your SDK at
https://api.flynn.digitalfrontier.so.
A new account starts at 30 requests per minute, 5 million tokens a month and a
25 USD monthly spend cap. Your current limits are in limits on GET /v1/usage.
A compatibility promise
The parts of Flynn your code depends on (the two chat endpoints, the model list, API-key authentication and the error envelopes) get 90 days' notice before a breaking change. Breaking changes are announced, with the date they take effect, in the Flynn API changelog.
Read more
Questions? Write to support@digitalfrontier.so.