Generate(文字生成图片)
POST
/ideogram/generate来自于Ideogram的文字生成图片,优势在于可以生成准确的文字和海报
官方文档:https://api-docs.ideogram.ai/reference/post_generate_image
价格:Ideogram 2.0 - 0.08 PTC/次
价格:Ideogram 2.0 Turbo - 0.05 PTC/次
价格:Ideogram 1.0 - 0.06 PTC/次
价格:Ideogram 1.0 Turbo - 0.02 PTC/次
请求参数
The model used to generate. Defaults to V_2.
Determine if MagicPrompt should be used in generating the request or not. Defaults to AUTO.
(Cannot be used in conjunction with resolution) The aspect ratio to use for image generation, which determines the image's resolution. Defaults to ASPECT_1_1.
The prompt to use to generate the image.
The style type to generate with; this is only applicable for models V_2 and above and should not be specified for model versions V_1.
Description of what to exclude from an image. Descriptions in the prompt take precedence to descriptions in the negative prompt.
integer 0 to 2147483647
(For model_version for 2.0 only, cannot be used in conjunction with aspect_ratio) The resolution to use for image generation, represented in width x height. If not specified, defaults to using aspect_ratio.
{
"image_request": {
"model": "V_2",
"magic_prompt_option": "AUTO",
"aspect_ratio": "ASPECT_1_1",
"prompt": "a dog",
"style_type": "REALISTIC",
"negative_prompt": "painting",
"seed": 12345
}
}
示例代码
返回响应
{}