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

Phota Text to Image

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

ਮਾਡਲ id phota
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/phota?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://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

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

API ਕੁੰਜੀ ਲਵੋ
Open model ਟੈਕਸਟ ਤੋਂ ਚਿੱਤਰ 4K ਆਉਟਪੁੱਟ4K ਤੱਕ #stylized#transform#typography#phota

ਚੁਣੇ ਜਾ ਸਕਣ ਵਾਲੇ ਬੇਸ ਮਾਡਲ ਅਤੇ ਪ੍ਰੌਂਪਟ ਵਿੱਚ ਟ੍ਰੇਨ ਕੀਤੇ ਪਛਾਣ ਪ੍ਰੋਫ਼ਾਈਲਾਂ ਦੇ ਸਮਰਥਨ ਨਾਲ ਟੈਕਸਟ-ਤੋਂ-ਚਿੱਤਰ

Open model · ਚਿੱਤਰ

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

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

ਰਿਕਵੈਸਟ ਬਣਾਓ

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

•ਲੋੜੀਂਦਾ

ਚਿੱਤਰ-ਸਿਰਜਣਾ ਪ੍ਰੌਂਪਟ, ਜਿਸ ਵਿੱਚ ਖਾਸ ਪ੍ਰੋਫ਼ਾਈਲਾਂ ਨੂੰ [[profile_id_1]], [[profile_id_2]], ਆਦਿ ਨਾਲ ਦਰਸਾਇਆ ਜਾ ਸਕਦਾ ਹੈ; ਉਹ ਚਿੱਤਰ ਦਰਸਾਓ ਜੋ ਤੁਸੀਂ ਬਣਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ।

resolution ਡਿਫ਼ਾਲਟ 1K

ਤਿਆਰ ਕੀਤੇ ਚਿੱਤਰ ਲਈ ਵਰਤਿਆ ਜਾਣ ਵਾਲਾ ਰੈਜ਼ੋਲਿਊਸ਼ਨ।

aspect_ratio ਡਿਫ਼ਾਲਟ auto

ਆਉਟਪੁੱਟ ਚਿੱਤਰ ਦਾ ਚੌੜਾਈ-ਤੋਂ-ਉਚਾਈ ਅਨੁਪਾਤ।

num_images ਡਿਫ਼ਾਲਟ 1

ਤਿਆਰ ਕੀਤੇ ਜਾਣ ਵਾਲੇ ਚਿੱਤਰਾਂ ਦੀ ਗਿਣਤੀ।

ਉੱਨਤ output_format · base_model · enable_safety_checker
output_format ਡਿਫ਼ਾਲਟ jpeg

ਨਤੀਜੇ ਵਾਲੇ ਚਿੱਤਰ ਦਾ ਫ਼ਾਈਲ ਫਾਰਮੈਟ।

base_model ਡਿਫ਼ਾਲਟ nb2

ਰੈਂਡਰਿੰਗ ਮਾਡਲ ਚੋਣ, ਜਿਸ ਵਿੱਚ `4K` ਸਿਰਫ਼ `nb2` ਰਾਹੀਂ ਉਪਲਬਧ ਹੈ। ਪਛਾਣ ਪਰਤਾਂ ਚੁਣੇ ਹੋਏ ਬੇਸ ਮਾਡਲ ਉੱਤੇ ਲਾਗੂ ਹੁੰਦੀਆਂ ਹਨ, ਇਸ ਲਈ ਹਰ ਚੋਣ ਟ੍ਰੇਨ ਕੀਤੀਆਂ ਪ੍ਰੋਫ਼ਾਈਲਾਂ ਨਾਲ ਅਨੁਕੂਲ ਹੈ।

POST /run/phota?wait=20 ਕੋਟ → $0.09
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/phota?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://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

ਇਹ ਬੇਨਤੀ ਚਲਾਓ

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

Phota Text to Image ਬਾਰੇ

ਪ੍ਰੌਂਪਟ ਤੋਂ ਫ਼ੋਟੋਆਂ ਤਿਆਰ ਕਰਦਾ ਹੈ ਅਤੇ ਪ੍ਰੌਂਪਟ ਟੈਕਸਟ ਵਿੱਚ [[profile_id_1]] ਆਦਿ ਵਜੋਂ ਟ੍ਰੇਨ ਕੀਤੇ ਪ੍ਰੋਫ਼ਾਈਲਾਂ ਦਾ ਹਵਾਲਾ ਦੇ ਸਕਦਾ ਹੈ। `base_model` ਰੈਂਡਰਰ ਚੁਣਦਾ ਹੈ: nb2, qwen-image-2, flux-2 ਜਾਂ seedream-5-pro। `resolution` 1K ਜਾਂ 4K ਹੈ, ਪਰ 4K ਸਿਰਫ਼ nb2 'ਤੇ ਹੈ। ਆਸਪੈਕਟ ਰੇਸ਼ੋ auto, 1:1, 16:9, 4:3, 3:4 ਜਾਂ 9:16 ਹਨ, ਅਤੇ ਹਰ ਬੇਨਤੀ 'ਤੇ 1 ਤੋਂ 4 ਚਿੱਤਰ ਵਾਪਸ ਕੀਤੇ ਜਾਂਦੇ ਹਨ।

ਪੈਰਾਮੀਟਰ

ਕੈਨੋਨਿਕਲ ਨਾਮ ਜਾਂ ਨੇਟਿਵ ਨਾਮ ਵਿੱਚੋਂ ਕੋਈ ਇੱਕ ਭੇਜੋ, ਦੋਵੇਂ ਨਹੀਂ। ਕੈਨੋਨਿਕਲ ਨਾਮ

ਨਾਮਕਿਸਮ ਡਿਫ਼ਾਲਟਮਨਜ਼ੂਰਸ਼ੁਦਾ ਵੇਰਵਾ
promptਲੋੜੀਂਦਾ
ਕਿਸਮstring
ਚਿੱਤਰ-ਸਿਰਜਣਾ ਪ੍ਰੌਂਪਟ, ਜਿਸ ਵਿੱਚ ਖਾਸ ਪ੍ਰੋਫ਼ਾਈਲਾਂ ਨੂੰ [[profile_id_1]], [[profile_id_2]], ਆਦਿ ਨਾਲ ਦਰਸਾਇਆ ਜਾ ਸਕਦਾ ਹੈ; ਉਹ ਚਿੱਤਰ ਦਰਸਾਓ ਜੋ ਤੁਸੀਂ ਬਣਾਉਣਾ ਚਾਹੁੰਦੇ ਹੋ।
num_imagesਵਿਕਲਪਿਕ num_outputs
ਕਿਸਮinteger
ਡਿਫ਼ਾਲਟ1
1 – 4
ਤਿਆਰ ਕੀਤੇ ਜਾਣ ਵਾਲੇ ਚਿੱਤਰਾਂ ਦੀ ਗਿਣਤੀ।
output_formatਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟjpeg
jpegpng
ਨਤੀਜੇ ਵਾਲੇ ਚਿੱਤਰ ਦਾ ਫ਼ਾਈਲ ਫਾਰਮੈਟ।
resolutionਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟ1K
1K4K
ਤਿਆਰ ਕੀਤੇ ਚਿੱਤਰ ਲਈ ਵਰਤਿਆ ਜਾਣ ਵਾਲਾ ਰੈਜ਼ੋਲਿਊਸ਼ਨ।
aspect_ratioਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟauto
auto1:116:94:33:49:16
ਆਉਟਪੁੱਟ ਚਿੱਤਰ ਦਾ ਚੌੜਾਈ-ਤੋਂ-ਉਚਾਈ ਅਨੁਪਾਤ।
base_modelਵਿਕਲਪਿਕ
ਕਿਸਮenum
ਡਿਫ਼ਾਲਟnb2
nb2qwen-image-2flux-2seedream-5-pro
ਰੈਂਡਰਿੰਗ ਮਾਡਲ ਚੋਣ, ਜਿਸ ਵਿੱਚ `4K` ਸਿਰਫ਼ `nb2` ਰਾਹੀਂ ਉਪਲਬਧ ਹੈ। ਪਛਾਣ ਪਰਤਾਂ ਚੁਣੇ ਹੋਏ ਬੇਸ ਮਾਡਲ ਉੱਤੇ ਲਾਗੂ ਹੁੰਦੀਆਂ ਹਨ, ਇਸ ਲਈ ਹਰ ਚੋਣ ਟ੍ਰੇਨ ਕੀਤੀਆਂ ਪ੍ਰੋਫ਼ਾਈਲਾਂ ਨਾਲ ਅਨੁਕੂਲ ਹੈ।
enable_safety_checkerਵਿਕਲਪਿਕ
ਕਿਸਮboolean
ਡਿਫ਼ਾਲਟtrue
false ਸੈੱਟ ਕਰਕੇ ਸਕ੍ਰੀਨਿੰਗ ਨੂੰ ਢਿੱਲਾ ਕੀਤਾ ਜਾ ਸਕਦਾ ਹੈ, ਜੇ ਕਾਲਰ ਅਧਿਕਾਰਤ ਹੋਵੇ।
ਲੋੜੀਂਦਾ ਕੈਨੋਨਿਕਲ ਨਾਮ, ਇਹ ਵੀ ਸਵੀਕਾਰਿਆ ਜਾਂਦਾ ਹੈ

ਆਉਟਪੁੱਟ

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "phota",
  "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": 90,
    "usd": "0.09",
    "charged": 90,
    "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
      }
    ]
  },
  "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
ਤੁਹਾਡੀਆਂ ਫ਼ਾਈਲਾਂ, ਤੁਹਾਡੀ ਚੋਣਹਰ outputs[].url ਸਾਡੇ ਸਟੋਰੇਜ ਵਿੱਚ ਇੱਕ ਕਾਪੀ ਹੈ: ਹਮੇਸ਼ਾ ਲਈ ਰੱਖੀ ਜਾਂਦੀ ਹੈ (ਪ੍ਰਤੀ GB-ਮਹੀਨਾ ਭੁਗਤਾਨ) ਜਾਂ 7 ਦਿਨ ਤੱਕ ਮੁਫ਼ਤ, ਤੁਹਾਡੀ ਖਾਤਾ ਸੈਟਿੰਗ ਜਾਂ ?storage= ਅਨੁਸਾਰ।
ਹਰ ਮਾਡਲ ’ਤੇ ਇੱਕੋ ਜਿਹਾ ਰੂਪਤਸਵੀਰਾਂ, ਵੀਡੀਓ ਅਤੇ ਆਡੀਓ ਸਭ ਲਈ type, url, content_type, width, height ਅਤੇ duration। output ਮਾਡਲ ਦਾ ਆਪਣਾ ਨਤੀਜਾ ਆਬਜੈਕਟ ਹੈ।
ਆਉਟਪੁੱਟ ਦੇ ਫ਼ੀਲਡ
images
array of object {url, content_type, file_name, file_size, width, height}ਸਿਰਜੇ ਗਏ ਚਿੱਤਰ ਵੱਲ ਇਸ਼ਾਰਾ ਕਰਦਾ URL।

ਹੋਰ ਮਾਡਲ: ਟੈਕਸਟ ਤੋਂ ਚਿੱਤਰ

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