Neidio i'r cynnwys

Kling Image · O3 · Text to Image

Integreiddio

ID y model kling-image/o3/text-to-image
# 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/kling-image/o3/text-to-image?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"

Y cais hwn: $0.028 28 o gredydau API Ei redeg ar y dudalen hon

Cael allwedd API
Kling Testun i Ddelwedd Allbwn 4KMewnbynnau cyfeiriohyd at 4K #text-to-image

Testun-i-ddelwedd O3 ar 1K, 2K neu 4K, gyda rheolaeth wyneb ar sail elfennau ac allbwn cyfres

Kling · Delwedd

Mae eich canlyniad cyntaf yn mynd yma

Adeiladwch gais isod a'i redeg gyda'ch allwedd API. Mae allbynnau'n cael eu copïo i'n storio, wedi'u cadw am byth neu am 7 diwrnod am ddim.

Adeiladu cais

Cynhyrchir rheolyddion o sgema'r model. Mae'r cod a'r pris yn diweddaru wrth i chi eu newid.

•gofynnol 88 / 2500

Anogiad cynhyrchu delwedd â therfyn o 2500 nod.

resolution rhagosodedig 1K

Cydraniad y ddelwedd allbwn: 1K ar gyfer safonol, 2K ar gyfer uchel, neu 4K ar gyfer cydraniad uwch-uchel.

aspect_ratio rhagosodedig 16:9

Cymhareb lled-i-uchder ar gyfer delweddau a gynhyrchir.

num_images rhagosodedig 1

Nifer y delweddau allbwn, o 1 i 9; yn berthnasol dim ond os yw `result_type` yn `single`.

Uwch result_type · output_format · series_amount · enable_safety_checker · elements
result_type rhagosodedig single

Math allbwn: mae `single` yn cynhyrchu un ddelwedd, tra bo `series` yn cynhyrchu delweddau cysylltiedig lluosog.

output_format rhagosodedig png

Fformat ffeil y ddelwedd sy'n deillio.

Nifer delweddau’r gyfres, o 2 i 9; yn berthnasol dim ond os yw `result_type` yn `series`.

Elfennau rheoli wyneb dewisol sy'n cynrychioli cymeriadau neu wrthrychau, y cyfeirir atynt yn yr anogiad gan @Element1, @Element2, ac ati.

POST /run/kling-image/o3/text-to-image?wait=20 dyfynbris → $0.028
# 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/kling-image/o3/text-to-image?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"

Rhedeg y cais hwn

Mae'ch allwedd yn aros yn y porwr hwn: caiff ei hanfon at Doitong API yn unig a'i chadw (localStorage) dim ond os ticiwch Cofio. Cael allwedd API

Ynglŷn â Kling Image · O3 · Text to Image

Yn creu delweddau o anogiad hyd at 2500 nod. Mae `resolution` yn 1K, 2K neu 4K, ac mae `aspect_ratio` yn cefnogi 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 a 21:9. Cynhyrchwch 1-9 delwedd, neu gyfres o 2-9 delwedd gysylltiedig gyda `result_type`. Mae `elements` yn rhoi rheolaeth wyneb ar gyfer cymeriadau a gwrthrychau.

Paramedrau

Anfonwch naill ai'r enw canonaidd neu'r enw brodorol, nid y ddau. Enwau canonaidd

EnwMath RhagosodedigCaniateir Disgrifiad
promptgofynnol
Mathstring
≤ 2,500 nod
Anogiad cynhyrchu delwedd â therfyn o 2500 nod.
elementsdewisol
Mathobject[]
Elfennau rheoli wyneb dewisol sy'n cynrychioli cymeriadau neu wrthrychau, y cyfeirir atynt yn yr anogiad gan @Element1, @Element2, ac ati.
elements[].frontal_image_urldewisol
Mathurl · image
Delwedd ddewisol sy'n wynebu'r camera ac sy'n darparu prif olygfa'r elfen. Ni chaiff maint y ffeil fod yn fwy na 10.0 MB; rhaid i'r lled a'r uchder fod o leiaf 300px yr un, gyda chymhareb agwedd rhwng 0.40 a 2.50.
elements[].reference_image_urlsdewisol
Mathurl[] · image
Set ddewisol o 0–3 delwedd ychwanegol sy'n dangos onglau eraill. Ni chaiff unrhyw ffeil fod yn fwy na 10.0 MB, gyda lled ac uchder o leiaf 300px a chymhareb agwedd rhwng 0.40 a 2.50.
resolutiondewisol
Mathenum
Rhagosodedig1K
1K2K4K
Cydraniad y ddelwedd allbwn: 1K ar gyfer safonol, 2K ar gyfer uchel, neu 4K ar gyfer cydraniad uwch-uchel.
result_typedewisol
Mathenum
Rhagosodedigsingle
singleseries
Math allbwn: mae `single` yn cynhyrchu un ddelwedd, tra bo `series` yn cynhyrchu delweddau cysylltiedig lluosog.
num_imagesdewisol num_outputs
Mathinteger
Rhagosodedig1
1 – 9
Nifer y delweddau allbwn, o 1 i 9; yn berthnasol dim ond os yw `result_type` yn `single`.
series_amountdewisol
Mathinteger | null
2 – 9
Nifer delweddau’r gyfres, o 2 i 9; yn berthnasol dim ond os yw `result_type` yn `series`.
aspect_ratiodewisol
Mathenum
Rhagosodedig16:9
16:99:161:14:33:43:22:321:9
Cymhareb lled-i-uchder ar gyfer delweddau a gynhyrchir.
output_formatdewisol
Mathenum
Rhagosodedigpng
jpegpngwebp
Fformat ffeil y ddelwedd sy'n deillio.
enable_safety_checkerdewisol
Mathboolean
Rhagosodedigtrue
Gellir llacio'r sgrinio drwy osod false, ar yr amod bod y galwr wedi'i awdurdodi.
gofynnol Enw canonaidd, derbyniol hefyd

Allbwn

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "kling-image/o3/text-to-image",
  "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": 28,
    "usd": "0.028",
    "charged": 28,
    "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://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://vit.doitong.com/api/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Eich ffeiliau, eich dewisMae pob outputs[].url yn gopi ar ein storio: wedi'i gadw am byth (telir fesul GB-mis) neu am 7 diwrnod am ddim, yn ôl gosodiad eich cyfrif neu ?storage=.
Yr un siâp ar bob modeltype, url, content_type, width, height a duration, ar gyfer delweddau, fideo a sain fel ei gilydd. Gwrthrych canlyniad y model ei hun yw output.
Meysydd yr allbwn
images
array of object {url, content_type, file_name, file_size, width, height}Delweddau a gynhyrchir gan y model.

Mwy o fodelau: Testun i Ddelwedd

Ar gyfer asiantau AI: mae'r dudalen hon fel Markdown ar gael yn https://doitong.com/cy/developers/models/kling-image/o3/text-to-image.md. Pob model a chanllaw: https://doitong.com/developers/llms.txt