Pāriet uz saturu

Flux 2 Max

Integrēt

Modeļa id flux-2-max
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/flux-2-max?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Faili, piemēram, paraugā: 0,07 $ 70 API kredītu jūsu faili tiek izmērīti pirms izpildes Izpildīt šajā lapā

Iegūt API atslēgu
Black Forest Labs Teksts uz attēlu #flux2#max

Augstākās klases FLUX.2 modelis no teksta uz attēlu ar pielāgojamu drošības toleranci un jpeg vai png izvadi

Black Forest Labs · Attēls

Šeit būs jūsu pirmais rezultāts

Izveidojiet pieprasījumu tālāk un izpildiet to ar savu API atslēgu. Izvades tiek kopētas mūsu krātuvē un glabātas mūžīgi vai 7 dienas bez maksas.

Izveidot pieprasījumu

Vadīklas tiek ģenerētas no modeļa shēmas. Kods un cena tiek atjaunināti, kad tos maināt.

•obligāts

Uzvedne, kas vada attēla ģenerēšanu.

image_size noklusējums landscape_4_3

Ģenerētā attēla dimensijas.

Papildu safety_tolerance · output_format · seed · enable_safety_checker
safety_tolerance noklusējums 2

Ģenerētā attēla drošības iestatījums ar pielaides diapazonu: 5 nodrošina maksimālu pieļaujamību, bet 1 — maksimālu stingrību.

output_format noklusējums jpeg

Iegūtā attēla faila formāts.

Ģenerēšanas sēklas vērtība.

POST /run/flux-2-max?wait=20 cena → 0,07 $
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://vit.doitong.com/api/v1/run/flux-2-max?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://vit.doitong.com/api/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Palaist šo pieprasījumu

Jūsu atslēga paliek šajā pārlūkprogrammā: tā tiek nosūtīta tikai uz Doitong API un saglabāta (localStorage) tikai tad, ja atzīmējat Atcerēties. Iegūt API atslēgu

Par Flux 2 Max

Modelis no teksta uz attēlu, kas ģenerē attēlu no `prompt`, izmantojot vienu no sešiem izmēra sākotnējiem iestatījumiem; noklusējums ir landscape_4_3. Tas pieņem `seed` un `safety_tolerance` vērtību no 1 (stingrākā) līdz 5 (vispielaidīgākā). Izvade var būt jpeg (noklusējums) vai png. Soļu vai vadības parametri nav pieejami.

Parametri

NosaukumsTips NoklusējumsAtļauts Apraksts
promptobligāts
Tipsstring
Uzvedne, kas vada attēla ģenerēšanu.
image_sizeneobligāts
Tipsobject
Noklusējumslandscape_4_3
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Ģenerētā attēla dimensijas.
seedneobligāts
Tipsinteger | null
Ģenerēšanas sēklas vērtība.
safety_toleranceneobligāts
Tipsenum
Noklusējums2
12345
Ģenerētā attēla drošības iestatījums ar pielaides diapazonu: 5 nodrošina maksimālu pieļaujamību, bet 1 — maksimālu stingrību.
enable_safety_checkerneobligāts
Tipsboolean
Noklusējumstrue
Drošības pārbaudes slēdzis, kura izslēgtais stāvoklis tiek ņemts vērā tikai autorizētiem kontiem. Visiem pieprasījumiem bez šādas autorizācijas tiek veiktas drošības pārbaudes.
output_formatneobligāts
Tipsenum
Noklusējumsjpeg
jpegpng
Iegūtā attēla faila formāts.
obligāts

Izvade

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-2-max",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 70,
    "usd": "0.07",
    "charged": 70,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "seed": 42
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Jūsu faili, jūsu izvēleKatrs outputs[].url ir kopija mūsu krātuvē: tiek glabāta mūžīgi (maksa par GB mēnesī) vai 7 dienas bez maksas — atbilstoši konta iestatījumam vai ?storage=.
Vienāda struktūra katram modelimtype, url, content_type, width, height un duration gan attēliem, gan video un audio. output ir paša modeļa rezultāta objekts.
Izvades lauki
images
array of object {url, content_type, file_name, file_size, width, height}Modeļa ģenerētie attēli.
seed
integerĢenerēšanas laikā izmantotā sēklas vērtība.

Vairāk modeļu: Teksts uz attēlu

AI aģentiem: šī lapa Markdown formātā ir pieejama https://doitong.com/lv/developers/models/flux-2-max.md. Visi modeļi un ceļveži: https://doitong.com/developers/llms.txt