Recraft V4.1 Flash
Text to image
Starting price $0.02 / image
By Recraft
Recraft V4 Custom Style makes new images in the style of reference images you upload, so a whole set shares one look. It comes in Standard and Pro.
recraft/v4/style/text-to-imageThis model has other modes with their own ids: recraft/v4/style/pro/text-to-image.
Quote the input, start the generation with the quote, then poll the job. Set RAYWAKE_API_KEY first; see Authentication.
# 1. Price the exact input (quotes are valid for up to 10 minutes)
curl -s https://api.raywake.com/v1/quotes \
-H "Authorization: Bearer $RAYWAKE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "recraft/v4/style/text-to-image",
"input": {
"prompt": "A fox reading a newspaper on a park bench in autumn, falling leaves around it, in the style of the reference images."
}
}'
# 2. Start the generation with the quote_id from step 1
curl -s https://api.raywake.com/v1/generate \
-H "Authorization: Bearer $RAYWAKE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"model": "recraft/v4/style/text-to-image", "quote_id": "QUOTE_ID", "input": {"prompt":"A fox reading a newspaper on a park bench in autumn, falling leaves around it, in the style of the reference images."}}'
# 3. Poll until the status is terminal
curl -s https://api.raywake.com/v1/jobs/JOB_ID \
-H "Authorization: Bearer $RAYWAKE_API_KEY"| Name | Type | Description |
|---|---|---|
promptrequired | string | Prompt |
image_size | string (enum) | Image Size |
colors | array of colors | An array of preferable colors |
background_color | color | The preferable background color of the generated images. |
image_urls | array of image URLs | The URLs of the style reference images. Supports PNG, JPG, and WEBP; provide between 1 and 10 images. |
style_match | string (enum) | Override how closely the generation follows the custom style. |
A succeeded job lists its results under outputs, stored on our side. See Jobs for every field.
"outputs": [
{ "type": "image", "url": "https://…", "mime_type": "image/png", "thumbnail_url": "https://…" }
]The exact charge for your input comes from a quote. How charges settle
Fields marked * are required. Review the price before generating.
Upload 1 to 10 style reference images in PNG, JPG or WEBP and write what the new image should show. Style match can be set to precise or flexible. You can also pass preferred colors and a background color, and pick a square, portrait or landscape preset; prompts can run to 10000 characters.
Compare the result with your source, especially object boundaries, fine text, faces and shadows.