ਸਮੱਗਰੀ ਵੱਲ ਜਾਓ

FLUX 2 Trainer

ਇੰਟੀਗ੍ਰੇਟ ਕਰੋ

ਮਾਡਲ id flux-2-trainer
# 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-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# 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"

ਇਹ ਬੇਨਤੀ: $6.40 6,400 API ਕ੍ਰੈਡਿਟ ਇਸ ਪੰਨੇ ’ਤੇ ਚਲਾਓ

API ਕੁੰਜੀ ਲਵੋ
Black Forest Labs ਟ੍ਰੇਨਿੰਗ

ਤਸਵੀਰਾਂ ਦੀ zip ਤੋਂ FLUX.2 [dev] ਸ਼ੈਲੀ ਵਾਲੀ LoRA ਨੂੰ ਟ੍ਰੇਨ ਕਰਦਾ ਹੈ, ਵੱਧ ਤੋਂ ਵੱਧ 10,000 ਸਟੈਪਾਂ ਨਾਲ

Black Forest Labs · ਫ਼ਾਈਲ

ਤੁਹਾਡਾ ਪਹਿਲਾ ਨਤੀਜਾ ਇੱਥੇ ਹੋਵੇਗਾ

ਹੇਠਾਂ ਬੇਨਤੀ ਬਣਾਓ ਅਤੇ ਆਪਣੀ API ਕੁੰਜੀ ਨਾਲ ਚਲਾਓ। ਆਉਟਪੁੱਟ ਸਾਡੇ ਸਟੋਰੇਜ ਵਿੱਚ ਕਾਪੀ ਕੀਤੇ ਜਾਂਦੇ ਹਨ ਅਤੇ ਹਮੇਸ਼ਾ ਲਈ ਜਾਂ ਮੁਫ਼ਤ ਵਿੱਚ 7 ਦਿਨ ਤੱਕ ਰੱਖੇ ਜਾਂਦੇ ਹਨ।

ਰਿਕਵੈਸਟ ਬਣਾਓ

ਕੰਟਰੋਲ ਮਾਡਲ ਸਕੀਮਾ ਤੋਂ ਤਿਆਰ ਹੁੰਦੇ ਹਨ। ਤੁਸੀਂ ਬਦਲਾਅ ਕਰਦੇ ਹੀ ਕੋਡ ਅਤੇ ਕੀਮਤ ਅੱਪਡੇਟ ਹੋ ਜਾਂਦੇ ਹਨ।

•ਲੋੜੀਂਦਾ

ਸ਼ੈਲੀ ਪੱਖੋਂ ਇਕਸਾਰ ਚਿੱਤਰਾਂ ਦੇ zip ਆਰਕਾਈਵ ਦਾ URL; ਘੱਟੋ-ਘੱਟ 10 ਦੀ ਸਿਫ਼ਾਰਸ਼ ਕੀਤੀ ਜਾਂਦੀ ਹੈ ਅਤੇ ਵੱਡੇ ਸੈੱਟ ਬਿਹਤਰ ਹਨ। ਹਰ ਚਿੱਤਰ ਜੋੜੇ ਲਈ ਸੰਪਾਦਨ ਨਿਰਦੇਸ਼ ROOT.txt ਨਾਮ ਵਾਲੀ ਮਿਲਦੀ-ਜੁਲਦੀ ਟੈਕਸਟ ਫ਼ਾਈਲ, ਜਿਵੇਂ photo.txt, ਵਿੱਚ ਦਿੱਤੇ ਜਾ ਸਕਦੇ ਹਨ। ਗੁੰਮ ਟੈਕਸਟ ਫ਼ਾਈਲਾਂ default_caption 'ਤੇ ਵਾਪਸ ਜਾਂਦੀਆਂ ਹਨ; ਜੇ ਇਹ ਵੀ ਮੌਜੂਦ ਨਾ ਹੋਵੇ ਤਾਂ ਟ੍ਰੇਨਿੰਗ ਅਸਫਲ ਹੋ ਜਾਂਦੀ ਹੈ।

ਡਿਫ਼ਾਲਟ 1000

ਟ੍ਰੇਨਿੰਗ ਲਈ ਕੁੱਲ ਕਦਮਾਂ ਦੀ ਗਿਣਤੀ।

ਉੱਨਤ default_caption · learning_rate

ਗੁੰਮ ਕੈਪਸ਼ਨ ਫ਼ਾਈਲਾਂ ਦੀ ਥਾਂ ਵਰਤੀ ਜਾਣ ਵਾਲੀ ਕੈਪਸ਼ਨ; ਇਸਦੀ ਬਜਾਏ None ਕਰਨ ਨਾਲ ਉਹਨਾਂ ਦੀ ਗੈਰਹਾਜ਼ਰੀ ਨੂੰ ਗਲਤੀ ਬਣਾਇਆ ਜਾਂਦਾ ਹੈ।

ਡਿਫ਼ਾਲਟ 5.0e-05

ਟ੍ਰੇਨ ਕੀਤੇ ਜਾ ਸਕਣ ਵਾਲੇ ਪੈਰਾਮੀਟਰਾਂ ਲਈ ਵਰਤੀ ਜਾਣ ਵਾਲੀ ਲਰਨਿੰਗ ਰੇਟ।

POST /run/flux-2-trainer?wait=20 ਕੋਟ → $6.40
# 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-trainer?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  }'

# 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"

ਇਹ ਬੇਨਤੀ ਚਲਾਓ

ਤੁਹਾਡੀ key ਇਸ ਬ੍ਰਾਊਜ਼ਰ ਵਿੱਚ ਰਹਿੰਦੀ ਹੈ: ਇਹ ਸਿਰਫ਼ Doitong API ਨੂੰ ਭੇਜੀ ਜਾਂਦੀ ਹੈ ਅਤੇ ਸਿਰਫ਼ ਤਾਂ ਹੀ (localStorage) ਵਿੱਚ ਸੁਰੱਖਿਅਤ ਹੁੰਦੀ ਹੈ ਜੇ ਤੁਸੀਂ Remember ਚੁਣੋ। API ਕੁੰਜੀ ਪ੍ਰਾਪਤ ਕਰੋ

FLUX 2 Trainer ਬਾਰੇ

`image_data_url` ਵਜੋਂ ਦਿੱਤੇ ਗਏ ਇੱਕੋ ਜਿਹੀ ਸ਼ੈਲੀ ਵਾਲੀਆਂ ਤਸਵੀਰਾਂ ਦੇ zip ਆਰਕਾਈਵ 'ਤੇ LoRA ਨੂੰ ਫ਼ਾਈਨ-ਟਿਊਨ ਕਰਦਾ ਹੈ। ਘੱਟੋ-ਘੱਟ 10 ਤਸਵੀਰਾਂ ਸੁਝਾਈਆਂ ਜਾਂਦੀਆਂ ਹਨ ਅਤੇ ਹਰ ਤਸਵੀਰ ਨਾਲ ਮੇਲ ਖਾਂਦੀ ਕੈਪਸ਼ਨ ਟੈਕਸਟ ਫ਼ਾਈਲ ਹੋ ਸਕਦੀ ਹੈ। `steps` 100 ਤੋਂ 10000 ਤੱਕ ਹੁੰਦਾ ਹੈ ਅਤੇ ਕੈਪਸ਼ਨ ਨਾ ਹੋਣ 'ਤੇ `default_caption` ਵਰਤਿਆ ਜਾਂਦਾ ਹੈ। LoRA ਵਜ਼ਨ ਅਤੇ ਕਨਫ਼ਿਗ ਫ਼ਾਈਲ ਵਾਪਸ ਕਰਦਾ ਹੈ।

ਪੈਰਾਮੀਟਰ

ਨਾਮਕਿਸਮ ਡਿਫ਼ਾਲਟਮਨਜ਼ੂਰਸ਼ੁਦਾ ਵੇਰਵਾ
image_data_urlਲੋੜੀਂਦਾ
ਕਿਸਮstring
ਸ਼ੈਲੀ ਪੱਖੋਂ ਇਕਸਾਰ ਚਿੱਤਰਾਂ ਦੇ zip ਆਰਕਾਈਵ ਦਾ URL; ਘੱਟੋ-ਘੱਟ 10 ਦੀ ਸਿਫ਼ਾਰਸ਼ ਕੀਤੀ ਜਾਂਦੀ ਹੈ ਅਤੇ ਵੱਡੇ ਸੈੱਟ ਬਿਹਤਰ ਹਨ। ਹਰ ਚਿੱਤਰ ਜੋੜੇ ਲਈ ਸੰਪਾਦਨ ਨਿਰਦੇਸ਼ ROOT.txt ਨਾਮ ਵਾਲੀ ਮਿਲਦੀ-ਜੁਲਦੀ ਟੈਕਸਟ ਫ਼ਾਈਲ, ਜਿਵੇਂ photo.txt, ਵਿੱਚ ਦਿੱਤੇ ਜਾ ਸਕਦੇ ਹਨ। ਗੁੰਮ ਟੈਕਸਟ ਫ਼ਾਈਲਾਂ default_caption 'ਤੇ ਵਾਪਸ ਜਾਂਦੀਆਂ ਹਨ; ਜੇ ਇਹ ਵੀ ਮੌਜੂਦ ਨਾ ਹੋਵੇ ਤਾਂ ਟ੍ਰੇਨਿੰਗ ਅਸਫਲ ਹੋ ਜਾਂਦੀ ਹੈ।
stepsਵਿਕਲਪਿਕ
ਕਿਸਮinteger
ਡਿਫ਼ਾਲਟ1000
100 – 10,000
ਟ੍ਰੇਨਿੰਗ ਲਈ ਕੁੱਲ ਕਦਮਾਂ ਦੀ ਗਿਣਤੀ।
learning_rateਵਿਕਲਪਿਕ
ਕਿਸਮnumber
ਡਿਫ਼ਾਲਟ5.0e-05
ਟ੍ਰੇਨ ਕੀਤੇ ਜਾ ਸਕਣ ਵਾਲੇ ਪੈਰਾਮੀਟਰਾਂ ਲਈ ਵਰਤੀ ਜਾਣ ਵਾਲੀ ਲਰਨਿੰਗ ਰੇਟ।
default_captionਵਿਕਲਪਿਕ
ਕਿਸਮstring | null
ਗੁੰਮ ਕੈਪਸ਼ਨ ਫ਼ਾਈਲਾਂ ਦੀ ਥਾਂ ਵਰਤੀ ਜਾਣ ਵਾਲੀ ਕੈਪਸ਼ਨ; ਇਸਦੀ ਬਜਾਏ None ਕਰਨ ਨਾਲ ਉਹਨਾਂ ਦੀ ਗੈਰਹਾਜ਼ਰੀ ਨੂੰ ਗਲਤੀ ਬਣਾਇਆ ਜਾਂਦਾ ਹੈ।
ਲੋੜੀਂਦਾ

ਆਉਟਪੁੱਟ

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "flux-2-trainer",
  "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": 6400,
    "usd": "6.40",
    "charged": 6400,
    "refunded": 0
  },
  "input": {
    "image_data_url": "https://content.doitong.com/images/showcase/v3/gen_fox_cartoon.jpg"
  },
  "output": {
    "diffusers_lora_file": {
      "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
    },
    "config_file": {
      "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
    }
  },
  "outputs": [
    {
      "type": "file",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "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"
  }
}
ਤੁਹਾਡੀਆਂ ਫ਼ਾਈਲਾਂ, ਤੁਹਾਡੀ ਚੋਣਹਰ outputs[].url ਸਾਡੇ ਸਟੋਰੇਜ ਵਿੱਚ ਇੱਕ ਕਾਪੀ ਹੈ: ਹਮੇਸ਼ਾ ਲਈ ਰੱਖੀ ਜਾਂਦੀ ਹੈ (ਪ੍ਰਤੀ GB-ਮਹੀਨਾ ਭੁਗਤਾਨ) ਜਾਂ 7 ਦਿਨ ਤੱਕ ਮੁਫ਼ਤ, ਤੁਹਾਡੀ ਖਾਤਾ ਸੈਟਿੰਗ ਜਾਂ ?storage= ਅਨੁਸਾਰ।
ਹਰ ਮਾਡਲ ’ਤੇ ਇੱਕੋ ਜਿਹਾ ਰੂਪਤਸਵੀਰਾਂ, ਵੀਡੀਓ ਅਤੇ ਆਡੀਓ ਸਭ ਲਈ type, url, content_type, width, height ਅਤੇ duration। output ਮਾਡਲ ਦਾ ਆਪਣਾ ਨਤੀਜਾ ਆਬਜੈਕਟ ਹੈ।
ਆਉਟਪੁੱਟ ਦੇ ਫ਼ੀਲਡ
diffusers_lora_file
object {url, content_type, file_name, file_size}diffusers ਫਾਰਮੈਟ ਵਿੱਚ ਟ੍ਰੇਨ ਕੀਤੇ LoRA ਵਜ਼ਨਾਂ ਵੱਲ ਇਸ਼ਾਰਾ ਕਰਦਾ URL।
config_file
object {url, content_type, file_name, file_size}ਟ੍ਰੇਨ ਕੀਤੇ ਮਾਡਲ ਦੀ ਕਨਫ਼ਿਗਰੇਸ਼ਨ ਫ਼ਾਈਲ ਵੱਲ ਇਸ਼ਾਰਾ ਕਰਦਾ URL।

ਹੋਰ ਮਾਡਲ: ਟ੍ਰੇਨਿੰਗ

AI ਏਜੰਟਾਂ ਲਈ: ਇਹ ਪੰਨਾ Markdown ਵਜੋਂ ਇੱਥੇ ਹੈ https://doitong.com/pa/developers/models/flux-2-trainer.md. ਸਾਰੇ ਮਾਡਲ ਅਤੇ ਗਾਈਡ: https://doitong.com/developers/llms.txt