text-to-image
Create image from text - Classic fast
Convert descriptive text input into images using AI. This endpoint accepts a variety of parameters to customize the generated images.
post/v1/ai/text-to-image
Request
- Base URL: https://api.magnific.com
- URL: https://api.magnific.com/v1/ai/text-to-image
- Auth: API key in header x-magnific-api-key
Request body
Example request
{
"prompt": "Crazy dog flying over the space",
"negative_prompt": "b&w, grayscale, disfigured, bad quality",
"styling": {
"style": "cartoon",
"colors": [
{
"color": "#FF0000",
"weight": 0.5
}
],
"effects": {
"color": "b&w",
"lightning": "warm",
"framing": "portrait"
}
},
"guidance_scale": 2,
"image": {
"size": "square_1_1"
},
"num_images": 1,
"seed": 123,
"filter_nsfw": true
}Response
OK - The request has succeeded, and the images generated from the text are returned.
Example response
{
"data": [
{
"base64": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQAAAABRBrPYAAABrElEQVR4nO3BMQEAAADCoPVPbQ0Po...",
"has_nsfw": false
},
{
"base64": "iVBORw0KGgoAAAANSUhEUgAAASwAAAEsAQAAAABRBrPYAAABrElEQVR4nO3BMQEAAADCoPVPbQ0Po...",
"has_nsfw": false
}
],
"meta": {
"image": {
"size": "square_1_1",
"width": 1024,
"height": 1024
},
"seed": 42,
"guidance_scale": 2,
"prompt": "Crazy dog flying over the space",
"num_inference_steps": 8
}
}Changes
No recorded changes to this operation across all 1 revision of this API.