Skip to content

inference.recraft.v4.txt2img.v1

{
"type": "object",
"required": [
"type",
"config"
],
"properties": {
"type": {
"type": "string",
"enum": [
"inference.recraft.v4.txt2img.v1"
]
},
"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
}
}
}
}
}
}
}
}
}
}