# Flux Flux Kontext Pro — Text To Image > Access flux kontext image capabilities with FLUX-Kontext-Pro. This 1M-token LLM excels at deep document reasoning and multimodal analysis on GPTProto.com. ## Overview - **Endpoint**: `POST https://gptproto.com/v1/images/generations` - **Model ID**: `flux-kontext-pro` - **Vendor**: Flux - **Scene**: `text-to-image` - **Category**: text-to-image - **Modalities**: input text → output image - **Model page**: https://gptproto.com/model/flux/flux-kontext-pro/text-to-image - **API documentation**: https://docs.gptproto.com - **Other scenes of this model**: `image-edit` — same auth, different endpoint path and input schema ## Authentication Every request needs a GPTProto API key. Create one at https://gptproto.com/dashboard/api-key, then export it: ```bash export GPTPROTO_API_KEY="your-api-key" ``` Header: `Authorization: Bearer YOUR_API_KEY`. ## Pricing Platform price by tier (USD, already includes the GPTProto discount): - **Per run** — $0.032 per run Price range: $0.032 – $0.032 per generation. Prices may change. The model page always shows the live price: https://gptproto.com/model/flux/flux-kontext-pro/text-to-image ## API Information The examples below use this model's official request format from the model page. Copy them as-is and replace the API key placeholder. ### Input Schema The accepted JSON body is the official request shape below: **Full Example**: ```json { "prompt": "cat with a red hat", "model": "flux-kontext-pro", "size": "16:9", "n": 1 } ``` ## Usage Examples ### 1. Submit a request ```bash curl --request POST "https://gptproto.com/v1/images/generations" \ --header "Authorization: Bearer YOUR_API_KEY" \ --header "Content-Type: application/json" \ --data '{ "prompt": "cat with a red hat", "model": "flux-kontext-pro", "size": "16:9", "n": 1 }' ``` ```python import os import requests url = "https://gptproto.com/v1/images/generations" headers = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" } payload = { "prompt": "cat with a red hat", "model": "flux-kontext-pro", "size": "16:9", "n": 1 } response = requests.request("POST", url, headers=headers, json=payload) print(response.json()) ``` ```typescript const response = await fetch("https://gptproto.com/v1/images/generations", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ prompt: "cat with a red hat", model: "flux-kontext-pro", size: "16:9", n: 1, }), }); const data = await response.json(); console.log(data); ``` ## Example Prompts - An elderly couple with white hair, wearing cozy sweaters, holding hands and leaning on each other on a park bench in autumn, watching the sunset. The afterglow of the sunset paints their silhouettes in gold, with a path covered in fallen leaves in the background. The scene is tou… - Professional DSLR photo of a cute corgi dog sitting on a park bench in autumn, with a few maple leaves scattered around. Sunlight comes from the side, creating a warm rim light. The background is a blurry forest with a shallow depth of field. photorealistic, 4k, sharp focus. - A grand steampunk airship soaring through the sky, with intricate brass and copper details, large propellers spinning, and a massive balloon filled with hot air. The airship is adorned with Victorian-style architecture, featuring ornate railings and decorative elements. The sky i… ## HTTP Status Codes - `400` — malformed body, a parameter or value this model does not accept, or input blocked by the provider's content moderation - `401` — missing or invalid API key - `403` — insufficient credits - `413` — request body too large - `429` — rate limited; retry with backoff - `500` — An internal server error occurred - `502` — An internal server error occurred - `504` — Gateway timeout — upstream service did not respond in time; retry later ## Additional Resources - [Model page](https://gptproto.com/model/flux/flux-kontext-pro/text-to-image) - [API documentation](https://docs.gptproto.com) - [All models](https://gptproto.com/model) - [API keys](https://gptproto.com/dashboard/api-key) - [Platform overview for LLMs](https://gptproto.com/llm-full.txt) - Any other model: `https://gptproto.com/model/{vendor}/{model}/{scene}/llms.txt`