Flex Pricing
Access OpenAI and Google Gemini models at up to 50% lower cost by opting into flexible inference — ideal for background tasks, batch workloads, and latency-tolerant applications.
Last updated
# ✦ With Flex — ~50% cheaper
curl 'https://api.fastrouter.ai/api/v1/chat/completions' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"model": "openai/gpt-5.4-nano:flex",
"provider": { "only": ["openai"] },
"messages": [
{ "role": "user", "content": "Summarise this document..." }
]
}'from openai import OpenAI
client = OpenAI(
base_url="https://api.fastrouter.ai/api/v1",
api_key="YOUR_API_KEY",
)
response = client.chat.completions.create(
model="openai/gpt-5.4-nano:flex",
extra_body={"provider": {"only": ["openai"]}},
messages=[
{"role": "user", "content": "Summarise this document..."}
],
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.fastrouter.ai/api/v1",
apiKey: process.env.FASTROUTER_API_KEY,
});
const response = await client.chat.completions.create({
model: "openai/gpt-5.4-nano:flex",
// @ts-expect-error - FastRouter routing extension
provider: { only: ["openai"] },
messages: [
{ role: "user", content: "Summarise this document..." },
],
});
console.log(response.choices[0].message.content);