Lumaktaw sa nilalaman

Recraft 20b

I-integrate

ID ng modelo 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"

Kahilingang ito: $0.022 22 kredito ng API Patakbuhin ito sa page na ito

Kumuha ng API key
Recraft Text patungong Larawan #image-generation#vector-art#typograph#style

Text-to-image na modelo na may maraming mapipiling estilo, kabilang ang vector at digital illustration, at mga pahiwatig sa kulay

Recraft · Larawan

Dito mapupunta ang iyong unang resulta

Bumuo ng kahilingan sa ibaba at patakbuhin ito gamit ang iyong API key. Kinokopya ang mga output sa aming storage, na pinananatili nang walang hanggan o 7 araw nang libre.

Bumuo ng kahilingan

Ang mga control ay binubuo mula sa schema ng modelo. Nagbabago ang code at presyo habang ina-adjust mo ang mga ito.

•kinakailangan 88 / 1000
image_size default na square_hd
default na realistic_image

Visual style na inilalapat sa mga nabuong larawan.

advanced style_id · enable_safety_checker · colors

Opsyonal na identifier para sa custom style reference.

default na []

Array na naglalaman ng mga gustong kulay.

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

Patakbuhin ang kahilingang ito

Nananatili ang iyong key sa browser na ito: ipinapadala lamang ito sa Doitong API at sine-save (localStorage) lamang kung pipiliin mo ang Tandaan. Kumuha ng API key

Tungkol sa Recraft 20b

Bumubuo ng mga larawan mula sa prompt na hanggang 1000 character. Nag-aalok ang parameter na `style` ng mahabang listahan ng mga opsyon para sa realistic larawan, digital illustration at vector illustration, at tumutukoy ang `style_id` sa custom na estilo. Nagmumungkahi ang array na `colors` ng mga gustong kulay, at nag-aalok ang `image_size` ng square, portrait at landscape na preset.

Mga parameter

PangalanUri defaultPinapayagan Paglalarawan
promptkinakailangan
Uristring
≤ 1,000 character
image_sizeopsyonal
Uriobject
defaultsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
styleopsyonal
Urienum
defaultrealistic_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 padigital_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
Visual style na inilalapat sa mga nabuong larawan.
colorsopsyonal
Uriobject[]
default[]
Array na naglalaman ng mga gustong kulay.
colors[].ropsyonal
Uriinteger
default0
0 – 255
Value ng red component.
colors[].gopsyonal
Uriinteger
default0
0 – 255
Value ng green component.
colors[].bopsyonal
Uriinteger
default0
0 – 255
Value ng blue component.
style_idopsyonal
Uristring | null
Opsyonal na identifier para sa custom style reference.
enable_safety_checkeropsyonal
Uriboolean
defaultfalse
Switch para sa safety checking na nangangailangan ng authorization ng account kapag naka-off. Kung walang authorization na iyon, sinusuri ang bawat kahilingan anuman ang setting; ino-on ng true ang checker.
kinakailangan

Output

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"
  }
}
Ikaw ang pumipili para sa iyong mga fileAng bawat outputs[].url ay kopya sa aming storage: pinananatili nang walang hanggan (sinisingil bawat GB-month) o 7 araw nang libre, ayon sa setting ng iyong account o ?storage=.
Parehong shape sa bawat modelotype, url, content_type, width, height at duration, para sa mga larawan, video at audio. Ang output ay sariling result object ng modelo.
Mga field ng output
images
array of object {url, content_type, file_name, file_size}

Para sa mga AI agent: nasa Markdown ang pahinang ito sa https://doitong.com/fil/developers/models/recraft-20b.md. Lahat ng modelo at gabay: https://doitong.com/developers/llms.txt