Neidio i'r cynnwys

Mai Image 2.5 Text to Image

Integreiddio

ID y model microsoft/mai-image-2.5
# 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/microsoft/mai-image-2.5?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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Ffeiliau fel yr enghraifft: $0.051 51 o gredydau API · ≈ ₽5.34 caiff eich ffeiliau eu mesur cyn y rhediad Ei redeg ar y dudalen hon

Cael allwedd API
Microsoft Testun i Ddelwedd #realism#typography#stylized

Testun-i-ddelwedd Microsoft MAI Image 2.5 safonol gyda theipograffeg a realaeth, hyd at 4 allbwn

Microsoft · 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 / 5000

Cyfarwyddiadau testun a ddefnyddir i gynhyrchu delwedd.

aspect_ratio rhagosodedig auto

Cyfrannau delwedd yr allbwn; mae dewis "auto" yn gadael i'r model eu dewis o'r anogiad.

num_images rhagosodedig 1

Cyfrif delweddau y gofynnir amdano ar gyfer cynhyrchu.

Uwch output_format
output_format rhagosodedig png

Fformat ffeil y ddelwedd sy'n deillio.

POST /run/microsoft/mai-image-2.5?wait=20 dyfynbris → $0.051
# 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/microsoft/mai-image-2.5?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.ru/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 â Mai Image 2.5 Text to Image

Yn creu delweddau o brydlun testun o hyd at 5000 nod. Cynhyrchwch 1 i 4 delwedd fesul cais, gosodwch `aspect_ratio` i auto neu un o saith cymhareb sefydlog, a derbyniwch jpeg, png neu webp. Yn gweithio ar ddelweddau realistig a steiliedig, gan gynnwys delweddau sy'n cynnwys testun.

Paramedrau

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

EnwMath RhagosodedigCaniateir Disgrifiad
promptgofynnol
Mathstring
≤ 5,000 nod≥ 3 nod
Cyfarwyddiadau testun a ddefnyddir i gynhyrchu delwedd.
num_imagesdewisol num_outputs
Mathinteger
Rhagosodedig1
1 – 4
Cyfrif delweddau y gofynnir amdano ar gyfer cynhyrchu.
aspect_ratiodewisol
Mathenum
Rhagosodedigauto
auto1:14:33:416:99:163:22:3
Cyfrannau delwedd yr allbwn; mae dewis "auto" yn gadael i'r model eu dewis o'r anogiad.
output_formatdewisol
Mathenum
Rhagosodedigpng
jpegpngwebp
Fformat ffeil y ddelwedd sy'n deillio.
gofynnol Enw canonaidd, derbyniol hefyd

Allbwn

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "microsoft/mai-image-2.5",
  "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": 51,
    "usd": "0.051",
    "charged": 51,
    "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
      }
    ],
    "description": "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"
  }
}
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.
description
stringDisgrifiad sy'n cyd-fynd â'r delweddau a gynhyrchir.

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/microsoft/mai-image-2.5.md. Pob model a chanllaw: https://doitong.com/developers/llms.txt