[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107638":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":15,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":16,"rankGlobal":10,"rankLanguage":10,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":10,"pushedAt":31,"updatedAt":32,"readmeContent":33,"aiSummary":34,"trendingCount":13,"starSnapshotCount":13,"syncStatus":35,"lastSyncTime":36,"discoverSource":37},107638,"flux2-api-fr","a60au8\u002Fflux2-api-fr","a60au8","FLUX 2 Pro API (`flux-2-pro`): model id, pricing, parameters and copy-paste examples for the OpenAI-compatible APIMart endpoint.","https:\u002F\u002Fgo.apimart.ai\u002Fk-453c7f",null,"Python",77,0,63,8,40.8,"Other",false,"main",true,[22,23,24,25,26,27,28,29,30],"ai-api-gateway","ai-image-api","apimart","flux2","flux2-api","image-api","image-editing","image-generation","text-to-image","2026-10-16 08:29:57","2026-11-04 12:21:49","# FLUX 2 Pro API (`flux-2-pro`)\n\n\u003C!-- conv-kit:v1 -->\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fbadges\u002Fprice.svg\" alt=\"observed unit price\"> \u003Cimg src=\"assets\u002Fbadges\u002Fbilling.svg\" alt=\"billing model\"> \u003Cimg src=\"assets\u002Fbadges\u002Fcompat.svg\" alt=\"OpenAI-compatible endpoint\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002F01-product-hero-perfume.jpg\" width=\"820\" alt=\"Sample render via the APIMart image API\">\n\u003C\u002Fp>\n\n> **from $0.024 per image** (1MP $0.024 · 2MP $0.036 · 3MP $0.048) — un seul endpoint compatible OpenAI sur `https:\u002F\u002Fapi.apimart.ai\u002Fv1`, sans abonnement mensuel. *(relevé le 2026-10-12)*\n\n**[Obtenir une clé API](https:\u002F\u002Fgo.apimart.ai\u002Fk-df210d)** · **[Tarifs en direct](https:\u002F\u002Fgo.apimart.ai\u002Fk-c552a8)** · **[Page du modèle](https:\u002F\u002Fgo.apimart.ai\u002Fk-453c7f)** · [⚡ Démarrage en 60 secondes](#quickstart)\n\n**Pourquoi les équipes passent par APIMart pour FLUX 2 Pro (`flux-2-pro`)**\n\n- **Une clé, tout le catalogue.** La même base URL `https:\u002F\u002Fapi.apimart.ai\u002Fv1` et le même en-tête `Authorization` donnent accès à FLUX 2 Pro (`flux-2-pro`) et à plus de 300 autres modèles d'image, de vidéo et de langage — changez le champ `model`, pas votre client.\n- **$1 minimum, paiement à l'usage.** Ni abonnement ni forfait prépayé à dimensionner à l'avance : rechargez à partir de $1 et consommez-le en appels.\n- **Le montant revient dans la réponse.** Chaque tâche terminée indique le montant facturé (`cost` \u002F `credits_cost`) ; une tâche marquée `failed` est remboursée.\n- **Asynchrone par conception.** Soumettez, récupérez le `task_id`, interrogez `GET \u002Fv1\u002Ftasks\u002F{id}` — le traitement par lots et les retries relèvent d'une file d'attente ordinaire, pas d'une intégration sur mesure.\n\n\u003C!-- \u002Fconv-kit:v1 -->\n\n\n\nFLUX 2 Pro by Black Forest Labs generates images from text or references, priced per megapixel by output size.\n\n## Model id and routes\n\n| Route | `model` value | Billing | Notes |\n| --- | --- | --- | --- |\n| Per-image | `flux-2-pro` | per delivered image, by resolution | see the [model page](https:\u002F\u002Fgo.apimart.ai\u002Fk-453c7f) for the exact tiers |\n\nEndpoint: `POST https:\u002F\u002Fapi.apimart.ai\u002Fv1\u002Fimages\u002Fgenerations`, then poll `GET \u002Fv1\u002Ftasks\u002F{task_id}`.\n\n## Pricing\n\n\u003C!-- pricing:model:start -->\n| Output | List price | Effective price |\n| --- | --- | --- |\n| 1MP | 0.03 | 0.024 |\n| 2MP | 0.045 | 0.036 |\n| 3MP | 0.06 | 0.048 |\n| 4MP | 0.075 | 0.06 |\n\n\n\u003C!-- pricing:model:end -->\n\nPrices are a snapshot; the [pricing page](https:\u002F\u002Fgo.apimart.ai\u002Fk-c552a8) and [`data\u002Fmodel.json`](data\u002Fmodel.json) are refreshed by CI, and a completed task reports the exact amount in its `cost` field.\n\n## Request parameters\n\n| Field | Type | Default | Notes |\n| --- | --- | --- | --- |\n| `model` | string | required | the model id shown in the route table above |\n| `prompt` | string | required | what to generate, or what to change when editing |\n| `size` | string | `auto` \u002F `1:1` | aspect ratio, or `auto` where the route supports it |\n| `resolution` | string | `1K` | output resolution tier — cost scales with it |\n| `n` | integer | `1` | number of images per task, where the route allows more than one |\n| `image_urls` | string[] | — | reference images as public HTTP(S) URLs or base64 data URLs |\n| `nsfw_check` | boolean | `false` | runs `omni-moderation-latest` before submitting |\n\nThe table lists the fields accepted by the APIMart `images\u002Fgenerations` endpoint. Check the [model page](https:\u002F\u002Fgo.apimart.ai\u002Fk-453c7f) for anything this model adds on top.\n\n## Quickstart\n\n```bash\ncurl --request POST --url https:\u002F\u002Fapi.apimart.ai\u002Fv1\u002Fimages\u002Fgenerations \\\n  --header \"Authorization: Bearer $APIMART_API_KEY\" --header 'Content-Type: application\u002Fjson' \\\n  -d '{\"model\":\"flux-2-pro\",\"prompt\":\"A bamboo forest at sunrise, slow push-in\",\"size\":\"1:1\",\"resolution\":\"1K\"}'\n```\n\n```python\nimport os, time, requests\n\nBASE = \"https:\u002F\u002Fapi.apimart.ai\u002Fv1\"\nHEADERS = {\"Authorization\": f\"Bearer {os.environ['APIMART_API_KEY']}\", \"Content-Type\": \"application\u002Fjson\"}\n\ncreated = requests.post(f\"{BASE}\u002Fimages\u002Fgenerations\", headers=HEADERS, timeout=60, json={\n    \"model\": \"flux-2-pro\", \"prompt\": \"A bamboo forest at sunrise, slow push-in\",\n}).json()\ntask_id = created[\"data\"][\"id\"]\n\nwhile True:\n    task = requests.get(f\"{BASE}\u002Ftasks\u002F{task_id}\", headers=HEADERS, timeout=60).json()[\"data\"]\n    if task[\"status\"] in (\"completed\", \"failed\"):\n        break\n    time.sleep(5)\nprint(task.get(\"cost\"), task[\"result\"][\"images\"][0][\"url\"])\n```\n\nRunnable versions: [`examples\u002F`](examples). The task lifecycle is `pending → processing → completed | failed`.\n\n## FAQ\n\n**Quel est l'id du modèle FLUX 2 Pro ?**\n\n`flux-2-pro`. Voir le tableau des routes ci-dessus.\n\n**Comment la facturation fonctionne-t-elle ?**\n\n**from $0.024 per image** (1MP $0.024 · 2MP $0.036 · 3MP $0.048). La tâche terminée indique le montant exact dans son champ `cost` ; une tâche échouée est remboursée.\n\n**How do I get a key?**\n\nUse the [Get an API key](https:\u002F\u002Fgo.apimart.ai\u002Fk-df210d) link — $1 minimum top-up, no plan required.\n\n\u003C!-- related-repos:auto -->\n## Related repositories\n\n- **Same model, this language** — the other half of this pair: [flux2-prompts-fr](https:\u002F\u002Fgithub.com\u002Fa60au8\u002Fflux2-prompts-fr)\n- **Same model, other languages** — 9 more language builds: 中文 [flux2-api-cn](https:\u002F\u002Fgithub.com\u002Fdnh5k54bukj\u002Fflux2-api-cn) · Deutsch [flux2-api-de](https:\u002F\u002Fgithub.com\u002Fjpblmt-we\u002Fflux2-api-de) · Español [flux2-api-es](https:\u002F\u002Fgithub.com\u002Fmy9x83cvrem\u002Fflux2-api-es) · Relay\u002Fgateway [flux2-api-gateway](https:\u002F\u002Fgithub.com\u002Fh16wl2hk2jsr5\u002Fflux2-api-gateway) · Bahasa [flux2-api-id](https:\u002F\u002Fgithub.com\u002Firble1yxvm4\u002Fflux2-api-id) · 日本語 [flux2-api-ja](https:\u002F\u002Fgithub.com\u002Fzbrg4-to41d4s\u002Fflux2-api-ja) · 한국어 [flux2-api-ko](https:\u002F\u002Fgithub.com\u002Frcqfbdzxruljzj\u002Fflux2-api-ko) · Português [flux2-api-pt](https:\u002F\u002Fgithub.com\u002Foegn4hjpzdou\u002Fflux2-api-pt) · Русский [flux2-api-ru](https:\u002F\u002Fgithub.com\u002Fx621qovt\u002Fflux2-api-ru)\n- **More models in this language** — [midjourney-api-fr](https:\u002F\u002Fgithub.com\u002Fapimartt1q\u002Fmidjourney-api-fr) · [gemini-2-5-flash-image-preview-api-fr](https:\u002F\u002Fgithub.com\u002Fhaftslut7ha\u002Fgemini-2-5-flash-image-preview-api-fr) · [nano-banana-api-fr](https:\u002F\u002Fgithub.com\u002Ff84q06w110\u002Fnano-banana-api-fr) · [gemini-3-1-flash-image-preview-api-fr](https:\u002F\u002Fgithub.com\u002Fok71ckyc\u002Fgemini-3-1-flash-image-preview-api-fr) · [nano-banana-2-api-fr](https:\u002F\u002Fgithub.com\u002Fms0p12t\u002Fnano-banana-2-api-fr) · [gemini-3-pro-image-preview-api-fr](https:\u002F\u002Fgithub.com\u002Fw-44vba\u002Fgemini-3-pro-image-preview-api-fr)\n- **Topic hubs** — every build of this model, all languages: [flux2](https:\u002F\u002Fgithub.com\u002Ftopics\u002Fflux2) · [flux2-api](https:\u002F\u002Fgithub.com\u002Ftopics\u002Fflux2-api)\n\nThis repository is one build in a cross-linked set of API guides for the same model family; each language build links back to the others.\n\u003C!-- \u002Frelated-repos:auto -->\n\n## Attributed links (how this repository is measured)\n\n| Purpose | Attributed link | Target |\n| --- | --- | --- |\n| Model page | \u003Chttps:\u002F\u002Fgo.apimart.ai\u002Fk-453c7f> | `apimart.ai\u002Ffr\u002Fmodel\u002Fflux-2` |\n| Live pricing | \u003Chttps:\u002F\u002Fgo.apimart.ai\u002Fk-c552a8> | `apimart.ai\u002Ffr\u002Fpricing` |\n| Get an API key | \u003Chttps:\u002F\u002Fgo.apimart.ai\u002Fk-df210d> | `apimart.ai\u002Ffr\u002Fkeys` |\n\nOutbound APIMart links are minted through the promo link API; hand-made tracking parameters are rejected by\n`tools\u002Fcheck_links.py` in CI.\n\n## Disclosure\n\nFLUX 2 Pro is a third-party model served through APIMart; this repository documents how to call it and publishes\nmodel ids and prices, and does not claim official status. Model names, prices and documentation belong to their\nrespective owners.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","这是一个为 FLUX 2 Pro 图像生成模型提供的 OpenAI 兼容 API 接口封装项目，聚焦于简化调用流程与计费透明化。核心功能包括：统一 endpoint（\u002Fv1\u002Fimages\u002Fgenerations）支持文本生成图像（text-to-image）和图像编辑，按输出分辨率（1MP–4MP）阶梯计价，异步任务提交与轮询机制，以及单 API Key 接入 APIMart 平台全部 300+ 多模态模型的能力。技术特点涵盖 OpenAI 标准请求格式兼容、实时成本返回（cost 字段）、无订阅制按量付费、自动重试队列管理。适用于需要快速集成高性价比文生图能力的中小型应用、MVP 开发、自动化内容生成及多模型 A\u002FB 测试等轻量级生产场景。",2,"2026-11-24 04:32:28","CREATED_QUERY"]