Actions22
- Runway Actions
- Minimax Actions
- Midjourney Actions
Overview
This node integrates with the Minimax API via UseAPI to create images based on textual prompts. It allows users to generate one or multiple images by providing a descriptive prompt and optional parameters such as model selection, aspect ratio, and quantity. This is useful for creative workflows where automated image generation is needed, such as content creation, marketing materials, design mockups, or AI-assisted art projects.
For example, a user can input a prompt like "A futuristic city skyline at sunset" and receive generated images matching that description. Additional options enable fine-tuning of the output, including optimizing the prompt, selecting the generation model, setting the aspect ratio, and specifying callback URLs for asynchronous processing.
Properties
| Name | Meaning |
|---|---|
| Prompt | Text prompt describing the image to create (max 1250 characters). |
| Additional Options | Collection of optional settings: |
| - Prompt Optimization | Boolean flag to enable or disable automatic optimization of the prompt before image generation. |
| - Model | Choice of model used for image generation. Only option available is "image-01". |
| - Aspect Ratio | Aspect ratio of the generated image. Options include: 16:9 (Landscape), 21:9 (Widescreen), 1:1 (Square), 9:16 (Portrait), 4:3, and 3:4. Default is 16:9. |
| - Quantity | Number of images to generate in one request, between 1 and 4. |
| - Reply URL | Optional URL to receive callbacks when image generation completes or fails. |
| - Reference ID | Optional user-defined reference ID returned with the image response/result for tracking purposes. |
Output
The node outputs JSON data representing the response from the Minimax API after requesting image creation. The structure typically includes details about the generated images such as their IDs, URLs, status, and metadata related to the generation process.
If the operation succeeds, the output JSON contains an array or object with information about the created images. If the operation fails, the output will contain error details including message, HTTP status code, and additional diagnostic information.
The node does not directly output binary image data; instead, it provides references (e.g., URLs or asset IDs) to the generated images hosted by the Minimax service.
Dependencies
- Requires an active Minimax API key credential configured in n8n.
- Network access to the Minimax API endpoint at
https://api.useapi.net/v1/minimax/images/create. - Optional: If using reply URLs for callbacks, a publicly accessible endpoint must be provided to receive asynchronous notifications.
Troubleshooting
- Missing or invalid API key: The node requires a valid API key credential for authentication. Ensure the API key is correctly set up in n8n credentials.
- Prompt too long: The prompt has a maximum length of 1250 characters. Exceeding this limit may cause errors.
- Invalid quantity: Quantity must be between 1 and 4. Values outside this range will cause validation errors.
- Unsupported content type or model: Currently, only the
"image-01"model is supported. Using unsupported models or invalid aspect ratios may result in API errors. - Network issues or API downtime: Errors during the HTTP request will include status codes and messages. Check network connectivity and Minimax service status.
- Callback URL issues: If using the reply URL option, ensure the URL is reachable and properly handles incoming requests to avoid missed notifications.
Common error messages include:
"Operation cancelled: You must confirm..."— indicates missing user confirmation for sensitive operations (not applicable here but common in similar nodes)."No binary data found"— occurs if binary input is expected but missing (not relevant for image creation but seen in other operations).- HTTP 401 Unauthorized — invalid or missing API key.
- HTTP 400 Bad Request — invalid parameters such as prompt length or quantity.
Links and References
- Minimax API Documentation (general reference for the API)
- UseAPI Platform (platform hosting the Minimax API)
- n8n Documentation on Creating Custom Nodes