Preskoči na vsebino

Recraft 20b

Integracija

ID modela 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"

Ta zahteva: 0,022 $ 22 API kreditov Zaženi na tej strani

Pridobi ključ API
Recraft Besedilo v sliko #image-generation#vector-art#typograph#style

Model za ustvarjanje slik iz besedila s številnimi izbirnimi slogi, vključno z vektorskimi in digitalnimi ilustracijami, ter namigi za barve

Recraft · Slika

Tukaj bo vaš prvi rezultat

Spodaj sestavite zahtevo in jo zaženite s svojim ključem API. Izhodi se kopirajo v našo shrambo, kjer se hranijo za vedno ali 7 dni brezplačno.

Ustvari zahtevo

Kontrolniki se ustvarijo iz sheme modela. Koda in cena se posodobita, ko ju spreminjate.

•obvezno 88 / 1000
image_size privzeto square_hd
privzeto realistic_image

Vizualni slog, uporabljen za generirane slike.

Napredno style_id · enable_safety_checker · colors

Izbirni identifikator za referenco sloga po meri.

privzeto []

Polje prednostnih barv.

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.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"

Zaženi to zahtevo

Vaš ključ ostane v tem brskalniku: pošlje se samo v Doitong API in shrani v localStorage samo, če označite možnost Zapomni si. Pridobi ključ API

O modelu Recraft 20b

Ustvari slike iz poziva z največ 1000 znaki. Parameter `style` ponuja dolg seznam možnosti za realistično sliko, digitalno ilustracijo in vektorsko ilustracijo, `style_id` pa se sklicuje na slog po meri. Polje `colors` predlaga želene barve, `image_size` pa ponuja kvadratne, pokončne in ležeče prednastavitve.

Parametri

ImeVrsta PrivzetoDovoljeno Opis
promptobvezno
Vrstastring
≤ 1000 znakov
image_sizeneobvezno
Vrstaobject
Privzetosquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
styleneobvezno
Vrstaenum
Privzetorealistic_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 večdigital_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
Vizualni slog, uporabljen za generirane slike.
colorsneobvezno
Vrstaobject[]
Privzeto[]
Polje prednostnih barv.
colors[].rneobvezno
Vrstainteger
Privzeto0
0 – 255
Vrednost rdeče komponente.
colors[].gneobvezno
Vrstainteger
Privzeto0
0 – 255
Vrednost zelene komponente.
colors[].bneobvezno
Vrstainteger
Privzeto0
0 – 255
Vrednost modre komponente.
style_idneobvezno
Vrstastring | null
Izbirni identifikator za referenco sloga po meri.
enable_safety_checkerneobvezno
Vrstaboolean
Privzetofalse
Preklop preverjanja varnosti, pri katerem izklopljena nastavitev zahteva avtorizacijo računa. Brez te avtorizacije se vsaka zahteva preveri ne glede na nastavitev; true omogoči preverjanje.
obvezno

Izhod

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"
  }
}
Vaše datoteke, vaša izbiraVsak outputs[].url je kopija v naši shrambi: hrani se za vedno (plačilo na GB-mesec) ali 7 dni brezplačno, glede na nastavitev računa ali ?storage=.
Enaka struktura pri vsakem modelutype, url, content_type, width, height in duration za slike, videoposnetke in zvok. output je lasten objekt rezultata modela.
Polja izhoda
images
array of object {url, content_type, file_name, file_size}

Za agente AI: ta stran je v obliki Markdown na voljo na https://doitong.com/sl/developers/models/recraft-20b.md. Vsi modeli in vodniki: https://doitong.com/developers/llms.txt