text-to-image

HyperFlux - Create image from text

This endpoint allows you to generate an image using the HyperFlux model, the fastest Flux model available

post/v1/ai/text-to-image/hyperflux

Request

  • Base URL: https://api.magnific.com
  • URL: https://api.magnific.com/v1/ai/text-to-image/hyperflux
  • Auth: API key in header x-magnific-api-key

Request body

promptstring

The prompt is a short text that describes the image you want to generate. It can range from simple descriptions, like "a cat", to detailed scenarios, such as "a cat with wings, playing the guitar, and wearing a hat". If no prompt is provided, the AI will generate a random image.

webhook_urlstring uri

Optional callback URL that will receive asynchronous notifications whenever the task changes status. The payload sent to this URL is the same as the corresponding GET endpoint response, but without the data field.

aspect_ratio'square_1_1' | 'classic_4_3' | 'traditional_3_4' | 'widescreen_16_9' | 'social_story_9_16' | 'standard_3_2' | 'portrait_2_3' | 'horizontal_2_1' | 'vertical_1_2' | 'social_post_4_5'

Image size with the aspect ratio. The aspect ratio is the proportional relationship between an image's width and height, expressed as *_width_height (e.g., square_1_1, widescreen_16_9). It is calculated by dividing the width by the height.
If not present, the default is square_1_1.

seedinteger

Seed for the image generation. If not provided, a random seed will be used.

Example request

{
  "webhook_url": "https://www.example.com/webhook",
  "aspect_ratio": "square_1_1",
  "styling": {
    "colors": [
      {
        "color": "#FF0000",
        "weight": 0.5
      }
    ]
  }
}

Response

OK - The task exists and the status is returned

Example response

{
  "data": {
    "generated": [
      "https://openapi-generator.tech",
      "https://openapi-generator.tech"
    ],
    "task_id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
    "status": "CREATED"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.