Neidio i'r cynnwys

Recraft 20b

Integreiddio

ID y model recraft-20b
# 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/recraft-20b?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"

Y cais hwn: $0.022 22 o gredydau API Ei redeg ar y dudalen hon

Cael allwedd API
Recraft Testun i Ddelwedd #image-generation#vector-art#typograph#style

Model testun-i-image gyda llawer o arddulliau dewisadwy, gan gynnwys darlunio fector a digidol, ac awgrymiadau lliw

Recraft · 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 / 1000
image_size rhagosodedig square_hd
rhagosodedig realistic_image

Arddull weledol a gymhwysir i’r delweddau a gynhyrchir.

Uwch style_id · enable_safety_checker · colors

Dynodwr dewisol ar gyfer cyfeirnod arddull personol.

rhagosodedig []

Arae sy’n cynnwys y lliwiau a ffefrir.

POST /run/recraft-20b?wait=20 dyfynbris → $0.022
# 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/recraft-20b?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"

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 â Recraft 20b

Yn cynhyrchu delweddau o anogiad hyd at 1000 nod. Mae'r paramedr `style` yn cynnig rhestr hir o opsiynau ar draws delweddau realistig, darlunio digidol a darlunio fector, ac mae `style_id` yn cyfeirio at arddull wedi'i theilwra. Mae arae `colors` yn awgrymu lliwiau dewisol, ac mae `image_size` yn cynnig rhagosodiadau sgwâr, portread a thirwedd.

Paramedrau

EnwMath RhagosodedigCaniateir Disgrifiad
promptgofynnol
Mathstring
≤ 1,000 nod
image_sizedewisol
Mathobject
Rhagosodedigsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
styledewisol
Mathenum
Rhagosodedigrealistic_image
anyrealistic_imagedigital_illustrationvector_illustrationrealistic_image/b_and_wrealistic_image/enterpriserealistic_image/hard_flashrealistic_image/hdrrealistic_image/motion_blurrealistic_image/natural_lightrealistic_image/studio_portraitdigital_illustration/2d_art_posterdigital_illustration/2d_art_poster_2digital_illustration/3ddigital_illustration/80sdigital_illustration/engraving_color
+21 yn rhagordigital_illustration/glowdigital_illustration/graindigital_illustration/hand_drawndigital_illustration/hand_drawn_outlinedigital_illustration/handmade_3ddigital_illustration/infantile_sketchdigital_illustration/kawaiidigital_illustration/pixel_artdigital_illustration/psychedelicdigital_illustration/seamlessdigital_illustration/voxeldigital_illustration/watercolorvector_illustration/cartoonvector_illustration/doodle_line_artvector_illustration/engravingvector_illustration/flat_2vector_illustration/kawaiivector_illustration/line_artvector_illustration/line_circuitvector_illustration/linocutvector_illustration/seamless
Arddull weledol a gymhwysir i’r delweddau a gynhyrchir.
colorsdewisol
Mathobject[]
Rhagosodedig[]
Arae sy’n cynnwys y lliwiau a ffefrir.
colors[].rdewisol
Mathinteger
Rhagosodedig0
0 – 255
Gwerth y gydran goch.
colors[].gdewisol
Mathinteger
Rhagosodedig0
0 – 255
Gwerth y gydran werdd.
colors[].bdewisol
Mathinteger
Rhagosodedig0
0 – 255
Gwerth y gydran las.
style_iddewisol
Mathstring | null
Dynodwr dewisol ar gyfer cyfeirnod arddull personol.
enable_safety_checkerdewisol
Mathboolean
Rhagosodedigfalse
Switsh gwirio diogelwch y mae ei osodiad diffodd yn gofyn am awdurdodiad cyfrif. Heb yr awdurdodiad hwnnw, caiff pob cais ei wirio waeth beth fo'r gosodiad; mae true yn galluogi'r gwiriwr.
gofynnol

Allbwn

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "recraft-20b",
  "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": 22,
    "usd": "0.022",
    "charged": 22,
    "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
      }
    ]
  },
  "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"
  }
}
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}

Ar gyfer asiantau AI: mae'r dudalen hon fel Markdown ar gael yn https://doitong.com/cy/developers/models/recraft-20b.md. Pob model a chanllaw: https://doitong.com/developers/llms.txt