inference.recraft.v4.txt2img.v1
The inference.recraft.v4.txt2img.v1 job generates an image from a text prompt using Recraft V4.
{ "type": "inference.recraft.v4.txt2img.v1", "config": { "prompt": "a serene mountain landscape at golden hour" }}Additional configuration:
size(string; one of1024x1024,1536x768,768x1536,1280x832,832x1280,1216x896,896x1216,1152x896,896x1152,832x1344,1280x896,896x1280,1344x768,768x1344; default1024x1024)text_layout(array)
This job type is also available under its partner alias inference.partner.recraft.v4.txt2img.v1.
Schema
Section titled “Schema”{ "type": "object", "required": [ "type", "config" ], "properties": { "type": { "type": "string" }, "config": { "type": "object", "additionalProperties": false, "required": [ "prompt" ], "properties": { "prompt": { "type": "string", "minLength": 0, "maxLength": 10000, "examples": [ "puppies in a cloud, 4k" ] }, "size": { "type": "string", "default": "1024x1024", "enum": [ "1024x1024", "1536x768", "768x1536", "1280x832", "832x1280", "1216x896", "896x1216", "1152x896", "896x1152", "832x1344", "1280x896", "896x1280", "1344x768", "768x1344" ] }, "text_layout": { "type": "array", "description": "Array of text elements to render on the image with bounding box positions", "items": { "type": "object", "additionalProperties": false, "required": [ "text", "bbox" ], "properties": { "text": { "type": "string", "description": "Text content to render" }, "bbox": { "type": "array", "description": "Bounding box as 4 corner points, each [x, y] normalized to 0-1 range", "minItems": 4, "maxItems": 4, "items": { "type": "array", "minItems": 2, "maxItems": 2, "items": { "type": "number", "minimum": 0, "maximum": 1 } } } } } } } } }, "$schema": "https://json-schema.org/draft/2020-12/schema"}