Lumaktaw sa nilalaman

Recraft V4 Styles Text to Image

I-integrate

ID ng modelo recraft/v4/style/text-to-image
# 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/v4/style/text-to-image?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"

Kahilingang ito: $0.04 40 kredito ng API · ≈ ₽4.29 Patakbuhin ito sa page na ito

Kumuha ng API key
Recraft Text patungong Larawan #realism#typography#stylized

Standard V4 raster text-to-image na naglalapat ng naka-save na estilo ID o inline reference na mga larawan

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 / 10000
image_size default na square_hd

Identifier para sa dati nang nilikhang V4 custom style.

advanced images · style_match · enable_safety_checker · colors · background_color
image_urls
Mag-drop ng file, o · hanggang 10

Magbigay ng 1–10 style reference sa pamamagitan ng URL, gamit ang mga larawang nasa PNG, JPG, o WEBP format.

style_match

Override para sa antas ng pagsunod sa custom style habang bumubuo.

default na []

Array na naglalaman ng mga gustong kulay.

Gustong kulay para sa background ng mga nabuong larawan.

POST /run/recraft/v4/style/text-to-image?wait=20 presyo → $0.04
# 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/v4/style/text-to-image?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"

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 V4 Styles Text to Image

Gumagawa ng raster na mga larawan na may pare-parehong hitsura, batay sa naka-save na `style_id` o 1 hanggang 10 reference na larawang ipinasa sa `image_urls`. Ino-override ng `style_match` (precise o flexible) kung gaano kahigpit na sinusunod ang estilo. Sinusuportahan din ang `prompt` na hanggang 10,000 character, `image_size`, `colors` at `background_color`. Nagbabalik ng mga larawan kasama ang ginamit na estilo.

Mga parameter

Ipadala ang canonical na pangalan o ang native na pangalan, hindi pareho. Mga canonical na pangalan

PangalanUri defaultPinapayagan Paglalarawan
promptkinakailangan
Uristring
≤ 10,000 character
image_sizeopsyonal
Uriobject
defaultsquare_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
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.
background_coloropsyonal
Uriobject
Gustong kulay para sa background ng mga nabuong larawan.
background_color.ropsyonal
Uriinteger
default0
0 – 255
Value ng red component.
background_color.gopsyonal
Uriinteger
default0
0 – 255
Value ng green component.
background_color.bopsyonal
Uriinteger
default0
0 – 255
Value ng blue component.
enable_safety_checkeropsyonal
Uriboolean
defaulttrue
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.
style_idopsyonal
Uristring | null
Identifier para sa dati nang nilikhang V4 custom style.
image_urlsopsyonal images
Uriurl[] · image
≤ 10 item
Magbigay ng 1–10 style reference sa pamamagitan ng URL, gamit ang mga larawang nasa PNG, JPG, o WEBP format.
style_matchopsyonal
Urienum
preciseflexible
Override para sa antas ng pagsunod sa custom style habang bumubuo.
kinakailangan Canonical na pangalan, tinatanggap din

Tumatanggap ang mga parameter ng file ng pampublikong https:// URL, data: URI na hanggang 10 MB, o file_url ng isang upload. Mga file

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "recraft/v4/style/text-to-image",
  "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": 40,
    "usd": "0.04",
    "charged": 40,
    "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
      }
    ],
    "style_id": "string"
  },
  "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"
  }
}
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}
style_id
string | nullCustom style na inilalapat o bagong nililikha habang binubuo ito.

Higit pang modelo: Text patungong Larawan

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