Pāriet uz saturu

Recraft 20b

Integrēt

Modeļa id recraft-20b
# 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/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Šis pieprasījums: 0,022 $ 22 API kredīti · ≈ 2,32 ₽ Izpildīt šajā lapā

Iegūt API atslēgu
Recraft Teksts uz attēlu #image-generation#vector-art#typograph#style

Teksta-attēla modelis ar daudziem izvēlamiem stiliem, tostarp vektoru un digitālo ilustrāciju, kā arī krāsu norādēm

Recraft · Attēls

Šeit būs jūsu pirmais rezultāts

Izveidojiet pieprasījumu tālāk un izpildiet to ar savu API atslēgu. Izvades tiek kopētas mūsu krātuvē un glabātas mūžīgi vai 7 dienas bez maksas.

Izveidot pieprasījumu

Vadīklas tiek ģenerētas no modeļa shēmas. Kods un cena tiek atjaunināti, kad tos maināt.

•obligāts 88 / 1000
image_size noklusējums square_hd
noklusējums realistic_image

Ģenerētajiem attēliem lietotais vizuālais stils.

Papildu style_id · enable_safety_checker · colors

Neobligāts pielāgota stila atsauces identifikators.

noklusējums []

Masīvs ar vēlamajām krāsām.

POST /run/recraft-20b?wait=20 cena → 0,022 $
# 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/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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Palaist šo pieprasījumu

Jūsu atslēga paliek šajā pārlūkprogrammā: tā tiek nosūtīta tikai uz Doitong API un saglabāta (localStorage) tikai tad, ja atzīmējat Atcerēties. Iegūt API atslēgu

Par Recraft 20b

Ģenerē attēlus no uzvednes līdz 1000 rakstzīmēm. Parametrs `style` piedāvā plašu opciju klāstu reālistiskiem attēliem, digitālām ilustrācijām un vektoru ilustrācijām, bet `style_id` atsaucas uz pielāgotu stilu. Masīvs `colors` iesaka vēlamās krāsas, bet `image_size` piedāvā kvadrāta, portreta un ainavas priekšiestatījumus.

Parametri

NosaukumsTips NoklusējumsAtļauts Apraksts
promptobligāts
Tipsstring
≤ 1000 rakstzīmju
image_sizeneobligāts
Tipsobject
Noklusējumssquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
styleneobligāts
Tipsenum
Noklusējumsrealistic_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
+vēl 21digital_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
Ģenerētajiem attēliem lietotais vizuālais stils.
colorsneobligāts
Tipsobject[]
Noklusējums[]
Masīvs ar vēlamajām krāsām.
colors[].rneobligāts
Tipsinteger
Noklusējums0
0 – 255
Sarkanā komponenta vērtība.
colors[].gneobligāts
Tipsinteger
Noklusējums0
0 – 255
Zaļās komponentes vērtība.
colors[].bneobligāts
Tipsinteger
Noklusējums0
0 – 255
Zilās komponentes vērtība.
style_idneobligāts
Tipsstring | null
Neobligāts pielāgota stila atsauces identifikators.
enable_safety_checkerneobligāts
Tipsboolean
Noklusējumsfalse
Drošības pārbaudes slēdzis, kura izslēgšanai nepieciešama konta autorizācija. Bez šīs autorizācijas katrs pieprasījums tiek pārbaudīts neatkarīgi no iestatījuma; true iespējo pārbaudītāju.
obligāts

Izvade

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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Jūsu faili, jūsu izvēleKatrs outputs[].url ir kopija mūsu krātuvē: tiek glabāta mūžīgi (maksa par GB mēnesī) vai 7 dienas bez maksas — atbilstoši konta iestatījumam vai ?storage=.
Vienāda struktūra katram modelimtype, url, content_type, width, height un duration gan attēliem, gan video un audio. output ir paša modeļa rezultāta objekts.
Izvades lauki
images
array of object {url, content_type, file_name, file_size}

AI aģentiem: šī lapa Markdown formātā ir pieejama https://doitong.com/lv/developers/models/recraft-20b.md. Visi modeļi un ceļveži: https://doitong.com/developers/llms.txt