Gå til indhold

Recraft 20b

Integrer

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"

Denne anmodning: 0,022 $ 22 API-kreditter Kør den på denne side

Hent API-nøgle
Recraft Tekst til billede #image-generation#vector-art#typograph#style

Tekst-til-billede-model med mange valgbare stilarter, herunder vektor- og digital illustration, samt farveindikationer

Recraft · Billede

Dit første resultat kommer her

Opret en anmodning nedenfor, og kør den med din API-nøgle. Output kopieres til vores lagring, gemt for altid eller 7 dage gratis.

Opret en anmodning

Kontrollerne genereres fra modellens skema. Koden og prisen opdateres, når du ændrer dem.

•påkrævet 88 / 1000
image_size standard square_hd
standard realistic_image

Visuel stil anvendt på genererede billeder.

Avanceret style_id · enable_safety_checker · colors

Valgfri identifikator for en brugerdefineret stilreference.

standard []

Array med foretrukne farver.

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

Kør denne anmodning

Din nøgle forbliver i denne browser: Den sendes kun til Doitong API og gemmes kun i localStorage, hvis du markerer Husk. Hent en API-nøgle

Om Recraft 20b

Genererer billeder ud fra en prompt på op til 1000 tegn. Parameteren `style` tilbyder en lang liste med muligheder inden for realistiske billeder, digital illustration og vektorillustration, og `style_id` refererer til en brugerdefineret stil. Et `colors`-array angiver foretrukne farver, og `image_size` tilbyder forudindstillinger for kvadratisk, stående og liggende format.

Parametre

NavnType StandardTilladt Beskrivelse
promptpåkrævet
Typestring
≤ 1.000 tegn
image_sizevalgfri
Typeobject
Standardsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
stylevalgfri
Typeenum
Standardrealistic_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 fleredigital_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
Visuel stil anvendt på genererede billeder.
colorsvalgfri
Typeobject[]
Standard[]
Array med foretrukne farver.
colors[].rvalgfri
Typeinteger
Standard0
0 – 255
Værdien af den røde komponent.
colors[].gvalgfri
Typeinteger
Standard0
0 – 255
Værdien af den grønne komponent.
colors[].bvalgfri
Typeinteger
Standard0
0 – 255
Værdien af den blå komponent.
style_idvalgfri
Typestring | null
Valgfri identifikator for en brugerdefineret stilreference.
enable_safety_checkervalgfri
Typeboolean
Standardfalse
Sikkerhedskontrol, hvis deaktivering kræver kontogodkendelse. Uden denne godkendelse kontrolleres alle anmodninger uanset indstillingen; true aktiverer kontrollen.
påkrævet

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"
  }
}
Dine filer, dit valgHver outputs[].url er en kopi på vores lagring: gemt for altid (betales pr. GB-måned) eller 7 dage gratis, afhængigt af din kontoindstilling eller ?storage=.
Samme struktur for alle modellertype, url, content_type, width, height og duration for billeder, video og lyd. output er modellens eget resultatobjekt.
Outputfelter
images
array of object {url, content_type, file_name, file_size}

Til AI-agenter: Denne side som Markdown findes på https://doitong.com/da/developers/models/recraft-20b.md. Alle modeller og vejledninger: https://doitong.com/developers/llms.txt