Skip to content
ეს გვერდი ჯერ თქვენს ენაზე ხელმისაწვდომი არ არის და ინგლისურად არის ნაჩვენები.
Black Forest Labs · FLUX

flux-2-flex API

Generate images from text or references with adjustable sampling steps and guidance on APISea.

სურათების გენერაციასურათიასინქრონული ამოცანა
მოდელის ID
flux-2-flex

flux-2-flex API-ის ფასები

ყველა ფასი USD-შია. APISea-ის ტარიფები შედარებულია იმავე ერთეულისთვის დადგენილ ოფიციალურ ფასებთან.

პარამეტრიAPISeaოფიციალურიდაზოგვა
1MP$0.044$0.05−12%
2MP$0.088$0.10−12%
3MP$0.132$0.15−12%
4MP$0.176$0.20−12%

ფასები მოცემულია თითო სურათზე-ზე.

რა არის flux-2-flex?

flux-2-flex is Black Forest Labs’ FLUX model for fine-grained image generation on APISea. It supports text-to-image generation and reference-image generation, letting developers describe a new image or specify edits to supplied references. Adjustable sampling steps and prompt guidance give teams control over detail, generation time, and how closely the output follows the prompt. Inputs can include publicly accessible image URLs or Base64 images; outputs support JPEG, PNG, and WebP, with resolution presets from 1MP to 4MP and configurable aspect ratios.

Submit a generation request to APISea and receive a task ID, then poll the task endpoint for the generated image. APISea provides one API key and an OpenAI-compatible base URL at https://api.apisea.ai/v1. Billing is pay-as-you-go and applies only to successful requests. Prices are $0.044 per image at 1MP, $0.088 per image at 2MP, $0.132 per image at 3MP, and $0.176 per image at 4MP. The default configuration is about 12% below the provider list price.

flux-2-flex-ის მთავარი მახასიათებლები

Fine-Grained Generation Controls

Set sampling steps from 1 to 50 and guidance from 1.5 to 10. Higher steps can improve detail but take longer; higher guidance follows the prompt more closely.

Text and Reference Inputs

Generate from a text prompt or provide up to eight reference images using public URLs or Base64 input. The prompt can describe the image to create or edits to apply.

Flexible Output Sizing

Choose 1MP, 2MP, 3MP, or 4MP presets with supported aspect ratios, or specify exact pixel dimensions. With references, the auto size option follows the reference image aspect ratio.

Reproducible Image Generation

Reuse the same seed and parameters for reproducible output. Export generated images as JPEG, PNG, or WebP.

როგორ გამოვიძახოთ flux-2-flex API 4 ნაბიჯში

  1. 01

    მიიღეთ API გასაღები

    შედით APISea-ში, შეავსეთ ბალანსი $50-დან და კონსოლში შექმენით sk-sea გასაღები.

  2. 02

    დააყენეთ საბაზისო URL

    თქვენს SDK-ში ან HTTP კლიენტში საბაზისო URL-ად გამოიყენეთ https://api.apisea.ai/v1.

  3. 03

    გაგზავნეთ მოთხოვნა

    გამოიძახეთ POST /v1/images/generations პარამეტრებით "model": "flux-2-flex" და ქვემოთ ჩამოთვლილი პარამეტრებით.

  4. 04

    დაამუშავეთ პასუხი

    პასუხი შეიცავს task_id-ს. მოითხოვეთ GET /v1/tasks/{task_id} განმეორებით, სანამ სტატუსი completed გახდება, შემდეგ კი ჩამოტვირთეთ შედეგის URL-ებიდან.

მოთხოვნის მაგალითები

დოკუმენტაცია: FLUX.2 Image Generation
curl --request POST \
  --url https://api.apisea.ai/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "flux-2-flex",
    "prompt": "A blue cat sitting on the grass",
    "resolution": "2MP",
    "size": "16:9",
    "output_format": "jpeg"
  }'

პარამეტრები

პარამეტრიტიპისავალდებულონაგულისხმევიაღწერა
modelstringსავალდებულო—Model name:
nsfw_checkbooleanარასავალდებულოfalseWhether to run content moderation before submitting the image task.
promptstringსავალდებულო—Text description of the image to generate or the edit to apply to the reference images.
resolutionstringარასავალდებულო2MPOutput resolution preset. Supported values:
sizestringარასავალდებულო1:1Output aspect ratio or pixel dimensions.
widthintegerარასავალდებულო—Exact output width in pixels. It must be provided together with `height`, and each dimension must be at least 64 pixels. Supplying only one dimension causes the task to fail.
heightintegerარასავალდებულო—Exact output height in pixels. It must be provided together with `width`, and each dimension must be at least 64 pixels. Supplying only one dimension causes the task to fail.
image_urlsarrayარასავალდებულო—Reference images for image-to-image generation. Publicly accessible image URLs and Base64 input are supported.
output_formatstringარასავალდებულოjpegOutput image encoding. Supported values: `jpeg`, `png`, and `webp`.
nintegerარასავალდებულო1Number of images generated per task. The only supported value is `1`; submit multiple tasks concurrently if you need multiple images.
seedintegerარასავალდებულო—Random seed. Reuse the same seed and parameters for reproducible output; omit it to use a random seed.
prompt_upsamplingbooleanარასავალდებულოfalseWhether to enhance and rewrite the prompt before generation. The default is `false`. Pass `false` explicitly to disable prompt rewriting.
safety_toleranceintegerარასავალდებულო2Safety tolerance from `0` to `5`. Higher values are more permissive.
stepsintegerარასავალდებულო50Sampling steps from `1` to `50`. Higher values can improve detail but take longer.
guidancenumberარასავალდებულო5.0Prompt guidance from `1.5` to `10`. Higher values follow the prompt more closely.

რისი შექმნა შეგიძლიათ flux-2-flex-ით

Creative Concept Exploration

Build a tool that generates visual concepts from briefs, then adjusts steps and guidance to explore detail and prompt adherence.

Reference-Based Editing

Let users supply reference images and describe edits in a prompt, with outputs sized to follow the reference aspect ratio.

Multi-Format Visual Assets

Generate images for square, portrait, and landscape placements using supported aspect ratios and resolution presets.

Controlled Prompt Testing

Create a testing workflow that reuses seeds and holds parameters constant while evaluating prompt changes.

რჩევები უკეთესი შედეგებისთვის

  • 01

    Start With Explicit Controls

    The defaults are 50 steps and 5.0 guidance. Try fewer steps when generation time matters, and increase guidance when closer prompt adherence is needed.

  • 02

    Choose Resolution Deliberately

    The default resolution is 2MP at $0.088 per image. Choose 1MP at $0.044 per image when that output tier meets your needs.

  • 03

    Preserve Your Prompt

    Pass prompt_upsampling as false explicitly to disable prompt rewriting. Reuse the same seed and parameters when you need reproducible output.

  • 04

    Plan for Task Polling

    Store the task ID returned by the generation request and poll the task endpoint for the image. For multiple images, submit multiple tasks concurrently rather than increasing n.

შეზღუდვები და გასათვალისწინებელი საკითხები

  • Each task supports only one generated image; n must be 1.

  • Reference input is limited to eight images, and output plus references must not exceed 9 MP in total.

  • Exact width and height must both be supplied, each at least 64 pixels, with output no larger than 4,194,304 pixels.

flux-2-flex API-ის ხშირად დასმული კითხვები

How much does flux-2-flex cost on APISea?

APISea pricing is $0.044 per image at 1MP, $0.088 per image at 2MP, $0.132 per image at 3MP, and $0.176 per image at 4MP. The default configuration is about 12% below the provider list price, and only successful requests are billed.

How do I call flux-2-flex through the API?

Send a POST request to https://api.apisea.ai/v1/images/generations with Bearer Token authentication, model set to flux-2-flex, and a required prompt. The API returns a task ID; poll the task endpoint to retrieve the generated image.

Which generation controls does flux-2-flex support?

It supports steps from 1 to 50, guidance from 1.5 to 10, a seed, prompt upsampling, output sizing, and JPEG, PNG, or WebP encoding. Steps default to 50 and guidance defaults to 5.0.

Can flux-2-flex use reference images, and what are the limits?

Yes, it accepts up to eight reference images through publicly accessible URLs or Base64 input. Output is limited to 4,194,304 pixels, and the output plus all reference images must not exceed 9 MP in total.

Can I use flux-2-flex images commercially?

Commercial use is subject to the provider's terms. Review Black Forest Labs’ applicable terms before using generated images in a commercial product or campaign.

How does flux-2-flex compare with flux-2-pro and flux-2-max?

flux-2-flex provides adjustable sampling steps and guidance for fine-grained generation; those parameters are not supported by flux-2-pro or flux-2-max. The documentation describes flux-2-pro as balanced for quality and speed, and flux-2-max as the highest-quality FLUX.2 model for maximum detail.

მსგავსი მოდელები

Black Forest Labsსურათი

flux-2-max

სურათების გენერაცია
$0.088 თითო სურათზე
ოფიციალურ ფასზე 12%-ით ნაკლები
Black Forest Labsსურათი

flux-2-pro

სურათების გენერაცია
$0.0264 თითო სურათზე
ოფიციალურ ფასზე 12%-ით ნაკლები
Black Forest Labsსურათი

flux-3-image

სურათების გენერაცია
$0.04224 თითო სურათზე
ოფიციალურ ფასზე 12%-ით ნაკლები
Black Forest Labsსურათი

flux-3-image-klein

სურათების გენერაცია
$0.00792 თითო სურათზე
ოფიციალურ ფასზე 12%-ით ნაკლები
Black Forest Labsსურათი

flux-kontext-max

სურათების გენერაცია
$0.0704 თითო სურათზე
ოფიციალურ ფასზე 12%-ით ნაკლები
Black Forest Labsსურათი

flux-kontext-pro

სურათების გენერაცია
$0.0352 თითო სურათზე
ოფიციალურ ფასზე 12%-ით ნაკლები
Alibabaსურათი

qwen-image-2.0

სურათების გენერაცია
$0.022 თითო სურათზე
ოფიციალურ ფასზე 37%-ით ნაკლები
Alibabaსურათი

qwen-image-2.0-pro

სურათების გენერაცია
$0.055 თითო სურათზე
ოფიციალურ ფასზე 27%-ით ნაკლები
არჩევანი: 250+ მოდელი · მინიმალური შევსება $50

დაიწყეთ flux-2-flex-ით შექმნა

ერთი გასაღები, გამოყენების მიხედვით გადახდა $50-დან; თანხა ჩამოგეჭრებათ მხოლოდ წარმატებული მოთხოვნებისთვის.