recraft/recraft-20b
Recraft 20b is Recraft's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.
Example output — click Run to generate your own
Send your first request
OpenAI-compatible endpoint with unified authentication and usage tracking.
https://api.sandbase.ai/v1/runrecraft/recraft-20bInput Schema
5 parameters · 1 required · 4 optional
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Required | Min length: 1 · Max length: 1000 |
style | string | Optional | The style of the generated images. Vector images cost 2X as much. · Options: any, realistic_image, digital_illustration, vector_illustration, realistic_image/b_and_w, realistic_image/enterprise, realistic_image/hard_flash, realistic_image/hdr, realistic_image/motion_blur, realistic_image/natural_light, realistic_image/studio_portrait, digital_illustration/2d_art_poster, digital_illustration/2d_art_poster_2, digital_illustration/3d, digital_illustration/80s, digital_illustration/engraving_color, digital_illustration/glow, digital_illustration/grain, digital_illustration/hand_drawn, digital_illustration/hand_drawn_outline, digital_illustration/handmade_3d, digital_illustration/infantile_sketch, digital_illustration/kawaii, digital_illustration/pixel_art, digital_illustration/psychedelic, digital_illustration/seamless, digital_illustration/voxel, digital_illustration/watercolor, vector_illustration/cartoon, vector_illustration/doodle_line_art, vector_illustration/engraving, vector_illustration/flat_2, vector_illustration/kawaii, vector_illustration/line_art, vector_illustration/line_circuit, vector_illustration/linocut, vector_illustration/seamless · Default: "realistic_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_colordigital_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 |
colors | object[] | Optional | An array of preferable colors · Default: [] |
style_id | string | Optional | The ID of the custom style reference (optional) |
aspect_ratio | string | Optional | The aspect ratio of the generated image. · Options: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 21:916:93:24:35:41:14:53:42:39:16 |
Output Schema
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the generation task |
status | string | Task status: pending, running, completed, failed, timeout |
model | string | Model used for the generation |
outputs | array | Array of output items |
outputs[].url | string | URL of the generated artifact |
outputs[].content_type | string | MIME type (e.g. image/png, video/mp4) |
error | object | null | Error details if failed, null on success |
error.type | string | Machine-readable error type code |
error.message | string | Human-readable error description |
Async Workflow
This model uses asynchronous execution. Submit a request and poll for the result.
- Submit — POST to /v1/run, receive an
id - Poll — GET /v1/run/{id} until status is
completed,failed, ortimeout - Retrieve — Read
outputsfrom the completed response
Code Examples
Ready-to-run snippets
# Step 1: Submit
curl -X POST https://api.sandbase.ai/v1/run \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "recraft/recraft-20b",
"style": "realistic_image",
"colors": [],
"prompt": "a red panda in Kyoto"
}'
# Step 2: Poll result (replace <id>)
curl https://api.sandbase.ai/v1/run/<id> \
-H "Authorization: Bearer YOUR_API_KEY"API README
Recraft 20b
Recraft 20b occupies the generated-image role in the model catalog for design-system owners. Its practical value is to separate this job from adjacent family routes: an upstream service can confirm that it has prompt, submit one well-scoped job, and receive a generated image asset for downstream approval. This positioning explains when the exact recraft/recraft-20b route belongs in an architecture without borrowing promises from another version, tier, or task variant.
A production-minded integration begins by checking the request intent, asset eligibility, and downstream placement. The caller records required values separately from optional choices such as style, colors, style_id, aspect_ratio, runs a small representative sample, and stores the route name with the resulting artifact. Reviewers then compare that artifact with the agreed acceptance criteria, document any rejected setup, and promote only a successful request shape into larger batches. This workflow gives recraft/recraft-20b measurable business context while leaving the Highlights section to explain model behavior.
Highlights
- Prompt-responsive composition. Recraft 20b turns detailed natural-language art direction into a complete visual with a defined subject, setting, and treatment.
- Style range. The route can interpret photographic, illustrative, graphic, or conceptual direction when those choices are stated clearly in the prompt.
- Layout control. Supported framing and composition controls help Recraft 20b prepare imagery for landscape, square, portrait, or design-specific placements.
- Iteration-ready output. Seed and other declared creative controls make it practical to compare focused variations while retaining the core brief.
Pricing
| Billing option | Price |
|---|---|
| Per request | $0.022000 |
When to Use
| Scenario | Why it fits |
|---|---|
| Choose Recraft 20b | Use it when the job specifically calls for recraft 20b and the route’s documented input contract matches assets already available in your workflow. |
| Keep the request reproducible | Use the required prompt explicitly, then record optional choices alongside the prompt for repeatable reruns. |
| Build controlled creative variations | Change one declared control at a time when comparing framing, format, duration, resolution, style, or other route-supported output decisions. |
| Integrate asynchronous delivery | Use this endpoint when an application can submit work, track completion, and collect the returned media URL instead of requiring an immediate inline artifact. |
| Validate before a large batch | Run representative prompts and source assets first, confirm the visual or audio behavior, then lock the successful request shape for scaled production. |
Prompt Guide
Lead with the subject or transformation, then add the composition, environment, style, lighting, motion, voice, or fidelity details relevant to this route. Keep every parameter inside the documented schema; the example below uses only fields declared for recraft/recraft-20b.
{
"prompt": "a red panda in Kyoto",
"style": "realistic_image",
"aspect_ratio": "21:9"
}
Technical Specs
| Specification | Details |
|---|---|
| Model ID | recraft/recraft-20b |
| Execution mode | async |
| Task type | image |
style | string · optional · choices: any, realistic_image, digital_illustration, vector_illustration, realistic_image/b_and_w, realistic_image/enterprise, realistic_image/hard_flash, realistic_image/hdr, realistic_image/motion_blur, realistic_image/natural_light, realistic_image/studio_portrait, digital_illustration/2d_art_poster, digital_illustration/2d_art_poster_2, digital_illustration/3d, digital_illustration/80s, digital_illustration/engraving_color, digital_illustration/glow, digital_illustration/grain, digital_illustration/hand_drawn, digital_illustration/hand_drawn_outline, digital_illustration/handmade_3d, digital_illustration/infantile_sketch, digital_illustration/kawaii, digital_illustration/pixel_art, digital_illustration/psychedelic, digital_illustration/seamless, digital_illustration/voxel, digital_illustration/watercolor, vector_illustration/cartoon, vector_illustration/doodle_line_art, vector_illustration/engraving, vector_illustration/flat_2, vector_illustration/kawaii, vector_illustration/line_art, vector_illustration/line_circuit, vector_illustration/linocut, vector_illustration/seamless |
colors | array · optional |
prompt | string · required |
style_id | string · optional |
aspect_ratio | string · optional · choices: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16 |

