Source: https://ailoot.ai/models/th/image-01/
Canonical: https://ailoot.ai/models/th/image-01/
Language: th

# image-01

[Markdown](https://ailoot.ai/models/th/image-01/index.md) · [JSON](https://ailoot.ai/models/th/image-01/facts.json)

## [image-01](https://ailoot.ai/models/th/image-01/)

MiniMax image-01 สร้างภาพจากคำอธิบายข้อความโดยละเอียด รองรับองค์ประกอบสี่เหลี่ยมจัตุรัส แนวตั้ง และภาพกว้าง

- [**Ailoot · รูปภาพ** `POST /v1/images/generations` `image-01`](https://ailoot.ai/models/th/image-01/#method-0)
- [**Ailoot · รูปภาพ** `POST /v1/images/generations` `minimax-image`](https://ailoot.ai/models/th/image-01/#method-1)
- [**Ailoot · รูปภาพ** `POST /v1/images/generations` `minimax-image-latest`](https://ailoot.ai/models/th/image-01/#method-2)
- [**Ailoot · รูปภาพ** `POST /v1/images/generations` `minimax/image-01`](https://ailoot.ai/models/th/image-01/#method-3)

เกี่ยวกับโมเดล

คำอธิบายนี้ครอบคลุมความสามารถของโมเดล อินพุต เอาต์พุต และตัวเลือกที่ใช้ได้ใน Ailoot แสดงด้านล่างตามเมธอดที่เลือก

#### ภาพจากคำอธิบาย

MiniMax image-01 สร้างภาพใหม่จากคำอธิบายข้อความ สามารถระบุตัวละครหรือวัตถุ สภาพแวดล้อม และสไตล์ภาพได้ การ์ด Ailoot นี้รับข้อความและส่งกลับภาพ โดยคำอธิบายกำหนดเนื้อหาและองค์ประกอบของฉากที่จะสร้าง

#### การทำงานกับรูปลักษณ์ตัวละคร

ความสามารถของโมเดลในระบบผู้ผลิตยังรวมถึงการสร้างจากภาพตัวอย่างตัวละคร ภาพต้นฉบับหนึ่งภาพที่เห็นวัตถุหลักชัดเจนช่วยถ่ายทอดลักษณะเด่นไปยังฉากใหม่ร่วมกับคำอธิบายข้อความ ผู้ผลิตแนะนำภาพบุคคลคนเดียวหน้าตรง รองรับหนึ่งภาพอ้างอิงต่อคำขอ

สำหรับภาพต้นฉบับดังกล่าว ระบุให้ใช้ JPG, JPEG และ PNG ที่ขนาดน้อยกว่า **10 MB** วิธีสร้างภาพที่ใช้ได้ในการ์ดนี้เป็นแบบข้อความ ความสามารถใช้ภาพอ้างอิงเป็นของโมเดล image-01 และไม่ได้ขยายอินพุตคำขอโดยอัตโนมัติ

#### อัตราส่วนและขนาด

image-01 มีอัตราส่วนแปดแบบ ได้แก่ **1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16 และ 21:9** ครอบคลุมองค์ประกอบสี่เหลี่ยมจัตุรัส แนวนอน แนวตั้ง และภาพกว้าง ขนาดมาตรฐานตามลำดับคือ 1024×1024, 1280×720, 1152×864, 1248×832, 832×1248, 864×1152, 720×1280 และ 1344×576 พิกเซล

ผู้ผลิตยังเปิดให้กำหนดความกว้างและความสูงพร้อมกัน แต่ละด้านตั้งแต่ **512 ถึง 2048 พิกเซล** โดยเพิ่มทีละจำนวนที่เป็นพหุคูณของ 8 หากระบุทั้งอัตราส่วนและขนาดแยก อัตราส่วนจะมีลำดับความสำคัญสูงกว่า

#### จำนวนภาพทางเลือกและพารามิเตอร์การสร้าง

ความสามารถของโมเดลรวมถึงการสร้าง **1 ถึง 9 ภาพ** ต่อคำขอ ค่าเริ่มต้นคือหนึ่งภาพ คำอธิบายข้อความจำกัดที่ **1500 อักขระ** มีการปรับคำอธิบายให้เหมาะโดยอัตโนมัติ ซึ่งปิดอยู่โดยค่าเริ่มต้น และค่า seed ใช้ค่า seed เดียวกันร่วมกับพารามิเตอร์เดียวกันเพื่อให้ผลสร้างซ้ำได้

ผลการสร้างเป็นภาพเดียวหรือชุดภาพ ผู้ผลิตรองรับการส่งข้อมูลภาพโดยตรงและการรับไฟล์ หากสร้างตัวเลือกได้ไม่ครบ จะนับจำนวนผลลัพธ์ที่สำเร็จแยกต่างหาก ขนาดและการตั้งค่าที่ระบุอธิบายความสามารถของโมเดล พารามิเตอร์ที่ใช้ได้กับคำขอเฉพาะกำหนดโดยการ์ด Ailoot

**Ailoot · รูปภาพ** `POST /v1/images/generations` `image-01`

[`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images)

MiniMax /`image-01`

ID โมเดล

- `image-01`
- `minimax-image`
- `minimax-image-latest`
- `minimax/image-01`

### เริ่มต้น

MiniMax image-01 สร้างภาพจากคำอธิบายข้อความโดยละเอียด รองรับองค์ประกอบสี่เหลี่ยมจัตุรัส แนวตั้ง และภาพกว้าง

อินพุตที่รองรับ

ข้อความ

ผลลัพธ์

รูปภาพ

### ใช้งานได้ใน Ailoot · อินพุตและเมธอด

**Ailoot · รูปภาพ** `POST /v1/images/generations`

ขาเข้า

`text`

ขาออก

`image`

รูปแบบเอาต์พุต

ไฟล์ภาพ

| ฟิลด์ | ประเภท | ข้อกำหนด | ค่าและข้อจำกัด | ค่าเริ่มต้น |
| --- | --- | --- | --- | --- |
| ฟิลด์`model` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด image-01 | ค่าเริ่มต้น— |
| ฟิลด์`prompt` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด ความยาวขั้นต่ำ: 1 | ค่าเริ่มต้น— |
| ฟิลด์`n` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขั้นต่ำ: 1 | ค่าเริ่มต้น1 |
| ฟิลด์`response_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด url, b64\_json | ค่าเริ่มต้น— |
| ฟิลด์`stream` | ประเภท`boolean` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด | ค่าเริ่มต้นfalse |
| ฟิลด์`size` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`quality` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`background` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_compression` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`moderation` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`input_fidelity` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`style` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`partial_images` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |

ชุดผสมของสื่ออินพุต

**สร้างภาพจากข้อความ** · จำเป็น: prompt

พารามิเตอร์และวงจรการทำงานของเมธอด

| พารามิเตอร์ | ข้อกำหนด |
| --- | --- |
| พารามิเตอร์`material_types` | ข้อกำหนดtext |
| พารามิเตอร์`required` | ข้อกำหนดmodel, prompt |
| พารามิเตอร์`optional_controls` | ข้อกำหนดnull |
| พารามิเตอร์`content_type` | ข้อกำหนดapplication/json |

วงจรการทำงาน: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · ค่า task\_id ที่ส่งกลับมาจริง หรือระเบียนในคลังสื่อ

`GET /v1/media/assets/{asset_id}/content`

`GET /v1/media/assets`

`GET /v1/media/assets/{asset_id}`

รูปแบบเมธอดและ ID ระบุอย่างแม่นยำ ความสามารถของผู้ให้บริการแยกจากการอนุญาตให้รับคำขอ

### ราคา

#### อัตราค่าบริการเมธอด Ailoot

ขาออก

US$0.0035 *ต่อภาพความละเอียด 1K*

ขาออก

US$0.0035 *ต่อภาพความละเอียด 2K*

Ailoot กันยอดเงินประมาณการไว้ก่อนส่งคำขอ หลังได้ผลลัพธ์ จะคิดค่าบริการสุดท้ายตามการใช้งานที่วัดได้ การคิดค่าบริการแบบสตรีมใช้บันทึกการใช้งานสุดท้าย [วิธีกันยอดเงินและคิดค่าบริการสุดท้าย →](https://ailoot.ai/docs/th/billing/reserve/)

### ตัวอย่างคำขอ

#### Ailoot · รูปภาพ

curlPython SDKNode.js SDK

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
export AILOOT_API_KEY
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 image brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "image-01", "prompt": ""}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
```

```python
from openai import OpenAI
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")

f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Set your actual UTF-8 image brief file")
request={'model': 'image-01', 'prompt': ''}
request["prompt"]=f.read_text(encoding="utf-8")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.images.generate(**request)
Path("sdk-result.txt").write_text(str(result),encoding="utf-8")
save_images([{"b64_json":getattr(item,"b64_json",None),"url":getattr(item,"url",None)} for item in result.data])
```

```js
import OpenAI from "openai";
import { readFileSync, writeFileSync } from "node:fs";
const key=process.env.AILOOT_API_KEY;
if(!key) throw new Error("Set your actual Ailoot API key");
const client=new OpenAI({baseURL:"https://api.ailoot.ai/v1",apiKey:key,maxRetries:0});
const request={"model": "image-01", "prompt": ""};
if(!process.env.AILOOT_PROMPT_FILE)throw new Error("Set your actual UTF-8 image brief file");
request.prompt=readFileSync(process.env.AILOOT_PROMPT_FILE,"utf8");
const result=await client.images.generate(request);
writeFileSync("sdk-result.json",JSON.stringify(result,null,2));
if(!result.data?.length) throw new Error("No completed images");
for(let index=0;index<result.data.length;index++) {
  const item=result.data[index];let encoded=item.b64_json,uri=item.url||"",raw;
  if(!encoded && uri.startsWith("data:image/")) {
    const comma=uri.indexOf(",");if(comma<0 || !uri.slice(0,comma).includes(";base64")) throw new Error("Unsupported image data URI");
    encoded=uri.slice(comma+1);
  }
  if(encoded) {
    if(encoded.length%4!==0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(encoded)) throw new Error("Invalid Base64");
    raw=Buffer.from(encoded,"base64");
  } else if(uri) {
    const u=new URL(uri,"https://api.ailoot.ai");
    if(u.protocol!=="https:" || u.username || u.password) throw new Error("Invalid returned URL");
    const owned=u.origin==="https://api.ailoot.ai" && u.pathname.startsWith("/v1/media/assets/") && u.pathname.endsWith("/content");
    const response=await fetch(u,{headers:owned?{Authorization:"Bearer "+key}:{},redirect:"manual"});
    if(!response.ok) throw new Error("Image content download failed: "+response.status);
    raw=Buffer.from(await response.arrayBuffer());
  } else throw new Error("Image has neither bytes nor URL");
  if(!raw.length) throw new Error("Empty image result");
  const ext=raw.subarray(0,4).equals(Buffer.from([137,80,78,71]))?"png":raw[0]===255&&raw[1]===216?"jpg":raw.toString("ascii",0,4)==="RIFF"&&raw.toString("ascii",8,12)==="WEBP"?"webp":raw.toString("utf8").trimStart().startsWith("<svg")||raw.toString("utf8").trimStart().startsWith("<?xml")?"svg":"bin";
  writeFileSync(`image-${index}.${ext}`,raw);
}
console.log("Every returned image saved; sdk-result.json retains complete metadata");
```

### รับและบันทึกผลลัพธ์

#### Ailoot · รูปภาพ

ดาวน์โหลดภาพที่ส่งกลับมาทุกภาพ หรือบันทึกเนื้อหา Base64 ของภาพนั้น

- `GET /v1/media/tasks/{task_id}`
- `GET /v1/media/assets/{asset_id}/content`
- `GET /v1/media/assets`
- `GET /v1/media/assets/{asset_id}`

##### เก็บผลลัพธ์ที่เสร็จสมบูรณ์ทั้งหมด

บันทึกภาพที่สร้างเสร็จทุกภาพ โดยดึงภาพจากทุก URL ที่ส่งกลับมา หรือถอดรหัสเนื้อหา Base64

บันทึกข้อมูลทุกรายการ ถอดรหัส b64\_json แต่ละรายการ หรือดึงข้อมูลจาก URL ที่ลงนามแล้วและส่งกลับมาทุกรายการ เลือกนามสกุลไฟล์จาก MIME/ไบต์จริง

##### เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ

หากผลลัพธ์การสร้างหรือแก้ไขภาพต้องได้รับการตรวจสอบ ให้เก็บ operation\_id/X-Client-Request-ID เดิมและข้อมูลผลลัพธ์ที่ส่งกลับมาไว้ กู้คืนผลลัพธ์ที่มีอยู่และเป็นของตนเองผ่านคลังสื่อโดยใช้ค่า task\_id หรือ asset\_id จริง ห้ามส่งคำขอสร้าง/แก้ไขซ้ำ หรือสร้าง URL สำหรับตรวจสอบสถานะเป็นระยะจาก operation\_id

ฟิลด์การตอบกลับ

| ฟิลด์ | ประเภท |
| --- | --- |
| ฟิลด์`created` | ประเภทinteger |
| ฟิลด์`data[].url` | ประเภทstring |
| ฟิลด์`data[].b64_json` | ประเภทbase64 string |
| ฟิลด์`usage` | ประเภทobject |

ข้อผิดพลาดและขั้นตอนถัดไป

| การตอบกลับ | เงื่อนไข | ขั้นตอนถัดไป |
| --- | --- | --- |
| การตอบกลับ400 · `invalid_request_error` | เงื่อนไขฟิลด์จำเป็น รูปแบบการแทนข้อมูล หรือค่าพารามิเตอร์ไม่ถูกต้อง | ขั้นตอนถัดไปแก้ฟิลด์ที่ระบุก่อนส่งคำขอสร้างครั้งใหม่ |
| การตอบกลับ`server_error` | เงื่อนไขการตอบกลับที่ได้รับระบุว่าต้องตรวจสอบการดำเนินการหรือผลลัพธ์ | ขั้นตอนถัดไปเก็บ ID การดำเนินการ/งานที่ส่งกลับมาแต่เดิม ส่วนหัวของคำขอ และการตอบกลับไว้ แล้วอ่านข้อมูลการดำเนินการเดิมนั้นต่อด้วยวิธีที่รองรับ ห้ามส่งคำขอสร้างซ้ำ |

### ชื่ออื่น

#### ชื่ออื่นของโมเดล

**Ailoot** [`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

#### ชื่อพาธเมธอดอื่น

ใช้พาธเมธอดที่แสดงด้านบน

#### ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล

[`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

**Ailoot · รูปภาพ** `POST /v1/images/generations` `minimax-image`

[`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images)

MiniMax /`minimax-image`

ID โมเดล

- `image-01`
- `minimax-image`
- `minimax-image-latest`
- `minimax/image-01`

### เริ่มต้น

MiniMax image-01 สร้างภาพจากคำอธิบายข้อความโดยละเอียด รองรับองค์ประกอบสี่เหลี่ยมจัตุรัส แนวตั้ง และภาพกว้าง

อินพุตที่รองรับ

ข้อความ

ผลลัพธ์

รูปภาพ

### ใช้งานได้ใน Ailoot · อินพุตและเมธอด

**Ailoot · รูปภาพ** `POST /v1/images/generations`

ขาเข้า

`text`

ขาออก

`image`

รูปแบบเอาต์พุต

ไฟล์ภาพ

| ฟิลด์ | ประเภท | ข้อกำหนด | ค่าและข้อจำกัด | ค่าเริ่มต้น |
| --- | --- | --- | --- | --- |
| ฟิลด์`model` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด minimax-image | ค่าเริ่มต้น— |
| ฟิลด์`prompt` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด ความยาวขั้นต่ำ: 1 | ค่าเริ่มต้น— |
| ฟิลด์`n` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขั้นต่ำ: 1 | ค่าเริ่มต้น1 |
| ฟิลด์`response_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด url, b64\_json | ค่าเริ่มต้น— |
| ฟิลด์`stream` | ประเภท`boolean` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด | ค่าเริ่มต้นfalse |
| ฟิลด์`size` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`quality` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`background` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_compression` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`moderation` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`input_fidelity` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`style` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`partial_images` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |

ชุดผสมของสื่ออินพุต

**สร้างภาพจากข้อความ** · จำเป็น: prompt

พารามิเตอร์และวงจรการทำงานของเมธอด

| พารามิเตอร์ | ข้อกำหนด |
| --- | --- |
| พารามิเตอร์`material_types` | ข้อกำหนดtext |
| พารามิเตอร์`required` | ข้อกำหนดmodel, prompt |
| พารามิเตอร์`optional_controls` | ข้อกำหนดnull |
| พารามิเตอร์`content_type` | ข้อกำหนดapplication/json |

วงจรการทำงาน: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · ค่า task\_id ที่ส่งกลับมาจริง หรือระเบียนในคลังสื่อ

`GET /v1/media/assets/{asset_id}/content`

`GET /v1/media/assets`

`GET /v1/media/assets/{asset_id}`

รูปแบบเมธอดและ ID ระบุอย่างแม่นยำ ความสามารถของผู้ให้บริการแยกจากการอนุญาตให้รับคำขอ

### ราคา

#### อัตราค่าบริการเมธอด Ailoot

ขาออก

US$0.0035 *ต่อภาพความละเอียด 1K*

ขาออก

US$0.0035 *ต่อภาพความละเอียด 2K*

Ailoot กันยอดเงินประมาณการไว้ก่อนส่งคำขอ หลังได้ผลลัพธ์ จะคิดค่าบริการสุดท้ายตามการใช้งานที่วัดได้ การคิดค่าบริการแบบสตรีมใช้บันทึกการใช้งานสุดท้าย [วิธีกันยอดเงินและคิดค่าบริการสุดท้าย →](https://ailoot.ai/docs/th/billing/reserve/)

### ตัวอย่างคำขอ

#### Ailoot · รูปภาพ

curlPython SDKNode.js SDK

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
export AILOOT_API_KEY
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 image brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "minimax-image", "prompt": ""}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
```

```python
from openai import OpenAI
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")

f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Set your actual UTF-8 image brief file")
request={'model': 'minimax-image', 'prompt': ''}
request["prompt"]=f.read_text(encoding="utf-8")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.images.generate(**request)
Path("sdk-result.txt").write_text(str(result),encoding="utf-8")
save_images([{"b64_json":getattr(item,"b64_json",None),"url":getattr(item,"url",None)} for item in result.data])
```

```js
import OpenAI from "openai";
import { readFileSync, writeFileSync } from "node:fs";
const key=process.env.AILOOT_API_KEY;
if(!key) throw new Error("Set your actual Ailoot API key");
const client=new OpenAI({baseURL:"https://api.ailoot.ai/v1",apiKey:key,maxRetries:0});
const request={"model": "minimax-image", "prompt": ""};
if(!process.env.AILOOT_PROMPT_FILE)throw new Error("Set your actual UTF-8 image brief file");
request.prompt=readFileSync(process.env.AILOOT_PROMPT_FILE,"utf8");
const result=await client.images.generate(request);
writeFileSync("sdk-result.json",JSON.stringify(result,null,2));
if(!result.data?.length) throw new Error("No completed images");
for(let index=0;index<result.data.length;index++) {
  const item=result.data[index];let encoded=item.b64_json,uri=item.url||"",raw;
  if(!encoded && uri.startsWith("data:image/")) {
    const comma=uri.indexOf(",");if(comma<0 || !uri.slice(0,comma).includes(";base64")) throw new Error("Unsupported image data URI");
    encoded=uri.slice(comma+1);
  }
  if(encoded) {
    if(encoded.length%4!==0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(encoded)) throw new Error("Invalid Base64");
    raw=Buffer.from(encoded,"base64");
  } else if(uri) {
    const u=new URL(uri,"https://api.ailoot.ai");
    if(u.protocol!=="https:" || u.username || u.password) throw new Error("Invalid returned URL");
    const owned=u.origin==="https://api.ailoot.ai" && u.pathname.startsWith("/v1/media/assets/") && u.pathname.endsWith("/content");
    const response=await fetch(u,{headers:owned?{Authorization:"Bearer "+key}:{},redirect:"manual"});
    if(!response.ok) throw new Error("Image content download failed: "+response.status);
    raw=Buffer.from(await response.arrayBuffer());
  } else throw new Error("Image has neither bytes nor URL");
  if(!raw.length) throw new Error("Empty image result");
  const ext=raw.subarray(0,4).equals(Buffer.from([137,80,78,71]))?"png":raw[0]===255&&raw[1]===216?"jpg":raw.toString("ascii",0,4)==="RIFF"&&raw.toString("ascii",8,12)==="WEBP"?"webp":raw.toString("utf8").trimStart().startsWith("<svg")||raw.toString("utf8").trimStart().startsWith("<?xml")?"svg":"bin";
  writeFileSync(`image-${index}.${ext}`,raw);
}
console.log("Every returned image saved; sdk-result.json retains complete metadata");
```

### รับและบันทึกผลลัพธ์

#### Ailoot · รูปภาพ

ดาวน์โหลดภาพที่ส่งกลับมาทุกภาพ หรือบันทึกเนื้อหา Base64 ของภาพนั้น

- `GET /v1/media/tasks/{task_id}`
- `GET /v1/media/assets/{asset_id}/content`
- `GET /v1/media/assets`
- `GET /v1/media/assets/{asset_id}`

##### เก็บผลลัพธ์ที่เสร็จสมบูรณ์ทั้งหมด

บันทึกภาพที่สร้างเสร็จทุกภาพ โดยดึงภาพจากทุก URL ที่ส่งกลับมา หรือถอดรหัสเนื้อหา Base64

บันทึกข้อมูลทุกรายการ ถอดรหัส b64\_json แต่ละรายการ หรือดึงข้อมูลจาก URL ที่ลงนามแล้วและส่งกลับมาทุกรายการ เลือกนามสกุลไฟล์จาก MIME/ไบต์จริง

##### เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ

หากผลลัพธ์การสร้างหรือแก้ไขภาพต้องได้รับการตรวจสอบ ให้เก็บ operation\_id/X-Client-Request-ID เดิมและข้อมูลผลลัพธ์ที่ส่งกลับมาไว้ กู้คืนผลลัพธ์ที่มีอยู่และเป็นของตนเองผ่านคลังสื่อโดยใช้ค่า task\_id หรือ asset\_id จริง ห้ามส่งคำขอสร้าง/แก้ไขซ้ำ หรือสร้าง URL สำหรับตรวจสอบสถานะเป็นระยะจาก operation\_id

ฟิลด์การตอบกลับ

| ฟิลด์ | ประเภท |
| --- | --- |
| ฟิลด์`created` | ประเภทinteger |
| ฟิลด์`data[].url` | ประเภทstring |
| ฟิลด์`data[].b64_json` | ประเภทbase64 string |
| ฟิลด์`usage` | ประเภทobject |

ข้อผิดพลาดและขั้นตอนถัดไป

| การตอบกลับ | เงื่อนไข | ขั้นตอนถัดไป |
| --- | --- | --- |
| การตอบกลับ400 · `invalid_request_error` | เงื่อนไขฟิลด์จำเป็น รูปแบบการแทนข้อมูล หรือค่าพารามิเตอร์ไม่ถูกต้อง | ขั้นตอนถัดไปแก้ฟิลด์ที่ระบุก่อนส่งคำขอสร้างครั้งใหม่ |
| การตอบกลับ`server_error` | เงื่อนไขการตอบกลับที่ได้รับระบุว่าต้องตรวจสอบการดำเนินการหรือผลลัพธ์ | ขั้นตอนถัดไปเก็บ ID การดำเนินการ/งานที่ส่งกลับมาแต่เดิม ส่วนหัวของคำขอ และการตอบกลับไว้ แล้วอ่านข้อมูลการดำเนินการเดิมนั้นต่อด้วยวิธีที่รองรับ ห้ามส่งคำขอสร้างซ้ำ |

### ชื่ออื่น

#### ชื่ออื่นของโมเดล

**Ailoot** [`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

#### ชื่อพาธเมธอดอื่น

ใช้พาธเมธอดที่แสดงด้านบน

#### ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล

[`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

**Ailoot · รูปภาพ** `POST /v1/images/generations` `minimax-image-latest`

[`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images)

MiniMax /`minimax-image-latest`

ID โมเดล

- `image-01`
- `minimax-image`
- `minimax-image-latest`
- `minimax/image-01`

### เริ่มต้น

MiniMax image-01 สร้างภาพจากคำอธิบายข้อความโดยละเอียด รองรับองค์ประกอบสี่เหลี่ยมจัตุรัส แนวตั้ง และภาพกว้าง

อินพุตที่รองรับ

ข้อความ

ผลลัพธ์

รูปภาพ

### ใช้งานได้ใน Ailoot · อินพุตและเมธอด

**Ailoot · รูปภาพ** `POST /v1/images/generations`

ขาเข้า

`text`

ขาออก

`image`

รูปแบบเอาต์พุต

ไฟล์ภาพ

| ฟิลด์ | ประเภท | ข้อกำหนด | ค่าและข้อจำกัด | ค่าเริ่มต้น |
| --- | --- | --- | --- | --- |
| ฟิลด์`model` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด minimax-image-latest | ค่าเริ่มต้น— |
| ฟิลด์`prompt` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด ความยาวขั้นต่ำ: 1 | ค่าเริ่มต้น— |
| ฟิลด์`n` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขั้นต่ำ: 1 | ค่าเริ่มต้น1 |
| ฟิลด์`response_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด url, b64\_json | ค่าเริ่มต้น— |
| ฟิลด์`stream` | ประเภท`boolean` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด | ค่าเริ่มต้นfalse |
| ฟิลด์`size` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`quality` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`background` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_compression` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`moderation` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`input_fidelity` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`style` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`partial_images` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |

ชุดผสมของสื่ออินพุต

**สร้างภาพจากข้อความ** · จำเป็น: prompt

พารามิเตอร์และวงจรการทำงานของเมธอด

| พารามิเตอร์ | ข้อกำหนด |
| --- | --- |
| พารามิเตอร์`material_types` | ข้อกำหนดtext |
| พารามิเตอร์`required` | ข้อกำหนดmodel, prompt |
| พารามิเตอร์`optional_controls` | ข้อกำหนดnull |
| พารามิเตอร์`content_type` | ข้อกำหนดapplication/json |

วงจรการทำงาน: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · ค่า task\_id ที่ส่งกลับมาจริง หรือระเบียนในคลังสื่อ

`GET /v1/media/assets/{asset_id}/content`

`GET /v1/media/assets`

`GET /v1/media/assets/{asset_id}`

รูปแบบเมธอดและ ID ระบุอย่างแม่นยำ ความสามารถของผู้ให้บริการแยกจากการอนุญาตให้รับคำขอ

### ราคา

#### อัตราค่าบริการเมธอด Ailoot

ขาออก

US$0.0035 *ต่อภาพความละเอียด 1K*

ขาออก

US$0.0035 *ต่อภาพความละเอียด 2K*

Ailoot กันยอดเงินประมาณการไว้ก่อนส่งคำขอ หลังได้ผลลัพธ์ จะคิดค่าบริการสุดท้ายตามการใช้งานที่วัดได้ การคิดค่าบริการแบบสตรีมใช้บันทึกการใช้งานสุดท้าย [วิธีกันยอดเงินและคิดค่าบริการสุดท้าย →](https://ailoot.ai/docs/th/billing/reserve/)

### ตัวอย่างคำขอ

#### Ailoot · รูปภาพ

curlPython SDKNode.js SDK

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
export AILOOT_API_KEY
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 image brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "minimax-image-latest", "prompt": ""}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
```

```python
from openai import OpenAI
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")

f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Set your actual UTF-8 image brief file")
request={'model': 'minimax-image-latest', 'prompt': ''}
request["prompt"]=f.read_text(encoding="utf-8")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.images.generate(**request)
Path("sdk-result.txt").write_text(str(result),encoding="utf-8")
save_images([{"b64_json":getattr(item,"b64_json",None),"url":getattr(item,"url",None)} for item in result.data])
```

```js
import OpenAI from "openai";
import { readFileSync, writeFileSync } from "node:fs";
const key=process.env.AILOOT_API_KEY;
if(!key) throw new Error("Set your actual Ailoot API key");
const client=new OpenAI({baseURL:"https://api.ailoot.ai/v1",apiKey:key,maxRetries:0});
const request={"model": "minimax-image-latest", "prompt": ""};
if(!process.env.AILOOT_PROMPT_FILE)throw new Error("Set your actual UTF-8 image brief file");
request.prompt=readFileSync(process.env.AILOOT_PROMPT_FILE,"utf8");
const result=await client.images.generate(request);
writeFileSync("sdk-result.json",JSON.stringify(result,null,2));
if(!result.data?.length) throw new Error("No completed images");
for(let index=0;index<result.data.length;index++) {
  const item=result.data[index];let encoded=item.b64_json,uri=item.url||"",raw;
  if(!encoded && uri.startsWith("data:image/")) {
    const comma=uri.indexOf(",");if(comma<0 || !uri.slice(0,comma).includes(";base64")) throw new Error("Unsupported image data URI");
    encoded=uri.slice(comma+1);
  }
  if(encoded) {
    if(encoded.length%4!==0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(encoded)) throw new Error("Invalid Base64");
    raw=Buffer.from(encoded,"base64");
  } else if(uri) {
    const u=new URL(uri,"https://api.ailoot.ai");
    if(u.protocol!=="https:" || u.username || u.password) throw new Error("Invalid returned URL");
    const owned=u.origin==="https://api.ailoot.ai" && u.pathname.startsWith("/v1/media/assets/") && u.pathname.endsWith("/content");
    const response=await fetch(u,{headers:owned?{Authorization:"Bearer "+key}:{},redirect:"manual"});
    if(!response.ok) throw new Error("Image content download failed: "+response.status);
    raw=Buffer.from(await response.arrayBuffer());
  } else throw new Error("Image has neither bytes nor URL");
  if(!raw.length) throw new Error("Empty image result");
  const ext=raw.subarray(0,4).equals(Buffer.from([137,80,78,71]))?"png":raw[0]===255&&raw[1]===216?"jpg":raw.toString("ascii",0,4)==="RIFF"&&raw.toString("ascii",8,12)==="WEBP"?"webp":raw.toString("utf8").trimStart().startsWith("<svg")||raw.toString("utf8").trimStart().startsWith("<?xml")?"svg":"bin";
  writeFileSync(`image-${index}.${ext}`,raw);
}
console.log("Every returned image saved; sdk-result.json retains complete metadata");
```

### รับและบันทึกผลลัพธ์

#### Ailoot · รูปภาพ

ดาวน์โหลดภาพที่ส่งกลับมาทุกภาพ หรือบันทึกเนื้อหา Base64 ของภาพนั้น

- `GET /v1/media/tasks/{task_id}`
- `GET /v1/media/assets/{asset_id}/content`
- `GET /v1/media/assets`
- `GET /v1/media/assets/{asset_id}`

##### เก็บผลลัพธ์ที่เสร็จสมบูรณ์ทั้งหมด

บันทึกภาพที่สร้างเสร็จทุกภาพ โดยดึงภาพจากทุก URL ที่ส่งกลับมา หรือถอดรหัสเนื้อหา Base64

บันทึกข้อมูลทุกรายการ ถอดรหัส b64\_json แต่ละรายการ หรือดึงข้อมูลจาก URL ที่ลงนามแล้วและส่งกลับมาทุกรายการ เลือกนามสกุลไฟล์จาก MIME/ไบต์จริง

##### เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ

หากผลลัพธ์การสร้างหรือแก้ไขภาพต้องได้รับการตรวจสอบ ให้เก็บ operation\_id/X-Client-Request-ID เดิมและข้อมูลผลลัพธ์ที่ส่งกลับมาไว้ กู้คืนผลลัพธ์ที่มีอยู่และเป็นของตนเองผ่านคลังสื่อโดยใช้ค่า task\_id หรือ asset\_id จริง ห้ามส่งคำขอสร้าง/แก้ไขซ้ำ หรือสร้าง URL สำหรับตรวจสอบสถานะเป็นระยะจาก operation\_id

ฟิลด์การตอบกลับ

| ฟิลด์ | ประเภท |
| --- | --- |
| ฟิลด์`created` | ประเภทinteger |
| ฟิลด์`data[].url` | ประเภทstring |
| ฟิลด์`data[].b64_json` | ประเภทbase64 string |
| ฟิลด์`usage` | ประเภทobject |

ข้อผิดพลาดและขั้นตอนถัดไป

| การตอบกลับ | เงื่อนไข | ขั้นตอนถัดไป |
| --- | --- | --- |
| การตอบกลับ400 · `invalid_request_error` | เงื่อนไขฟิลด์จำเป็น รูปแบบการแทนข้อมูล หรือค่าพารามิเตอร์ไม่ถูกต้อง | ขั้นตอนถัดไปแก้ฟิลด์ที่ระบุก่อนส่งคำขอสร้างครั้งใหม่ |
| การตอบกลับ`server_error` | เงื่อนไขการตอบกลับที่ได้รับระบุว่าต้องตรวจสอบการดำเนินการหรือผลลัพธ์ | ขั้นตอนถัดไปเก็บ ID การดำเนินการ/งานที่ส่งกลับมาแต่เดิม ส่วนหัวของคำขอ และการตอบกลับไว้ แล้วอ่านข้อมูลการดำเนินการเดิมนั้นต่อด้วยวิธีที่รองรับ ห้ามส่งคำขอสร้างซ้ำ |

### ชื่ออื่น

#### ชื่ออื่นของโมเดล

**Ailoot** [`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

#### ชื่อพาธเมธอดอื่น

ใช้พาธเมธอดที่แสดงด้านบน

#### ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล

[`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

**Ailoot · รูปภาพ** `POST /v1/images/generations` `minimax/image-01`

[`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

MiniMax /`minimax/image-01`

ID โมเดล

- `image-01`
- `minimax-image`
- `minimax-image-latest`
- `minimax/image-01`

### เริ่มต้น

MiniMax image-01 สร้างภาพจากคำอธิบายข้อความโดยละเอียด รองรับองค์ประกอบสี่เหลี่ยมจัตุรัส แนวตั้ง และภาพกว้าง

อินพุตที่รองรับ

ข้อความ

ผลลัพธ์

รูปภาพ

### ใช้งานได้ใน Ailoot · อินพุตและเมธอด

**Ailoot · รูปภาพ** `POST /v1/images/generations`

ขาเข้า

`text`

ขาออก

`image`

รูปแบบเอาต์พุต

ไฟล์ภาพ

| ฟิลด์ | ประเภท | ข้อกำหนด | ค่าและข้อจำกัด | ค่าเริ่มต้น |
| --- | --- | --- | --- | --- |
| ฟิลด์`model` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด minimax/image-01 | ค่าเริ่มต้น— |
| ฟิลด์`prompt` | ประเภท`string` | ข้อกำหนดจำเป็น | ค่าและข้อจำกัด ความยาวขั้นต่ำ: 1 | ค่าเริ่มต้น— |
| ฟิลด์`n` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขั้นต่ำ: 1 | ค่าเริ่มต้น1 |
| ฟิลด์`response_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด url, b64\_json | ค่าเริ่มต้น— |
| ฟิลด์`stream` | ประเภท`boolean` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด | ค่าเริ่มต้นfalse |
| ฟิลด์`size` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`quality` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`background` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_format` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`output_compression` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`moderation` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`input_fidelity` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`style` | ประเภท`string` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |
| ฟิลด์`partial_images` | ประเภท`integer` | ข้อกำหนดไม่บังคับ | ค่าและข้อจำกัด ขึ้นอยู่กับโมเดล | ค่าเริ่มต้น— |

ชุดผสมของสื่ออินพุต

**สร้างภาพจากข้อความ** · จำเป็น: prompt

พารามิเตอร์และวงจรการทำงานของเมธอด

| พารามิเตอร์ | ข้อกำหนด |
| --- | --- |
| พารามิเตอร์`material_types` | ข้อกำหนดtext |
| พารามิเตอร์`required` | ข้อกำหนดmodel, prompt |
| พารามิเตอร์`optional_controls` | ข้อกำหนดnull |
| พารามิเตอร์`content_type` | ข้อกำหนดapplication/json |

วงจรการทำงาน: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · ค่า task\_id ที่ส่งกลับมาจริง หรือระเบียนในคลังสื่อ

`GET /v1/media/assets/{asset_id}/content`

`GET /v1/media/assets`

`GET /v1/media/assets/{asset_id}`

รูปแบบเมธอดและ ID ระบุอย่างแม่นยำ ความสามารถของผู้ให้บริการแยกจากการอนุญาตให้รับคำขอ

### ราคา

#### อัตราค่าบริการเมธอด Ailoot

ขาออก

US$0.0035 *ต่อภาพความละเอียด 1K*

ขาออก

US$0.0035 *ต่อภาพความละเอียด 2K*

Ailoot กันยอดเงินประมาณการไว้ก่อนส่งคำขอ หลังได้ผลลัพธ์ จะคิดค่าบริการสุดท้ายตามการใช้งานที่วัดได้ การคิดค่าบริการแบบสตรีมใช้บันทึกการใช้งานสุดท้าย [วิธีกันยอดเงินและคิดค่าบริการสุดท้าย →](https://ailoot.ai/docs/th/billing/reserve/)

### ตัวอย่างคำขอ

#### Ailoot · รูปภาพ

curlPython SDKNode.js SDK

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
export AILOOT_API_KEY
: "${AILOOT_PROMPT_FILE:?Set your actual UTF-8 image brief}"
export AILOOT_PROMPT_FILE
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p=json.loads('{"model": "minimax/image-01", "prompt": ""}')
f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Choose your actual UTF-8 brief")
p['prompt']=f.read_text(encoding="utf-8")
if not p['prompt'].strip():raise SystemExit("Brief must contain text")
Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
```

```python
from openai import OpenAI
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")

f=Path(os.environ["AILOOT_PROMPT_FILE"])
if not f.is_file():raise SystemExit("Set your actual UTF-8 image brief file")
request={'model': 'minimax/image-01', 'prompt': ''}
request["prompt"]=f.read_text(encoding="utf-8")
client=OpenAI(base_url="https://api.ailoot.ai/v1",api_key=os.environ["AILOOT_API_KEY"],max_retries=0)
result=client.images.generate(**request)
Path("sdk-result.txt").write_text(str(result),encoding="utf-8")
save_images([{"b64_json":getattr(item,"b64_json",None),"url":getattr(item,"url",None)} for item in result.data])
```

```js
import OpenAI from "openai";
import { readFileSync, writeFileSync } from "node:fs";
const key=process.env.AILOOT_API_KEY;
if(!key) throw new Error("Set your actual Ailoot API key");
const client=new OpenAI({baseURL:"https://api.ailoot.ai/v1",apiKey:key,maxRetries:0});
const request={"model": "minimax/image-01", "prompt": ""};
if(!process.env.AILOOT_PROMPT_FILE)throw new Error("Set your actual UTF-8 image brief file");
request.prompt=readFileSync(process.env.AILOOT_PROMPT_FILE,"utf8");
const result=await client.images.generate(request);
writeFileSync("sdk-result.json",JSON.stringify(result,null,2));
if(!result.data?.length) throw new Error("No completed images");
for(let index=0;index<result.data.length;index++) {
  const item=result.data[index];let encoded=item.b64_json,uri=item.url||"",raw;
  if(!encoded && uri.startsWith("data:image/")) {
    const comma=uri.indexOf(",");if(comma<0 || !uri.slice(0,comma).includes(";base64")) throw new Error("Unsupported image data URI");
    encoded=uri.slice(comma+1);
  }
  if(encoded) {
    if(encoded.length%4!==0 || !/^[A-Za-z0-9+/]*={0,2}$/.test(encoded)) throw new Error("Invalid Base64");
    raw=Buffer.from(encoded,"base64");
  } else if(uri) {
    const u=new URL(uri,"https://api.ailoot.ai");
    if(u.protocol!=="https:" || u.username || u.password) throw new Error("Invalid returned URL");
    const owned=u.origin==="https://api.ailoot.ai" && u.pathname.startsWith("/v1/media/assets/") && u.pathname.endsWith("/content");
    const response=await fetch(u,{headers:owned?{Authorization:"Bearer "+key}:{},redirect:"manual"});
    if(!response.ok) throw new Error("Image content download failed: "+response.status);
    raw=Buffer.from(await response.arrayBuffer());
  } else throw new Error("Image has neither bytes nor URL");
  if(!raw.length) throw new Error("Empty image result");
  const ext=raw.subarray(0,4).equals(Buffer.from([137,80,78,71]))?"png":raw[0]===255&&raw[1]===216?"jpg":raw.toString("ascii",0,4)==="RIFF"&&raw.toString("ascii",8,12)==="WEBP"?"webp":raw.toString("utf8").trimStart().startsWith("<svg")||raw.toString("utf8").trimStart().startsWith("<?xml")?"svg":"bin";
  writeFileSync(`image-${index}.${ext}`,raw);
}
console.log("Every returned image saved; sdk-result.json retains complete metadata");
```

### รับและบันทึกผลลัพธ์

#### Ailoot · รูปภาพ

ดาวน์โหลดภาพที่ส่งกลับมาทุกภาพ หรือบันทึกเนื้อหา Base64 ของภาพนั้น

- `GET /v1/media/tasks/{task_id}`
- `GET /v1/media/assets/{asset_id}/content`
- `GET /v1/media/assets`
- `GET /v1/media/assets/{asset_id}`

##### เก็บผลลัพธ์ที่เสร็จสมบูรณ์ทั้งหมด

บันทึกภาพที่สร้างเสร็จทุกภาพ โดยดึงภาพจากทุก URL ที่ส่งกลับมา หรือถอดรหัสเนื้อหา Base64

บันทึกข้อมูลทุกรายการ ถอดรหัส b64\_json แต่ละรายการ หรือดึงข้อมูลจาก URL ที่ลงนามแล้วและส่งกลับมาทุกรายการ เลือกนามสกุลไฟล์จาก MIME/ไบต์จริง

##### เมื่อต้องตรวจสอบการตอบกลับต้นฉบับ

หากผลลัพธ์การสร้างหรือแก้ไขภาพต้องได้รับการตรวจสอบ ให้เก็บ operation\_id/X-Client-Request-ID เดิมและข้อมูลผลลัพธ์ที่ส่งกลับมาไว้ กู้คืนผลลัพธ์ที่มีอยู่และเป็นของตนเองผ่านคลังสื่อโดยใช้ค่า task\_id หรือ asset\_id จริง ห้ามส่งคำขอสร้าง/แก้ไขซ้ำ หรือสร้าง URL สำหรับตรวจสอบสถานะเป็นระยะจาก operation\_id

ฟิลด์การตอบกลับ

| ฟิลด์ | ประเภท |
| --- | --- |
| ฟิลด์`created` | ประเภทinteger |
| ฟิลด์`data[].url` | ประเภทstring |
| ฟิลด์`data[].b64_json` | ประเภทbase64 string |
| ฟิลด์`usage` | ประเภทobject |

ข้อผิดพลาดและขั้นตอนถัดไป

| การตอบกลับ | เงื่อนไข | ขั้นตอนถัดไป |
| --- | --- | --- |
| การตอบกลับ400 · `invalid_request_error` | เงื่อนไขฟิลด์จำเป็น รูปแบบการแทนข้อมูล หรือค่าพารามิเตอร์ไม่ถูกต้อง | ขั้นตอนถัดไปแก้ฟิลด์ที่ระบุก่อนส่งคำขอสร้างครั้งใหม่ |
| การตอบกลับ`server_error` | เงื่อนไขการตอบกลับที่ได้รับระบุว่าต้องตรวจสอบการดำเนินการหรือผลลัพธ์ | ขั้นตอนถัดไปเก็บ ID การดำเนินการ/งานที่ส่งกลับมาแต่เดิม ส่วนหัวของคำขอ และการตอบกลับไว้ แล้วอ่านข้อมูลการดำเนินการเดิมนั้นต่อด้วยวิธีที่รองรับ ห้ามส่งคำขอสร้างซ้ำ |

### ชื่ออื่น

#### ชื่ออื่นของโมเดล

**Ailoot** [`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

#### ชื่อพาธเมธอดอื่น

ใช้พาธเมธอดที่แสดงด้านบน

#### ID ที่เกี่ยวข้องสำหรับเรียกใช้โมเดล

[`image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=image-01&fmt=images), [`minimax-image`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image&fmt=images), [`minimax-image-latest`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax-image-latest&fmt=images), [`minimax/image-01`](https://ailoot.ai/models/th/#m=image-01&route=Core&caller=minimax%2Fimage-01&fmt=images)

FAQ · image-01

มีอินพุตและผลลัพธ์ใดบ้าง?

`POST /v1/images/generations` · `image-01`: `text` → `image` `POST /v1/images/generations` · `minimax-image`: `text` → `image` `POST /v1/images/generations` · `minimax-image-latest`: `text` → `image` `POST /v1/images/generations` · `minimax/image-01`: `text` → `image`

คำขอใช้ฟิลด์ใดบ้าง?

`POST /v1/images/generations` · `image-01`: `model`, `prompt`, `n`, `response_format`, `stream` `POST /v1/images/generations` · `minimax-image`: `model`, `prompt`, `n`, `response_format`, `stream` `POST /v1/images/generations` · `minimax-image-latest`: `model`, `prompt`, `n`, `response_format`, `stream` `POST /v1/images/generations` · `minimax/image-01`: `model`, `prompt`, `n`, `response_format`, `stream`

มีข้อจำกัดใดบ้าง?

`POST /v1/images/generations` · `image-01`: `n.minimum`: `1` `POST /v1/images/generations` · `minimax-image`: `n.minimum`: `1` `POST /v1/images/generations` · `minimax-image-latest`: `n.minimum`: `1` `POST /v1/images/generations` · `minimax/image-01`: `n.minimum`: `1`

เชื่อม Ailoot กับ Claude Code, OpenCode, Hermes หรือแอปของคุณ

## บริษัทและพอร์ตโฟลิโอโครงการของบริษัท

บริษัทและพอร์ตโฟลิโอโครงการของบริษัท: ลูกค้าหลายล้านราย; ยอดขายระดับหลายพันล้านต่อเดือน.

## ซื้อโทเคนพร้อมส่วนลด

ส่วนลดสมาชิกสำหรับงานประจำ โค้ดโปรโมชั่นลดซื้อโทเคนสูงสุด 50%

สมาชิก

เลือกแพ็กเกจมีส่วนลดสำหรับคำขอประจำ

โค้ดลดสูงสุด 50%

ใส่โค้ดขณะซื้อ ราคาคำนวณใหม่ตามโปรโมชั่นที่ใช้

รายจ่ายในประวัติ

เก็บโมเดล โทเคน และยอดสำหรับทุกคำขอ

[เลือกสมาชิก](https://ailoot.ai/docs/th/billing/subscriptions/) · [ดูราคาโมเดล](https://ailoot.ai/models/th/)

## เชื่อม API กับผลิตภัณฑ์ ที่คุณขาย

SaaS แอป และบอต ตามข้อเสนอและสัญญาอนุญาต Ailoot หากขายต่อให้ขอใบอนุญาตรีเซลเลอร์

แอปเชิงพาณิชย์

ใส่การสร้างข้อความ ภาพ วิดีโอ และเสียงในฟีเจอร์เสียเงินของบริการคุณ

ใบอนุญาตรีเซลเลอร์

ส่งคำอธิบายโครงการและรูปแบบการเข้าถึง ขอเงื่อนไขใช้และขายต่อเป็นลายลักษณ์อักษร

เอกสารบนเว็บไซต์

อ่านข้อเสนอ สัญญาอนุญาต และนโยบายประมวลผลข้อมูลก่อนเชื่อมได้

[ขอใบอนุญาตขายต่อ](mailto:support@ailoot.ai) · [ข้อเสนอและสัญญาอนุญาต](https://ailoot.ai/legal/offer?lang=th)

## Ailoot · บริษัทและพอร์ตโฟลิโอโครงการของบริษัท





Ailoot อาศัยประสบการณ์การดำเนินงานที่สั่งสม ฐานลูกค้าขนาดใหญ่ บริการที่เสถียร และการติดตาม KPI อย่างต่อเนื่อง





บริษัทและพอร์ตโฟลิโอโครงการของบริษัท: ลูกค้าหลายล้านราย; ยอดขายระดับหลายพันล้านต่อเดือน.





Ailoot นำประสบการณ์การดำเนินงานนี้มาใช้เพื่อให้เข้าถึงฟังก์ชัน AI ผ่าน API ในผลิตภัณฑ์ของลูกค้า เอเจนต์ แอปพลิเคชัน และระบบอัตโนมัติ
