minimax-image-h3 / minimax-image-h3-highspeed) through TokenHub: submit text-to-image or image editing requests using an OpenAI Images-style protocol, receive image results synchronously, and leverage capabilities such as text-based image generation, multi-image reference editing, custom dimensions/aspect ratios, and output format control.Model name | model Parameter Value | Supported Capability | Brief Description |
MiniMax H3-Image | minimax-image-h3 | Text-to-image generation/image editing (synchronous) | Standard quality. Supports text-to-image generation and multi-image reference editing, with balanced overall performance. |
MiniMax H3-Image Highspeed | minimax-image-h3-highspeed | Text-to-image generation/image editing (synchronous) | High-speed version. Provides faster generation speed and is suitable for latency-sensitive scenarios. |
POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-image/generationParameter Name | Required | Type | Description |
model | Yes | string | Model ID. Values: minimax-image-h3 or minimax-image-h3-highspeed. Cannot be empty. |
prompt | No | string | Text description of the image. Maximum 32,000 characters (counted by Unicode characters, excluding leading and trailing whitespace). Returns 400 if empty or containing only whitespace. When Prompt enhancement is disabled (disable_prompt_enhanced is true), the model reads only approximately the first 4,096 tokens, and the excess part does not take effect. |
n | No | integer | Number of generated images. Value range: [1,10]. Default value: 1. |
size | No | string | Generated size. Format: ${width}x${height} (for example, 2720x1536). Width and height are positive integers. The area (width × height) must be between 655,360 and 20,000,000 pixels, and the aspect ratio must be between 1:3 and 3:1, both inclusive. If these conditions are not met, 400 is returned, and the image is not automatically scaled or rounded. In this case, aspect_ratio or area cannot be passed. If neither is passed, the model determines the size. Alternatively, "auto" can be passed to let the model automatically select the optimal size based on the prompt semantics. |
aspect_ratio | No | string | Output aspect ratio. Default value: auto. Can only be passed when size is not passed or is auto. auto: determined by Prompt enhancement based on the reference image and content to decide X:Y. X and Y are integers from 1 to 300, and the aspect ratio is between 1:3 and 3:1 (inclusive), such as 16:9, 3:4, 21:9, 3:1. |
area | No | string | Output area tier. Supported values: 1K, 2K, 4K. Default value: 4K. Can only be passed when size is not passed or is auto. If size is in width x height format, 400 is returned. The target areas for 1K, 2K, and 4K are 1024 × 1024, 2048 × 2048, and 4096 × 4096 pixels respectively. The width and height are calculated by the server based on the aspect ratio. For example, 2K with 16:9 outputs 2720 × 1536. For the actual width and height of each image, see data[].size. |
output_format | No | string | Output image format. Supported values: "jpeg", "png", "webp". Default value: "jpeg". |
response_format | No | string | Image return format. Supported values: "url" (returns the image URL, default) and "b64_json" (returns base64 encoding). |
output_compression | No | integer | Output image compression quality. Value range: [0, 100]. Default value: 95. A higher value indicates higher quality. Only effective for jpeg/webp formats. |
aigc_watermark | No | boolean | Whether to overlay a visible AIGC watermark on the generated image. false: Do not add a watermark (default); true: Add a watermark. |
disable_prompt_enhanced | No | boolean | Whether to disable Prompt enhancement (automatic prompt optimization on the model side). false: Enable enhancement (default); true: Disable enhancement and generate images strictly based on the original prompt. |
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-image/generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "minimax-image-h3","prompt": "An orange cat basking in the sun on a windowsill, blurred city street in the background, warm tones, realistic style"}'
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-image/generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "minimax-image-h3","prompt": "A cyberpunk city at night, neon lights reflected on the streets after the rain","size": "2720x1536","output_format": "jpeg","response_format": "url"}'
curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-image/generation' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "minimax-image-h3-highspeed","prompt": "A minimalist product poster with a white background and a bottle of perfume in the center","aspect_ratio": "9:16","output_format": "png"}'
POST https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-image/editsParameter Name | Required | Type | Description |
images | No | array[object] | Reference image list, 1 to 16 images. Each element is structured as {"image_url": "..."} or {"url": "..."} (both field names are compatible). Supports http(s) public network URLs or the data:image/...;base64,... format. In multi-image scenarios, the model comprehensively uses all reference images for editing. |
model, prompt, n, size, aspect_ratio, output_format, and so on) are exactly the same as those of the text-to-image API. See the parameter table above.curl -X POST 'https://tokenhub-intl.tencentcloudmaas.com/v1/wand/minimax-image/edits' \\-H 'Authorization: Bearer YOUR_API_KEY' \\-H 'Content-Type: application/json' \\-d '{"model": "minimax-image-h3","prompt": "Keep the person unchanged and replace the background with a beach at sunset","images": [{"image_url": "https://your-domain/portrait.jpg"}],"response_format": "url"}'
Parameter Name | Type | Description |
created | integer | Unix timestamp in seconds. |
data | array | List of generated results. Each element contains url (image URL, when response_format=url) or b64_json (base64 encoding, when response_format=b64_json). |
tokenhub_usage | object | Number of tokens consumed by this task, used for billing/reconciliation. |
request_id | string | Request id. Include it when troubleshooting. |
{"created": 1794385455,"data": [{"revised_prompt": "The image is a realistic ......","size": "3552x4736","url": "https://xxx.png"}],"output_format": "jpeg","request_id": "6e44b701-e024-426a-bb00-839553cb58c9","tokenhub_usage": {"total_tokens": 44547}}
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan