Bỏ qua đến nội dung

FLUX.2 [dev]

Tích hợp

Id mô hình flux-2
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/flux-2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Ultra-stylized high-fashion editorial poster of a confident young Asian female model standing in the center frame, elegant pose, glossy radiant skin, soft dewy makeup, long silky black hair with wispy bangs, wearing modern trendy K-fashion streetwear with premium styling details. Clean studio lighting with high-contrast fashion flash photography, sharp focus, ultra-detailed textures, cinematic composition. Background filled with vibrant retro pop-art magazine aesthetics, layered graphic typography, dynamic UI-inspired design elements, holographic chrome effects, stickers (stars, hearts, sparkles), barcode strips, speech bubbles, and futuristic collage layering. Japanese and Korean-inspired typographic accents integrated as visual design elements. Overall mood combines nostalgic 2000s teen fashion magazine energy with modern luxury editorial campaign style. Bold color harmony, premium print aesthetic, ultra crisp details, fashion advertising quality, 8K resolution, highly polished commercial poster look, surreal yet stylish, trend-forward global fashion branding vibe."
  }'

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

Yêu cầu này: 0,012 $ 12 tín dụng API · ≈ 1,27 ₽ Chạy trên trang này

Lấy khóa API

Ví dụ

Đầu ra · ~12 s
Ultra-stylized high-fashion editorial poster of a confident young Asian female model standing in the center frame, el...

Lời nhắcUltra-stylized high-fashion editorial poster of a confident young Asian female model standing in the center frame, elegant pose, glossy radiant skin, soft dewy makeup, long silky black hair with wispy bangs, wearing modern trendy K-fashion streetwear with premium styling details. Clean studio lighting with high-contrast fashion flash photography, sharp focus, ultra-detailed textures, cinematic composition. Background filled with vibrant retro pop-art magazine aesthetics, layered graphic typography, dynamic UI-inspired design elements, holographic chrome effects, stickers (stars, hearts, sparkles), barcode strips, speech bubbles, and futuristic collage layering. Japanese and Korean-inspired typographic accents integrated as visual design elements. Overall mood combines nostalgic 2000s teen fashion magazine energy with modern luxury editorial campaign style. Bold color harmony, premium print aesthetic, ultra crisp details, fashion advertising quality, 8K resolution, highly polished commercial poster look, surreal yet stylish, trend-forward global fashion branding vibe.

0,012 $ · 12 tín dụng API

Lời nhắc từ @SadiaMalik182 trên X

Tạo một yêu cầu

Các điều khiển được tạo từ lược đồ mô hình. Mã và giá sẽ cập nhật khi bạn thay đổi chúng.

•bắt buộc

Lời nhắc định hướng việc tạo sinh hình ảnh.

image_size mặc định landscape_4_3

Kích thước hình ảnh đầu ra, giới hạn từ tối thiểu 512 đến tối đa 2048 pixel trên mỗi trục.

num_images mặc định 1

Số lượng hình ảnh yêu cầu tạo sinh.

Nâng cao acceleration · output_format · guidance_scale · num_inference_steps · seed · enable_prompt_expansion
acceleration mặc định regular

Thiết lập tăng tốc khi tạo sinh hình ảnh.

output_format mặc định png

Định dạng tệp của hình ảnh kết quả.

mặc định 2.5

Thiết lập mức độ tuân thủ lời nhắc khi mô hình tìm kiếm hình ảnh liên quan để hiển thị, được biểu thị dưới dạng scale hướng dẫn.

mặc định 28

Số bước suy luận cần chạy.

Ghi đè seed tạo sinh; bỏ qua tham số này để tạo sinh chọn seed ngẫu nhiên.

POST /run/flux-2?wait=20 báo giá → 0,012 $
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/flux-2?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Ultra-stylized high-fashion editorial poster of a confident young Asian female model standing in the center frame, elegant pose, glossy radiant skin, soft dewy makeup, long silky black hair with wispy bangs, wearing modern trendy K-fashion streetwear with premium styling details. Clean studio lighting with high-contrast fashion flash photography, sharp focus, ultra-detailed textures, cinematic composition. Background filled with vibrant retro pop-art magazine aesthetics, layered graphic typography, dynamic UI-inspired design elements, holographic chrome effects, stickers (stars, hearts, sparkles), barcode strips, speech bubbles, and futuristic collage layering. Japanese and Korean-inspired typographic accents integrated as visual design elements. Overall mood combines nostalgic 2000s teen fashion magazine energy with modern luxury editorial campaign style. Bold color harmony, premium print aesthetic, ultra crisp details, fashion advertising quality, 8K resolution, highly polished commercial poster look, surreal yet stylish, trend-forward global fashion branding vibe."
  }'

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

Chạy yêu cầu này

Key của bạn vẫn nằm trong trình duyệt này: key chỉ được gửi đến Doitong API và chỉ được lưu trong localStorage nếu bạn chọn Ghi nhớ. Nhận khóa API

Được tạo trên Doitong

Các tác phẩm công khai được cộng đồng Doitong tạo bằng Flux 2. Tái sử dụng một lời nhắc chỉ với một lần nhấp.

Tác phẩm công khai được hiển thị: 9
Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lemb...

Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi...

Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lemb...

Close-up portrait seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi...

Prompt Details Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut ...

Prompt Details Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi...

Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikel...

Seorang wanita berkulit pucat berdiri setengah tubuh di dalam air berwarna lembut kebiruan, dikelilingi bunga teratai berkelopak penuh yang bermekaran indah di permukaan air. Rambutnya pirang pucat tersanggul longgar dengan beberapa helaian tipis jatuh alami membingkai sisi wajahnya. Ia memeluk...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat men...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat menggemaskan dengan mata cokelat besar yang ekspresif, rambut hitam berantakan yang tebal, mengenakan kaus putih kerah henley. Dia berpose dengan kedua tangan terkatup di depan dada, menunjukkan senyum...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat men...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat menggemaskan dengan mata cokelat besar yang ekspresif, rambut hitam berantakan yang tebal, mengenakan kaus putih kerah henley. Dia berpose dengan kedua tangan terkatup di depan dada, menunjukkan senyum...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat men...

​"Potret sinematik ultra-realistis close-up seorang anak laki-laki kecil (balita) yang sangat menggemaskan dengan mata cokelat besar yang ekspresif, rambut hitam berantakan yang tebal, mengenakan kaus putih kerah henley. Dia berpose dengan kedua tangan terkatup di depan dada, menunjukkan senyum...

Foto sinematik hiper-realistis resolusi tinggi menampilkan seorang pria muda Indonesia dengan tub...

Foto sinematik hiper-realistis resolusi tinggi menampilkan seorang pria muda Indonesia dengan tubuh ramping dan proporsional, rambut hitam pendek agak acak, mengenakan jaket kulit hitam, celana riding fit, dan sepatu motor. Ia sedang melakukan aksi freestyle ekstrem dengan motor sport 500cc...

Giới thiệu về FLUX.2 [dev]

Thành viên dùng trọng số mở của dòng mô hình FLUX.2. So với FLUX.1, mô hình giữ các hướng dẫn về bố cục, vật liệu và ánh sáng đáng tin cậy hơn, đồng thời có thể tùy chọn mở rộng lời nhắc ngắn trước khi vẽ. Chọn kích thước thiết lập sẵn hoặc tùy chỉnh, 4 đến 50 bước lấy mẫu và tối đa bốn hình ảnh mỗi yêu cầu; đầu ra PNG, JPEG hoặc WebP.

Tham số

Gửi tên chuẩn hoặc tên gốc, không gửi cả hai. Tên chuẩn

TênKiểu Mặc địnhĐược phép Mô tả
promptbắt buộc
Kiểustring
Lời nhắc định hướng việc tạo sinh hình ảnh.
guidance_scaletùy chọn
Kiểunumber
Mặc định2.5
0 – 20
Thiết lập mức độ tuân thủ lời nhắc khi mô hình tìm kiếm hình ảnh liên quan để hiển thị, được biểu thị dưới dạng scale hướng dẫn.
seedtùy chọn
Kiểuinteger | null
Ghi đè seed tạo sinh; bỏ qua tham số này để tạo sinh chọn seed ngẫu nhiên.
num_inference_stepstùy chọn
Kiểuinteger
Mặc định28
4 – 50
Số bước suy luận cần chạy.
image_sizetùy chọn
Kiểuobject
Mặc địnhlandscape_4_3
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
Kích thước hình ảnh đầu ra, giới hạn từ tối thiểu 512 đến tối đa 2048 pixel trên mỗi trục.
num_imagestùy chọn num_outputs
Kiểuinteger
Mặc định1
1 – 4
Số lượng hình ảnh yêu cầu tạo sinh.
accelerationtùy chọn
Kiểuenum
Mặc địnhregular
noneregularhigh
Thiết lập tăng tốc khi tạo sinh hình ảnh.
enable_prompt_expansiontùy chọn
Kiểuboolean
Mặc địnhfalse
Tự động tăng cường lời nhắc: true bật mở rộng lời nhắc để cải thiện kết quả.
output_formattùy chọn
Kiểuenum
Mặc địnhpng
jpegpngwebp
Định dạng tệp của hình ảnh kết quả.
bắt buộc Tên chuẩn, cũng được chấp nhận

Đầu ra

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-2",
  "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": 12,
    "usd": "0.012",
    "charged": 12,
    "refunded": 0
  },
  "input": {
    "prompt": "Dutch angle close-up of a mountain climber at dawn, frost on the beard, dramatic rim light, gritty realism",
    "image_size": "landscape_16_9"
  },
  "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
      }
    ],
    "timings": {},
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string"
  },
  "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://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Tệp của bạn, lựa chọn của bạnMỗi outputs[].url là một bản sao trên bộ lưu trữ của chúng tôi: được giữ vĩnh viễn (tính phí theo GB-tháng) hoặc 7 ngày miễn phí, theo cài đặt tài khoản hoặc ?storage=.
Cùng một cấu trúc trên mọi mô hìnhtype, url, content_type, width, height và duration cho hình ảnh, video và âm thanh. output là đối tượng kết quả riêng của mô hình.
Các trường đầu ra
images
array of object {url, content_type, file_name, file_size, width, height}Các hình ảnh được mô hình tạo sinh.
timings
object
seed
integerSeed tạo sinh hình ảnh, bao gồm giá trị được chọn ngẫu nhiên nếu đầu vào không cung cấp seed; nếu không, lặp lại giá trị đã cung cấp.
has_nsfw_concepts
array of booleanCho biết các khái niệm NSFW có xuất hiện trong hình ảnh được tạo sinh hay không.
prompt
stringLời nhắc được sử dụng trong quá trình tạo sinh hình ảnh.

Thêm mô hình: Văn bản sang hình ảnh

Dành cho tác nhân AI: trang này ở dạng Markdown tại https://doitong.com/vi/developers/models/flux-2.md. Tất cả mô hình và hướng dẫn: https://doitong.com/developers/llms.txt