AI Router API
Different LLMs use different APIs, SDKs, and response formats—and they change often. That means more integration work, more code to maintain, and vendor lock-in when you want to switch models or providers. **AI Router API** solves this by exposing a **single, unified API** for multiple LLM providers. You choose the provider and model in the request body; the API returns a consistent response…
AI Router API endpoints
| Method | Endpoint | Description |
|---|---|---|
| Info | ||
| GET |
getHealth /health |
Checks that the API is up. Returns status ok. |
| GET |
getInfo / |
Returns the API name, description, and list of endpoints. |
| Models | ||
| GET |
getModelsFastest /models/fastest |
Returns the model with the lowest average latency. Optional ?provider= to limit. |
| GET |
getModelsRecommend /models/recommend |
Recommends a model by use_case (cheap, fast, quality, long_context). Optional ?provider= to limit. |
| GET |
getModels /models |
Lists all available models with max context, pricing, and latency. Optional ?provider= to filter. |
| GET |
getModelsCheapest /models/cheapest |
Returns the lowest-cost model. Optional ?provider= to limit. |
| GET |
getModelsCompare /models/compare |
Compares metadata of two models (provider1, model1, provider2, model2). |
| Chat | ||
| POST |
postChat /chat |
Sends a request to the chosen provider and model. Returns content, usage, estimated_cost_usd. May include parts (images) if the model supports it. |
| POST |
postChatEstimate /chat/estimate |
Estimates the cost in USD for a call without executing the LLM. Provide provider, model, and optionally token counts. |
| POST |
postChatBatch /chat/batch |
Sends multiple chat requests at once. Returns results (success, data or error per index). |
| Tasks | ||
| POST |
postExtract /extract |
Extracts information from text (e.g. JSON). Optional format to describe expected schema. |
| POST |
postTranslate /translate |
Translates the text to the target language. target_language required (e.g. French, en). |
| POST |
postSummarize /summarize |
Returns a summary of the provided text. Optional max_length (e.g. in 3 sentences). |
| POST |
postRewrite /rewrite |
Rewrites the text while keeping the meaning. Optional style (formal, simple, casual). |
| Embeddings | ||
| POST |
postEmbeddings /embeddings |
Converts text to vectors. Providers openai, mistral, gemini. Models e.g. text-embedding-3-small, mistral-embed. |
| Images | ||
| POST |
postImagesEdit /images/edit |
Edits an image from a URL or base64 data URL using OpenAI (gpt-image-1.5 or dall-e-2). Optional mask for inpainting. |
| POST |
postImagesGenerate /images/generate |
Generates an image via OpenAI DALL·E 2 or 3. Prompt required. Sizes 1024x1024, 1792x1024 (landscape), 1024x1792 (portrait). |
| Video | ||
| POST |
postVideoGenerate /video/generate |
Generates a short video from a text prompt via Replicate (Luma Ray 2, 720p). Returns video_url when ready or prediction_id for polling. |
| Creators | ||
| POST |
postCreatorsCarouselIdeas /creators/carousel-ideas |
Generates slide ideas for LinkedIn or Instagram carousels. |
| POST |
postCreatorsHeadlines /creators/headlines |
Returns a list of catchy titles or headlines for a given topic. |
| POST |
postCreatorsSeoMeta /creators/seo-meta |
Generates a meta title (≤60 chars) and meta description (≤155 chars) for SEO. |
| POST |
postCreatorsThumbnailTiktok /creators/thumbnail/tiktok |
Generates a vertical visual for TikTok or Reels from a title. |
| POST |
postCreatorsHooks /creators/hooks |
Generates hooks for ads or social posts. |
| POST |
postCreatorsAltText /creators/alt-text |
Describes an image (URL) for alt attribute. Uses a vision model (e.g. gpt-4o-mini). |
| POST |
postCreatorsThumbnailYoutube /creators/thumbnail/youtube |
Generates an engaging YouTube thumbnail (DALL·E). Provide the video title or idea. |
| Other endpoints | ||
| POST |
chatAvecMessageSysteme /chat |
Exemple avec un message system pour définir le comportement du modèle. |
| GET |
info / |
Racine de l'API : nom, description, liste des endpoints. |
| GET |
modelesMistral /models |
|
| GET |
health /health |
Healthcheck : status ok. |
AI Router API pricing
| Plan | Price | Rate limit | Quotas |
|---|---|---|---|
| BASIC | Free | — |
|
| PRO | $19.99 / month | 30 / minute |
|
| ULTRA Recommended | $79.99 / month | 120 / minute |
|
| MEGA | $149.99 / month | 500 / minute |
|