generate_image
Transform text prompts into custom images with specified models, aspect ratios, and references for character or style adjustments. Ideal for dynamic visual content creation.
Instructions
Generates an image from a text prompt
Input Schema
Name | Required | Description | Default |
---|---|---|---|
aspect_ratio | No | ||
callback_url | No | ||
character_ref | No | ||
image_ref | No | ||
model | No | photon-1 | |
modify_image_ref | No | ||
prompt | Yes | ||
style_ref | No |
Input Schema (JSON Schema)
{
"$defs": {
"AspectRatio": {
"description": "Supported aspect ratios for video and image generations.",
"enum": [
"1:1",
"16:9",
"9:16",
"4:3",
"3:4",
"21:9",
"9:21"
],
"title": "AspectRatio",
"type": "string"
},
"ImageIdentity": {
"description": "Collection of images representing an identity.",
"properties": {
"images": {
"items": {
"type": "string"
},
"title": "Images",
"type": "array"
}
},
"required": [
"images"
],
"title": "ImageIdentity",
"type": "object"
},
"ImageModel": {
"description": "Image generation models supported by the Luma API.",
"enum": [
"photon-1",
"photon-flash-1"
],
"title": "ImageModel",
"type": "string"
},
"ImageRef": {
"description": "Reference to an image with optional weight.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"weight": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Weight"
}
},
"required": [
"url"
],
"title": "ImageRef",
"type": "object"
},
"ModifyImageRef": {
"description": "Reference to an image to modify with optional weight.",
"properties": {
"url": {
"title": "Url",
"type": "string"
},
"weight": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Weight"
}
},
"required": [
"url"
],
"title": "ModifyImageRef",
"type": "object"
}
},
"description": "Input parameters for image generation.",
"properties": {
"aspect_ratio": {
"anyOf": [
{
"$ref": "#/$defs/AspectRatio"
},
{
"type": "null"
}
],
"default": null
},
"callback_url": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Callback Url"
},
"character_ref": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/$defs/ImageIdentity"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Character Ref"
},
"image_ref": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ImageRef"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Image Ref"
},
"model": {
"$ref": "#/$defs/ImageModel",
"default": "photon-1"
},
"modify_image_ref": {
"anyOf": [
{
"$ref": "#/$defs/ModifyImageRef"
},
{
"type": "null"
}
],
"default": null
},
"prompt": {
"title": "Prompt",
"type": "string"
},
"style_ref": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/ImageRef"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Style Ref"
}
},
"required": [
"prompt"
],
"title": "GenerateImageInput",
"type": "object"
}