flux-kontext-max API
Generate and edit context-aware images with Black Forest Labs’ higher-quality FLUX Kontext model on APISea.
flux-kontext-maxتسعير API لنموذج flux-kontext-max
جميع الأسعار بالدولار الأمريكي (USD). مقارنة أسعار APISea بالسعر الرسمي المعلن للوحدة نفسها.
| الخيار | APISea | رسمي | وفّر |
|---|---|---|---|
| افتراضيافتراضي | $0.0704 | $0.08 | −12% |
الأسعار لكل صورة.
ما هو flux-kontext-max؟
Black Forest Labs’ flux-kontext-max is the higher-quality option in the FLUX Kontext image generation and editing lineup. Use it to generate images from text descriptions or apply prompt-directed edits to reference images. It accepts publicly accessible image URLs and Base64 inputs, with support for up to four reference images. Outputs are available in PNG, JPEG, or WebP, with aspect-ratio controls for square, landscape, portrait, and wider formats.
On APISea, submit requests to POST /v1/images/generations using your API key and model ID. Processing is asynchronous: the API returns a task ID that you poll to retrieve the generated image. Controls include a seed for reproducible output, optional prompt rewriting, and optional moderation before submission. APISea Default pricing is $0.0704 per image, about 12% below the provider list price of $0.08 per image. Access is pay-as-you-go, with billing only for successful requests.
أبرز مزايا flux-kontext-max
Generation and editing
Generate images from text alone or provide reference images for context-aware editing. The documentation identifies this model as the higher-quality FLUX Kontext option.
Multiple reference inputs
Supply up to four reference images through publicly accessible URLs or Base64 input. The output plus all references must stay within 9 MP total.
Aspect ratio controls
Choose from nine supported aspect ratios or use automatic mode to follow a reference image’s ratio. Output encoding options include PNG, JPEG, and WebP.
Reproducible generation controls
Reuse the same seed and parameters for reproducible output. Optional prompt upsampling can enhance and rewrite your prompt before generation.
كيفية استدعاء API الخاص بـ flux-kontext-max في 4 خطوات
- 01
احصل على API key
سجّل الدخول إلى APISea، واشحن رصيدك بدءًا من $50، وأنشئ مفتاح sk-sea من وحدة التحكم.
- 02
اضبط عنوان URL الأساسي
استخدم https://api.apisea.ai/v1 عنوانًا أساسيًا في SDK أو عميل HTTP.
- 03
أرسل الطلب
استدعِ POST /v1/images/generations مع "model": "flux-kontext-max" والمعلمات أدناه.
- 04
تعامل مع الاستجابة
تتضمن الاستجابة task_id. أرسل طلبات GET /v1/tasks/{task_id} دوريًا حتى تصبح الحالة completed، ثم نزّل روابط النتائج.
أمثلة على الطلبات
الوثائق: FLUX Kontext Image Generation and Editingcurl --request POST \
--url https://api.apisea.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "flux-kontext-max",
"prompt": "Change the hair color to blue",
"image_urls": ["https://example.com/portrait.jpg"],
"size": "1:1",
"output_format": "png"
}'المعلمات
| المعلمة | النوع | مطلوب | افتراضي | الوصف |
|---|---|---|---|---|
model | string | مطلوب | — | Model name: |
nsfw_check | boolean | اختياري | false | Whether to run content moderation before submitting the image task. |
prompt | string | مطلوب | — | Text description of the image to generate or the edit to apply to the reference images. |
image_urls | array | اختياري | — | Reference images for image editing. Publicly accessible image URLs and Base64 input are supported. |
size | string | اختياري | 1:1 | Output aspect ratio. A pixel string such as `1024x1536` is also accepted, but Kontext maps it to the closest supported ratio rather than producing those exact pixel dimensions. Supported aspect ratios and automatic mode: |
output_format | string | اختياري | png | Output image encoding. Supported values: `png`, `jpeg`, and `webp`. |
response_format | string | اختياري | — | OpenAI-compatible response-shape field. It accepts only `url` or `b64_json` and does not change the image encoding. When both fields are supplied, `output_format` takes priority. |
n | integer | اختياري | 1 | Number of images generated per task. The only supported value is `1`; submit multiple tasks concurrently if you need multiple images. |
seed | integer | اختياري | — | Random seed. Reuse the same seed and parameters for reproducible output; omit it to use a random seed. |
prompt_upsampling | boolean | اختياري | false | Whether to enhance and rewrite the prompt before generation. |
safety_tolerance | integer | اختياري | 2 | Safety tolerance from `0` to `6`. Higher values are more permissive. |
ما الذي يمكنك إنشاؤه باستخدام flux-kontext-max
Text-to-image tools
Build an interface that turns user descriptions into generated images, with selectable aspect ratios and output encodings.
Reference-based editing
Let users upload reference images and describe the edits they want, then submit the inputs together in an image-editing task.
Creative review workflows
Generate candidate images as separate tasks for team review. Record prompts, seeds, and parameters so selected configurations can be reused.
Format-aware image workflows
Offer square, portrait, landscape, and ultra-wide output choices for different layout needs, or follow a reference image’s aspect ratio with automatic mode.
نصائح للحصول على نتائج أفضل
- 01
Submit, then poll
Store the task ID returned by POST /v1/images/generations and poll GET /v1/tasks/{task_id} for the result. Do not expect the submission response to contain the finished image.
- 02
Use aspect ratios
Control output shape with the size parameter; pixel strings map to the closest supported ratio. Do not send width or height, and do not rely on resolution to increase output size.
- 03
Keep prompts controlled
Set prompt_upsampling explicitly to false when you do not want prompt rewriting. Save the seed alongside the full parameter set when reproducibility matters.
- 04
Budget separate tasks
Only one image is supported per task, so submit multiple tasks concurrently when you need several images. Budget at the APISea Default price of $0.0704 per image.
القيود ومعلومات مهمة
Each task supports one output image and at most four reference images, with output and references totaling no more than 9 MP.
Outputs remain approximately 1 MP; width and height cause task failure, while resolution has no effect.
Reference URLs must be publicly accessible; hotlink protection, permissions, or expired signatures can cause dependency errors.
الأسئلة الشائعة حول API الخاص بـ flux-kontext-max
How much does flux-kontext-max cost on APISea?
APISea Default pricing is $0.0704 per image, compared with the provider list price of $0.08 per image. The default configuration is about 12% below list price, with pay-as-you-go billing only for successful requests.
How do I call flux-kontext-max through the API?
Use Bearer Token authentication and POST to https://api.apisea.ai/v1/images/generations with the model field set to flux-kontext-max and a required prompt. The response returns a task ID; poll GET /v1/tasks/{task_id} to retrieve the result.
Does flux-kontext-max support image editing?
Yes. Provide reference images in image_urls and describe the edit in the prompt; publicly accessible URLs and Base64 inputs are supported. Without reference images, the model supports text-to-image generation.
Which output sizes and formats are supported?
The model supports nine aspect ratios plus automatic mode, with output remaining approximately 1 MP. Use output_format to choose PNG, JPEG, or WebP; response_format accepts url or b64_json but does not change the encoding.
How does flux-kontext-max compare with flux-kontext-pro?
The documentation describes flux-kontext-max as higher-quality context-aware image generation and editing, while flux-kontext-pro is described as general-purpose. Both support text-to-image generation and editing with reference images.
Can I use flux-kontext-max images commercially?
Commercial use is subject to the provider’s terms. The supplied API documentation does not specify licensing rights, so review Black Forest Labs’ applicable terms before using outputs commercially.
نماذج ذات صلة
flux-2-flex
flux-2-max
flux-2-pro
flux-3-image
flux-3-image-klein
flux-kontext-pro
qwen-image-2.0
qwen-image-2.0-pro
ابدأ التطوير باستخدام flux-kontext-max
مفتاح واحد، وادفع حسب الاستخدام بدءًا من $50؛ ولا تُحتسب الرسوم إلا على الطلبات الناجحة.