Skip to content

Phota Text to Image

Integrate

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

This request: $0.09 90 API credits Run it on this page

Get API key
Open model Text to Image 4K outputup to 4K #stylized#transform#typography#phota

Text-to-image with selectable base model and support for trained identity profiles in the prompt

Open model · Image

Your first result goes here

Build a request below and run it with your API key. Outputs are copied to our storage, kept forever or 7 days for free.

Build a request

Controls are generated from the model schema. The code and the price update as you change them.

•required

Image-generation prompt in which specific profiles can be referenced with [[profile_id_1]], [[profile_id_2]], and so on; describe the image you want to create.

resolution default 1K

Resolution to use for the generated image.

aspect_ratio default auto

Width-to-height ratio for the output image.

num_images default 1

Count of images to produce.

Advanced output_format · base_model · enable_safety_checker
output_format default jpeg

File format for the resulting image.

base_model default nb2

Rendering model selection, with `4K` available only through `nb2`. Identity layers over any selected base model, making every choice compatible with trained profiles.

POST /run/phota?wait=20 quote → $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"

Run this request

Your key stays in this browser: it is sent only to the Doitong API and saved (localStorage) only if you tick Remember. Get an API key

About Phota Text to Image

Generates photographs from a prompt and can reference trained profiles in the prompt text as [[profile_id_1]] and so on. `base_model` picks the renderer: nb2, qwen-image-2, flux-2 or seedream-5-pro. `resolution` is 1K or 4K, with 4K only on nb2. Aspect ratios are auto, 1:1, 16:9, 4:3, 3:4 or 9:16, and 1 to 4 images are returned per call.

Parameters

Send either the canonical name or the native name, not both. Canonical names

NameType DefaultAllowed Description
promptrequired
Typestring
Image-generation prompt in which specific profiles can be referenced with [[profile_id_1]], [[profile_id_2]], and so on; describe the image you want to create.
num_imagesoptional num_outputs
Typeinteger
Default1
1 – 4
Count of images to produce.
output_formatoptional
Typeenum
Defaultjpeg
jpegpng
File format for the resulting image.
resolutionoptional
Typeenum
Default1K
1K4K
Resolution to use for the generated image.
aspect_ratiooptional
Typeenum
Defaultauto
auto1:116:94:33:49:16
Width-to-height ratio for the output image.
base_modeloptional
Typeenum
Defaultnb2
nb2qwen-image-2flux-2seedream-5-pro
Rendering model selection, with `4K` available only through `nb2`. Identity layers over any selected base model, making every choice compatible with trained profiles.
enable_safety_checkeroptional
Typeboolean
Defaulttrue
Screening can be relaxed by setting false, provided the caller is authorized.
required Canonical name, also accepted

Output

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"
  }
}
Your files, your choiceEvery outputs[].url is a copy on our storage: kept forever (paid per GB-month) or 7 days for free, by your account setting or ?storage=.
Same shape on every modeltype, url, content_type, width, height and duration, for images, video and audio alike. output is the model’s own result object.
Fields of output
images
array of object {url, content_type, file_name, file_size, width, height}URL pointing to the generated image.

More models: Text to Image

For AI agents: this page as Markdown is at https://doitong.com/en-US/developers/models/phota.md. All models and guides: https://doitong.com/developers/llms.txt