mai-image-2.6 API
Generate, edit, and compose images with Microsoft's high-quality mai-image-2.6 on APISea.
mai-image-2.6Bảng giá API mai-image-2.6
Tất cả giá đều tính bằng USD. So sánh mức giá của APISea với giá niêm yết chính thức cho cùng đơn vị.
| Loại token | APISea | Chính thức | Tiết kiệm |
|---|---|---|---|
| Văn bản đầu vào mỗi 1M token | $4.40 | $5.00 | −12% |
| Văn bản đầu vào từ bộ nhớ đệm mỗi 1M token | $0 | $0 | — |
| Ảnh đầu vào mỗi 1M token | $7.04 | $8.00 | −12% |
| Ảnh đầu vào từ bộ nhớ đệm mỗi 1M token | $0 | $0 | — |
| Văn bản đầu ra mỗi 1M token | $0 | $0 | — |
| Ảnh đầu ra mỗi 1M token | $33.44 | $38.00 | −12% |
Chi phí ước tính cho mỗi đầu ra
| Tùy chọn | APISea | Chính thức |
|---|---|---|
| 1K | ≈ $0.0352 | $0.04 |
| 2K | ≈ $0.0792 | $0.09 |
mai-image-2.6 là gì?
Microsoft's MAI Image model mai-image-2.6 is the high-quality version for quality-focused image workflows on APISea. It supports text-to-image generation, single-image editing, and composition with up to five reference images. Prompts can be in Chinese or English, and optional web grounding retrieves real-time information before generation. Each request produces one image through an asynchronous task.
For text-to-image, choose a 1K or 2K resolution tier, an aspect ratio, exact pixel dimensions within documented limits, or automatic aspect-ratio selection. With reference images, the model determines output dimensions instead. Call the image-generation endpoint using your APISea key and retrieve results through task queries. APISea uses pay-as-you-go token billing and bills only successful requests. Estimated costs are about $0.0352 per image at 1K and about $0.0792 per image at 2K; the default configuration is about 12% below the provider list price.
Điểm nổi bật của mai-image-2.6
Generation and Editing
Generate images from text, edit a single reference image, or compose an image using up to five references.
Text-to-Image Size Controls
Choose 1K or 2K, specify an aspect ratio or exact pixel dimensions, or let the model select an aspect ratio from the prompt.
Optional Web Grounding
Enable web_grounding to retrieve real-time information before generation for images involving real people, places, or events.
High-Quality Model Option
mai-image-2.6 is the quality-focused version. Its Flash sibling shares the same capabilities and parameters but is faster and lower-cost, with slightly lower image quality.
Cách gọi API mai-image-2.6 trong 4 bước
- 01
Tạo API key
Đăng nhập APISea, nạp tối thiểu $50 rồi tạo key sk-sea trong bảng điều khiển.
- 02
Đặt base URL
Dùng https://api.apisea.ai/v1 làm base URL trong SDK hoặc HTTP client.
- 03
Gửi request
Gọi POST /v1/images/generations với "model": "mai-image-2.6" và các tham số bên dưới.
- 04
Xử lý phản hồi
Phản hồi có chứa task_id. Gửi GET /v1/tasks/{task_id} định kỳ cho đến khi trạng thái là completed, sau đó tải xuống từ các URL kết quả.
Ví dụ request
Tài liệu: MAI-Image-2.6 Image Generationcurl --request POST \
--url https://api.apisea.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "mai-image-2.6",
"prompt": "A photorealistic poster of a university campus at sunset, cinematic lighting",
"size": "16:9",
"resolution": "2K"
}'Tham số
| Tham số | Loại | Bắt buộc | Mặc định | Mô tả |
|---|---|---|---|---|
model | string | Bắt buộc | — | Model ID: `mai-image-2.6` or `mai-image-2.6-flash`. |
nsfw_check | boolean | Tùy chọn | false | Whether to run content moderation before submitting the image task. |
prompt | string | Bắt buộc | — | Image description or editing instructions. Supports Chinese and English, up to approximately 32,000 tokens (not characters). |
size | string | Tùy chọn | 1:1 | Accepts an aspect ratio (such as `16:9`), pixel dimensions (such as `1536x1024`), or `auto`. |
resolution | string | Tùy chọn | 1K | Supports `1K` and `2K`, including lowercase. Other tiers such as `4K` are unsupported and return HTTP 400. |
width | integer | Tùy chọn | — | Exact pixel width. Must be provided together with `height`. This pair takes precedence over `size` and `resolution` for text-to-image dimensions. |
height | integer | Tùy chọn | — | Exact pixel height. Must be provided together with `width` and follows the constraints above. Does not determine image-to-image output dimensions. |
image_urls | string[] | Tùy chọn | — | Reference image list, up to 5 images. Omit for text-to-image; provide one for single-image editing or multiple for composition. |
auto_aspect_ratio | boolean | Tùy chọn | false | Set to `true` to let the model choose an aspect ratio based on the prompt, equivalent to `size: "auto"`. |
web_grounding | boolean | Tùy chọn | false | Set to `true` to retrieve real-time information before generation, useful for images involving real people, places, or events. |
n | integer | Tùy chọn | 1 | Only `1` is supported. Submit separate tasks for multiple images. Values above 1 return HTTP 400. |
Bạn có thể xây dựng gì với mai-image-2.6
Creative Asset Generation
Build a prompt-based tool for generating campaign visuals, website illustrations, or concept images with text-to-image sizing controls.
Single-Image Editing Tools
Let users submit one reference image and describe the edits they want through a Chinese or English prompt.
Reference-Based Composition
Build a workflow that accepts up to five reference images alongside instructions for a new composition.
Grounded Editorial Visuals
Enable web grounding for visual briefs involving real people, places, or events that benefit from real-time information retrieval.
Mẹo để có kết quả tốt hơn
- 01
Match Size to the Task
Use 1K or 2K for text-to-image resolution tiers. Reference-based outputs have model-selected dimensions, so size, resolution, width, and height cannot control their output size.
- 02
Specify Valid Pixel Dimensions
Provide width and height together, with each at least 768 and no more than 2,359,296 total pixels. Use multiples of 32 to avoid dimensions being rounded down.
- 03
Poll Asynchronous Tasks
Read the task ID from data[0].task_id after submission, then query its status every 3–5 seconds with an overall wait timeout of 3 minutes. Stop polling when the status is completed or failed.
- 04
Budget with Token Billing
Treat about $0.0352 per image at 1K and about $0.0792 per image at 2K as estimates, not fixed per-image fees. Actual billing is token-based.
Giới hạn và những điều cần biết
Only one image per request is supported; n above 1 returns HTTP 400.
Resolution tiers are limited to 1K and 2K; 4K returns HTTP 400.
Prompts support approximately 32,000 tokens, within the listed maximum input of 65,536 tokens.
Câu hỏi thường gặp về API mai-image-2.6
How much does mai-image-2.6 cost on APISea?
Estimated pricing is about $0.0352 per image at 1K and about $0.0792 per image at 2K, with token-based billing. Image output costs $33.44 per 1M tokens, and the default configuration is about 12% below the provider list price.
How do I call mai-image-2.6 through the API?
Send a POST request to https://api.apisea.ai/v1/images/generations with Bearer authentication using your APISea key, model set to mai-image-2.6, and a required prompt. The endpoint is asynchronous: retrieve data[0].task_id and use task queries to obtain the result.
Can mai-image-2.6 edit images or use references?
Yes. Provide one image_urls entry for single-image editing or up to five for composition, using publicly accessible HTTP(S) URLs or Base64 Data URLs. The model determines reference-based output dimensions at about 1 million pixels with a similar aspect ratio.
What sizes and output limits does mai-image-2.6 support?
Text-to-image supports 1K and 2K tiers, integer aspect ratios from 1:4 to 4:1, and exact pixel dimensions within the documented constraints. Each request generates one image; 4K and n values above 1 are unsupported.
Can I use mai-image-2.6 images commercially?
Commercial use is subject to the provider's terms. Review the applicable terms before using generated images in commercial products or campaigns.
How does mai-image-2.6 compare with mai-image-2.6-flash?
mai-image-2.6 is the high-quality version for quality-focused use cases. mai-image-2.6-flash is faster and lower-cost with slightly lower image quality; both share the same capabilities and parameters and generate one image per request.
Model liên quan
mai-image-2.6-flash
mai-image-2.7
mai-image-2.7-flash
qwen-image-2.0
qwen-image-2.0-pro
qwen-image-3.0
qwen-image-3.0-pro
wan2.7-image
Bắt đầu xây dựng với mai-image-2.6
Chỉ cần một key, thanh toán theo mức sử dụng từ $50; chỉ tính phí cho các request thành công.