# flatkey.ai flatkey.ai is a unified AI API gateway, model routing, billing, and operations platform. ## API Protocols - Router base URL: https://router.flatkey.ai - OpenAI-compatible Chat Completions: POST https://router.flatkey.ai/v1/chat/completions - OpenAI-compatible Responses: POST https://router.flatkey.ai/v1/responses - Anthropic Messages: POST https://router.flatkey.ai/v1/messages - Gemini native generateContent: POST https://router.flatkey.ai/v1beta/models/{model}:generateContent - Asynchronous video generation: POST https://router.flatkey.ai/v1/videos ## Gemini Image Models - nano-banana-pro-preview supports both Gemini native generateContent and OpenAI-compatible Chat Completions. - With Gemini native generateContent, generated images are returned in candidates[].content.parts[].inlineData. - With Chat Completions, generated images are returned in choices[0].message.content as Markdown data URIs. - These Gemini image-model paths currently do not use /v1/images/generations; do not infer lack of Gemini support from that endpoint. ## Seedance Video Models - Seedance models use the official multimodal content[] request format. - Create a video task with POST https://router.flatkey.ai/v1/videos. - Poll task status with GET https://router.flatkey.ai/v1/videos/{task_id}. - Download completed video content with GET https://router.flatkey.ai/v1/videos/{task_id}/content. - Use GET /v1/models to discover the Seedance model IDs currently available to your account. - Documentation: https://docs.flatkey.ai/api-reference/seedance-video-generation - Chinese documentation: https://docs.flatkey.ai/zh/api-reference/seedance-video-generation ## Core Pages - Home: https://flatkey.ai/ - Flatkey Tools: https://flatkey.ai/tools - Flatkey as an Apify alternative: https://flatkey.ai/apify-alternative - Flatkey CLI: https://flatkey.ai/cli - Flatkey vs Higgsfield: https://flatkey.ai/higgsfield-alternative - Model pricing: https://flatkey.ai/pricing - Rankings: https://flatkey.ai/rankings - Blog: https://flatkey.ai/blog - Sitemap: https://flatkey.ai/sitemap.xml ## Blog Categories - AI Gateway Architecture: https://flatkey.ai/blog/category/ai-gateway-architecture - Base URL and SDK Migration: https://flatkey.ai/blog/category/base-url-and-sdk-migration - Cost, Billing, and Ops: https://flatkey.ai/blog/category/cost-billing-and-ops - Enterprise Controls and Trust: https://flatkey.ai/blog/category/enterprise-controls-and-trust - Gateway Comparisons: https://flatkey.ai/blog/category/gateway-comparisons - Model and Modality Playbooks: https://flatkey.ai/blog/category/model-and-modality-playbooks - Reliability and Routing: https://flatkey.ai/blog/category/reliability-and-routing - Tool Integrations: https://flatkey.ai/blog/category/tool-integrations - コスト・請求・運用: https://flatkey.ai/blog/category/cost-billing-ops-ja ## Blog Articles - Model Fallback Strategy: A 3-Workflow Playbook: https://flatkey.ai/blog/model-fallback-strategy-three-workflow-playbook - A production model fallback playbook with policy as code, failure drills, a 60-minute game day, release gates, rollback triggers, and safe recovery rules. - AI API Cost Optimization: 7 Strategies, 5 Alternatives, and a Cost Calculator: https://flatkey.ai/blog/ai-api-cost-optimization-strategies-alternatives - Calculate cost per accepted task, compare five AI API alternatives with a 100-task benchmark, and run a safer cost reduction sprint. - LLM Gateway Beginner Guide: From First Request to Production: https://flatkey.ai/blog/llm-gateway-beginner-guide - A practical LLM gateway beginner guide with a quickstart, first-100-requests lab, error map, build-versus-buy scorecard, and production rollout checks. - AI Observability Implementation Checklist: 20 Production Steps: https://flatkey.ai/blog/ai-observability-implementation-checklist - A production AI observability implementation checklist with 20 launch steps, a telemetry contract, code pattern, alert runbook, acceptance tests, and ownership handoff. - Prompt Caching Workflow: Cost and ROI Guide for LLM Apps: https://flatkey.ai/blog/prompt-caching-workflow-cost-roi-guide - A provider-aware prompt caching workflow with ROI formulas, a seven-day audit, break-even math, telemetry, and rollout guardrails for production LLM applications. - What Is an LLM Gateway? A Beginner’s Guide: https://flatkey.ai/blog/what-is-an-llm-gateway - Learn how an LLM gateway centralizes model access, routing, fallback, rate limits, observability, security, and billing for AI applications. - LLM API Observability: Metrics, Traces, Logs, and Cost: https://flatkey.ai/blog/llm-api-observability-metrics-traces-cost - A production guide to monitoring LLM APIs with validated success metrics, distributed traces, safe structured logs, SLOs, alerts, and cost per accepted task. - Secure API Key Management for AI Products: https://flatkey.ai/blog/secure-api-key-management-ai-products - A production playbook for AI API key custody, scoped identities, prompt-safe logging, zero-downtime rotation, leak response, and multi-provider governance. - AI Model Evaluation Before Switching API Providers: A Workflow Checklist: https://flatkey.ai/blog/ai-model-evaluation-before-switching-api-providers - Use a decision-grade AI model evaluation workflow to compare providers on task success, compatibility, reliability, latency, effective cost, and rollout risk. - LLM Rate Limits Explained: RPM, TPM, and Retries: https://flatkey.ai/blog/llm-rate-limits-explained-rpm-tpm-retries - Understand RPM, TPM, 429 errors, capacity planning, queues, exponential backoff, retry budgets, and fallback routing for production LLM APIs. - LLM API Fallback Routing: A Production Failover Playbook: https://flatkey.ai/blog/llm-api-fallback-routing-production-playbook - A production playbook for deciding when LLM requests should retry, fail over, switch models, or stop—without breaking streams, tools, schemas, or latency budgets. - AI API Pricing Comparison: OpenAI vs Claude vs Gemini vs Qwen (2026): https://flatkey.ai/blog/ai-api-pricing-comparison-openai-claude-gemini-qwen - Compare current OpenAI, Claude, Gemini, and Qwen API prices using normalized production workloads and cost per accepted result. - AI API Gateway Architecture: One Key, Model Routing, and Failover: https://flatkey.ai/blog/ai-api-gateway-architecture-model-routing - A production architecture guide to one-key model access, explicit routing policy, health checks, retries, contract-safe failover, streaming, telemetry, and migration. - Seedance API Evaluation Framework for Text-to-Video Product Teams: https://flatkey.ai/blog/seedance-api-evaluation-framework-product-teams - A repeatable framework for evaluating Seedance API quality, reliability, user experience, safety, and cost before a text-to-video product rollout. - DeepSeek API vs Qwen API for Cost-Sensitive Workflows: 2026 Cost Guide: https://flatkey.ai/blog/deepseek-api-vs-qwen-api-cost-sensitive-workflows - Compare DeepSeek and Qwen API pricing with July 28, 2026 list prices, cache break-even math, batch costs, lifecycle risks, and workload-specific guidance. - Gemini API Production Readiness Checklist for Backend Teams: https://flatkey.ai/blog/gemini-api-production-readiness-checklist-backend-teams - A production-readiness checklist for backend teams integrating Gemini API, covering credentials, response contracts, retries, observability, cost, rollout, and incidents. - Claude API Access Outside One-Region Setups: A Compliance-First Guide: https://flatkey.ai/blog/claude-api-access-outside-one-region-setups - A compliance-first guide to Claude API access across regions, covering direct Anthropic, Bedrock, Vertex AI, gateways, testing, observability, and approved failover. - OpenAI API Access for Multi-Model Products: A Production Setup Guide: https://flatkey.ai/blog/openai-api-access-production-multi-model-products - Set up OpenAI API access for a production multi-model product with project-scoped credentials, endpoint checks, rate-limit handling, canaries, and fallback readiness.