Naar inhoud springen

Recraft 20b

Integreren

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

Deze request: $ 0,022 22 API-tegoed Op deze pagina uitvoeren

API-sleutel ophalen
Recraft Tekst naar afbeelding #image-generation#vector-art#typograph#style

Text-to-image-model met veel selecteerbare stijlen, waaronder vector- en digitale illustratie, en kleurvoorkeuren

Recraft · Afbeelding

Je eerste resultaat komt hier

Bouw hieronder een request en voer die uit met je API-sleutel. Uitvoer wordt naar onze opslag gekopieerd en voor altijd of 7 dagen gratis bewaard.

Een aanvraag samenstellen

Besturingselementen worden gegenereerd op basis van het modelschema. De code en de prijs worden bijgewerkt terwijl je ze wijzigt.

•verplicht 88 / 1000
image_size standaard square_hd
standaard realistic_image

Visuele stijl die op gegenereerde afbeeldingen wordt toegepast.

Geavanceerd style_id · enable_safety_checker · colors

Optionele identifier voor een aangepaste stijlreferentie.

standaard []

Array met voorkeurskleuren.

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

Deze request uitvoeren

Je sleutel blijft in deze browser: hij wordt alleen naar de Doitong API verzonden en alleen in localStorage opgeslagen als je Onthouden aanvinkt. API-sleutel ophalen

Over Recraft 20b

Genereert afbeeldingen uit een prompt van maximaal 1000 tekens. De parameter `style` biedt een lange lijst opties voor realistische afbeeldingen, digitale illustraties en vectorillustraties, en `style_id` verwijst naar een aangepaste stijl. Een `colors`-array suggereert voorkeurskleuren, en `image_size` biedt vierkante, portret- en landschappresets.

Parameters

NaamType StandaardToegestaan Beschrijving
promptverplicht
Typestring
≤ 1.000 tekens
image_sizeoptioneel
Typeobject
Standaardsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
styleoptioneel
Typeenum
Standaardrealistic_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 meerdigital_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
Visuele stijl die op gegenereerde afbeeldingen wordt toegepast.
colorsoptioneel
Typeobject[]
Standaard[]
Array met voorkeurskleuren.
colors[].roptioneel
Typeinteger
Standaard0
0 – 255
Waarde van de rode component.
colors[].goptioneel
Typeinteger
Standaard0
0 – 255
Waarde van de groene component.
colors[].boptioneel
Typeinteger
Standaard0
0 – 255
Waarde van de blauwe component.
style_idoptioneel
Typestring | null
Optionele identifier voor een aangepaste stijlreferentie.
enable_safety_checkeroptioneel
Typeboolean
Standaardfalse
Schakelaar voor veiligheidscontrole waarvan de uitgeschakelde instelling accountautorisatie vereist. Zonder die autorisatie wordt elke request gecontroleerd, ongeacht de instelling; true schakelt de controle in.
verplicht

Uitvoer

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"
  }
}
Jouw bestanden, jouw keuzeElke outputs[].url is een kopie in onze opslag: voor altijd bewaard (betaald per GB-maand) of 7 dagen gratis, volgens je accountinstelling of ?storage=.
Dezelfde structuur voor elk modeltype, url, content_type, width, height en duration, voor afbeeldingen, video en audio. output is het eigen resultaatobject van het model.
Velden van de uitvoer
images
array of object {url, content_type, file_name, file_size}

Voor AI-agents: deze pagina als Markdown staat op https://doitong.com/nl/developers/models/recraft-20b.md. Alle modellen en handleidingen: https://doitong.com/developers/llms.txt