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

# image-01

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

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

MiniMax image-01 erstellt Bilder anhand einer detaillierten Textbeschreibung und unterstützt quadratische, vertikale und breite Kompositionen.

- [**Ailoot · Bilder** `POST /v1/images/generations` `image-01`](https://ailoot.ai/models/de-ch/image-01/#method-0)
- [**Ailoot · Bilder** `POST /v1/images/generations` `minimax-image`](https://ailoot.ai/models/de-ch/image-01/#method-1)
- [**Ailoot · Bilder** `POST /v1/images/generations` `minimax-image-latest`](https://ailoot.ai/models/de-ch/image-01/#method-2)
- [**Ailoot · Bilder** `POST /v1/images/generations` `minimax/image-01`](https://ailoot.ai/models/de-ch/image-01/#method-3)

Über das Modell

Diese Beschreibung erläutert die Fähigkeiten des Modells. Die über Ailoot verfügbaren Eingaben, Ausgaben und Optionen sind unten für die ausgewählte Methode aufgeführt.

#### Ein Bild anhand einer Beschreibung

MiniMax image-01 erstellt ein neues Bild anhand einer Textbeschreibung. Darin lassen sich eine Figur oder ein Gegenstand, Umgebung und Bildstil festlegen. Diese Ailoot-Karte nimmt Text entgegen und gibt ein Bild zurück; die Beschreibung bestimmt Inhalt und Komposition der zukünftigen Szene.

#### Arbeit mit dem Erscheinungsbild einer Figur

Die Modellfähigkeiten beim Hersteller umfassen auch die Generierung mit einer visuellen Vorlage einer Figur. Ein Ausgangsbild mit einem gut erkennbaren Hauptmotiv hilft, dessen charakteristische Merkmale zusammen mit der Textbeschreibung in eine neue Szene zu übertragen. Der Hersteller empfiehlt ein einzelnes Frontalporträt; eine Referenz pro Anfrage wird unterstützt.

Für ein solches Ausgangsbild sind JPG, JPEG und PNG mit einer Grösse unter **10 MB** angegeben. Die hier verfügbare Generierungsart ist textuell; die Referenzfähigkeit gehört zum Modell image-01 und erweitert die Anfrageeingabe nicht automatisch.

#### Seitenverhältnisse und Grössen

Für image-01 sind acht Seitenverhältnisse vorgesehen: **1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16 und 21:9**. Sie decken quadratische, horizontale, vertikale und breite Kompositionen ab. Die zugehörigen Standardgrössen sind 1024×1024, 1280×720, 1152×864, 1248×832, 832×1248, 864×1152, 720×1280 und 1344×576 Pixel.

Der Hersteller erlaubt auch die gemeinsame Vorgabe von Breite und Höhe: jeweils **512 bis 2048 Pixel**, in Schritten, die Vielfache von 8 sind. Bei gleichzeitiger Angabe von Seitenverhältnis und einzelnen Abmessungen hat das Seitenverhältnis Vorrang.

#### Anzahl der Varianten und Generierungsparameter

Die Modellfähigkeiten umfassen **1 bis 9 Bilder** pro Anfrage; standardmässig wird eines erstellt. Die Textbeschreibung ist auf **1500 Zeichen** begrenzt. Vorgesehen sind eine standardmässig deaktivierte automatische Beschreibungsoptimierung und ein Zufalls-Seed: Derselbe Seed zusammen mit denselben Parametern wird für die Wiederholbarkeit des Ergebnisses verwendet.

Das Generierungsergebnis ist ein Bild oder eine Bildgruppe. Der Hersteller sieht die Übermittlung der Daten selbst und den Erhalt einer Datei vor; wenn einzelne Varianten nicht erstellt werden, wird die Anzahl erfolgreicher Ergebnisse separat berücksichtigt. Die aufgeführten Grössen und Einstellungen beschreiben Modellfähigkeiten; die verfügbaren Parameter einer konkreten Anfrage bestimmt die Ailoot-Karte.

**Ailoot · Bilder** `POST /v1/images/generations` `image-01`

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

MiniMax /`image-01`

Modell-ID

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

### Einstieg

MiniMax image-01 erstellt Bilder anhand einer detaillierten Textbeschreibung und unterstützt quadratische, vertikale und breite Kompositionen.

Zulässige Eingaben

Text

Ergebnisse

Bilder

### In Ailoot verfügbar · Eingaben und Methoden

**Ailoot · Bilder** `POST /v1/images/generations`

Eingabe

`text`

Ausgabe

`image`

Ausgabeformat

Bilddatei

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits image-01 | Standard— |
| Feld`prompt` | Typ`string` | AnforderungErforderlich | Werte und Limits Mindestlänge: 1 | Standard— |
| Feld`n` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 | Standard1 |
| Feld`response_format` | Typ`string` | AnforderungOptional | Werte und Limits url, b64\_json | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`size` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`quality` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`background` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_format` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_compression` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`moderation` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`input_fidelity` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`style` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`partial_images` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text zu Bild** · Erforderlich: prompt

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext |
| Parameter`required` | Vertragmodel, prompt |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |

Lebenszyklus: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · die tatsächlich zurückgegebene task\_id oder ein Eintrag in der Medienbibliothek

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

`GET /v1/media/assets`

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

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Ausgabe

$ 0.0035 *pro 1K-Bild*

Ausgabe

$ 0.0035 *pro 2K-Bild*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot · Bilder

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");
```

### Ergebnisse abrufen und speichern

#### Ailoot · Bilder

Laden Sie jedes zurückgegebene Bild herunter oder speichern Sie seinen Base64-Inhalt

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

##### Alle fertiggestellten Ergebnisse aufbewahren

Speichern Sie jedes fertiggestellte Bild; rufen Sie jede zurückgegebene URL ab oder dekodieren Sie seinen Base64-Inhalt.

Jedes Datenelement speichern. Jedes b64\_json dekodieren oder jede zurückgegebene signierte URL abrufen. Die Dateiendung anhand des tatsächlichen MIME-Typs bzw. der Bytes wählen.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Wenn das Ergebnis einer Bildgenerierung oder -bearbeitung geprüft werden muss, die ursprüngliche operation\_id/X-Client-Request-ID und die zurückgegebenen Ergebnisinformationen aufbewahren. Bereits vorhandene eigene Ergebnisse über die Medienbibliothek anhand tatsächlicher task\_id- oder asset\_id-Werte wiederherstellen. Die Generierungs-/Bearbeitungsanfrage nicht erneut senden und keine Abfrage-URL aus operation\_id bilden.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`created` | Typinteger |
| Feld`data[].url` | Typstring |
| Feld`data[].b64_json` | Typbase64 string |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |
| Antwort`server_error` | BedingungDie zurückgegebene Antwort gibt an, dass der Vorgang oder das Ergebnis eine Prüfung erfordert | Nächster SchrittDie ursprünglich zurückgegebene Vorgangs-/Aufgaben-ID, die Anfrageheader und die Antwort aufbewahren; mit unterstützten Leseaufrufen für diesen ursprünglichen Vorgang fortfahren. Die Erstellungsanfrage nicht erneut senden. |

### Aliasnamen

#### Modellaliasnamen

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

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

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

**Ailoot · Bilder** `POST /v1/images/generations` `minimax-image`

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

MiniMax /`minimax-image`

Modell-ID

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

### Einstieg

MiniMax image-01 erstellt Bilder anhand einer detaillierten Textbeschreibung und unterstützt quadratische, vertikale und breite Kompositionen.

Zulässige Eingaben

Text

Ergebnisse

Bilder

### In Ailoot verfügbar · Eingaben und Methoden

**Ailoot · Bilder** `POST /v1/images/generations`

Eingabe

`text`

Ausgabe

`image`

Ausgabeformat

Bilddatei

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits minimax-image | Standard— |
| Feld`prompt` | Typ`string` | AnforderungErforderlich | Werte und Limits Mindestlänge: 1 | Standard— |
| Feld`n` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 | Standard1 |
| Feld`response_format` | Typ`string` | AnforderungOptional | Werte und Limits url, b64\_json | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`size` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`quality` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`background` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_format` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_compression` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`moderation` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`input_fidelity` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`style` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`partial_images` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text zu Bild** · Erforderlich: prompt

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext |
| Parameter`required` | Vertragmodel, prompt |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |

Lebenszyklus: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · die tatsächlich zurückgegebene task\_id oder ein Eintrag in der Medienbibliothek

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

`GET /v1/media/assets`

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

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Ausgabe

$ 0.0035 *pro 1K-Bild*

Ausgabe

$ 0.0035 *pro 2K-Bild*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot · Bilder

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");
```

### Ergebnisse abrufen und speichern

#### Ailoot · Bilder

Laden Sie jedes zurückgegebene Bild herunter oder speichern Sie seinen Base64-Inhalt

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

##### Alle fertiggestellten Ergebnisse aufbewahren

Speichern Sie jedes fertiggestellte Bild; rufen Sie jede zurückgegebene URL ab oder dekodieren Sie seinen Base64-Inhalt.

Jedes Datenelement speichern. Jedes b64\_json dekodieren oder jede zurückgegebene signierte URL abrufen. Die Dateiendung anhand des tatsächlichen MIME-Typs bzw. der Bytes wählen.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Wenn das Ergebnis einer Bildgenerierung oder -bearbeitung geprüft werden muss, die ursprüngliche operation\_id/X-Client-Request-ID und die zurückgegebenen Ergebnisinformationen aufbewahren. Bereits vorhandene eigene Ergebnisse über die Medienbibliothek anhand tatsächlicher task\_id- oder asset\_id-Werte wiederherstellen. Die Generierungs-/Bearbeitungsanfrage nicht erneut senden und keine Abfrage-URL aus operation\_id bilden.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`created` | Typinteger |
| Feld`data[].url` | Typstring |
| Feld`data[].b64_json` | Typbase64 string |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |
| Antwort`server_error` | BedingungDie zurückgegebene Antwort gibt an, dass der Vorgang oder das Ergebnis eine Prüfung erfordert | Nächster SchrittDie ursprünglich zurückgegebene Vorgangs-/Aufgaben-ID, die Anfrageheader und die Antwort aufbewahren; mit unterstützten Leseaufrufen für diesen ursprünglichen Vorgang fortfahren. Die Erstellungsanfrage nicht erneut senden. |

### Aliasnamen

#### Modellaliasnamen

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

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

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

**Ailoot · Bilder** `POST /v1/images/generations` `minimax-image-latest`

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

MiniMax /`minimax-image-latest`

Modell-ID

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

### Einstieg

MiniMax image-01 erstellt Bilder anhand einer detaillierten Textbeschreibung und unterstützt quadratische, vertikale und breite Kompositionen.

Zulässige Eingaben

Text

Ergebnisse

Bilder

### In Ailoot verfügbar · Eingaben und Methoden

**Ailoot · Bilder** `POST /v1/images/generations`

Eingabe

`text`

Ausgabe

`image`

Ausgabeformat

Bilddatei

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits minimax-image-latest | Standard— |
| Feld`prompt` | Typ`string` | AnforderungErforderlich | Werte und Limits Mindestlänge: 1 | Standard— |
| Feld`n` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 | Standard1 |
| Feld`response_format` | Typ`string` | AnforderungOptional | Werte und Limits url, b64\_json | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`size` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`quality` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`background` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_format` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_compression` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`moderation` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`input_fidelity` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`style` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`partial_images` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text zu Bild** · Erforderlich: prompt

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext |
| Parameter`required` | Vertragmodel, prompt |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |

Lebenszyklus: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · die tatsächlich zurückgegebene task\_id oder ein Eintrag in der Medienbibliothek

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

`GET /v1/media/assets`

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

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Ausgabe

$ 0.0035 *pro 1K-Bild*

Ausgabe

$ 0.0035 *pro 2K-Bild*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot · Bilder

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");
```

### Ergebnisse abrufen und speichern

#### Ailoot · Bilder

Laden Sie jedes zurückgegebene Bild herunter oder speichern Sie seinen Base64-Inhalt

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

##### Alle fertiggestellten Ergebnisse aufbewahren

Speichern Sie jedes fertiggestellte Bild; rufen Sie jede zurückgegebene URL ab oder dekodieren Sie seinen Base64-Inhalt.

Jedes Datenelement speichern. Jedes b64\_json dekodieren oder jede zurückgegebene signierte URL abrufen. Die Dateiendung anhand des tatsächlichen MIME-Typs bzw. der Bytes wählen.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Wenn das Ergebnis einer Bildgenerierung oder -bearbeitung geprüft werden muss, die ursprüngliche operation\_id/X-Client-Request-ID und die zurückgegebenen Ergebnisinformationen aufbewahren. Bereits vorhandene eigene Ergebnisse über die Medienbibliothek anhand tatsächlicher task\_id- oder asset\_id-Werte wiederherstellen. Die Generierungs-/Bearbeitungsanfrage nicht erneut senden und keine Abfrage-URL aus operation\_id bilden.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`created` | Typinteger |
| Feld`data[].url` | Typstring |
| Feld`data[].b64_json` | Typbase64 string |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |
| Antwort`server_error` | BedingungDie zurückgegebene Antwort gibt an, dass der Vorgang oder das Ergebnis eine Prüfung erfordert | Nächster SchrittDie ursprünglich zurückgegebene Vorgangs-/Aufgaben-ID, die Anfrageheader und die Antwort aufbewahren; mit unterstützten Leseaufrufen für diesen ursprünglichen Vorgang fortfahren. Die Erstellungsanfrage nicht erneut senden. |

### Aliasnamen

#### Modellaliasnamen

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

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

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

**Ailoot · Bilder** `POST /v1/images/generations` `minimax/image-01`

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

MiniMax /`minimax/image-01`

Modell-ID

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

### Einstieg

MiniMax image-01 erstellt Bilder anhand einer detaillierten Textbeschreibung und unterstützt quadratische, vertikale und breite Kompositionen.

Zulässige Eingaben

Text

Ergebnisse

Bilder

### In Ailoot verfügbar · Eingaben und Methoden

**Ailoot · Bilder** `POST /v1/images/generations`

Eingabe

`text`

Ausgabe

`image`

Ausgabeformat

Bilddatei

| Feld | Typ | Anforderung | Werte und Limits | Standard |
| --- | --- | --- | --- | --- |
| Feld`model` | Typ`string` | AnforderungErforderlich | Werte und Limits minimax/image-01 | Standard— |
| Feld`prompt` | Typ`string` | AnforderungErforderlich | Werte und Limits Mindestlänge: 1 | Standard— |
| Feld`n` | Typ`integer` | AnforderungOptional | Werte und Limits Minimum: 1 | Standard1 |
| Feld`response_format` | Typ`string` | AnforderungOptional | Werte und Limits url, b64\_json | Standard— |
| Feld`stream` | Typ`boolean` | AnforderungOptional | Werte und Limits | Standardfalse |
| Feld`size` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`quality` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`background` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_format` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`output_compression` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`moderation` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`input_fidelity` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`style` | Typ`string` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |
| Feld`partial_images` | Typ`integer` | AnforderungOptional | Werte und Limits Modellabhängig | Standard— |

Kombinationen von Eingabematerialien

**Text zu Bild** · Erforderlich: prompt

Methodenparameter und Lebenszyklus

| Parameter | Vertrag |
| --- | --- |
| Parameter`material_types` | Vertragtext |
| Parameter`required` | Vertragmodel, prompt |
| Parameter`optional_controls` | Vertragnull |
| Parameter`content_type` | Vertragapplication/json |

Lebenszyklus: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · die tatsächlich zurückgegebene task\_id oder ein Eintrag in der Medienbibliothek

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

`GET /v1/media/assets`

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

Methodenstrukturen und IDs sind exakt; die Fähigkeiten des Anbieters sind von der Zulassung einer Anfrage zu unterscheiden.

### Tarife

#### Ailoot-Methodentarife

Ausgabe

$ 0.0035 *pro 1K-Bild*

Ausgabe

$ 0.0035 *pro 2K-Bild*

Ailoot reserviert vor einer Anfrage einen geschätzten Betrag. Nach dem Ergebnis rechnet Ailoot die endgültige Gebühr anhand des gemessenen Verbrauchs ab. Bei Streaming erfolgt die Abrechnung anhand des abschliessenden Verbrauchsdatensatzes. [So funktionieren Reservierung und Abrechnung →](https://ailoot.ai/docs/de-ch/billing/reserve/)

### Beispielanfragen

#### Ailoot · Bilder

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");
```

### Ergebnisse abrufen und speichern

#### Ailoot · Bilder

Laden Sie jedes zurückgegebene Bild herunter oder speichern Sie seinen Base64-Inhalt

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

##### Alle fertiggestellten Ergebnisse aufbewahren

Speichern Sie jedes fertiggestellte Bild; rufen Sie jede zurückgegebene URL ab oder dekodieren Sie seinen Base64-Inhalt.

Jedes Datenelement speichern. Jedes b64\_json dekodieren oder jede zurückgegebene signierte URL abrufen. Die Dateiendung anhand des tatsächlichen MIME-Typs bzw. der Bytes wählen.

##### Wenn die ursprüngliche Antwort geprüft werden muss

Wenn das Ergebnis einer Bildgenerierung oder -bearbeitung geprüft werden muss, die ursprüngliche operation\_id/X-Client-Request-ID und die zurückgegebenen Ergebnisinformationen aufbewahren. Bereits vorhandene eigene Ergebnisse über die Medienbibliothek anhand tatsächlicher task\_id- oder asset\_id-Werte wiederherstellen. Die Generierungs-/Bearbeitungsanfrage nicht erneut senden und keine Abfrage-URL aus operation\_id bilden.

Antwortfelder

| Feld | Typ |
| --- | --- |
| Feld`created` | Typinteger |
| Feld`data[].url` | Typstring |
| Feld`data[].b64_json` | Typbase64 string |
| Feld`usage` | Typobject |

Fehler und nächste Schritte

| Antwort | Bedingung | Nächster Schritt |
| --- | --- | --- |
| Antwort400 · `invalid_request_error` | BedingungPflichtfelder, Darstellung des Eingabematerials oder Parameterwert ungültig | Nächster SchrittDie angegebenen Felder vor einer neuen Erstellungsanfrage korrigieren. |
| Antwort`server_error` | BedingungDie zurückgegebene Antwort gibt an, dass der Vorgang oder das Ergebnis eine Prüfung erfordert | Nächster SchrittDie ursprünglich zurückgegebene Vorgangs-/Aufgaben-ID, die Anfrageheader und die Antwort aufbewahren; mit unterstützten Leseaufrufen für diesen ursprünglichen Vorgang fortfahren. Die Erstellungsanfrage nicht erneut senden. |

### Aliasnamen

#### Modellaliasnamen

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

#### Aliasnamen für Methodenpfade

Verwenden Sie die oben angezeigten Methodenpfade.

#### Zugehörige Aufrufer-IDs

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

FAQ · image-01

Welche Eingaben und Ergebnisse sind verfügbar?

`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`

Welche Felder verwendet die Anfrage?

`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`

Welche Grenzen gelten?

`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`

Verbinden Sie Ailoot mit Claude Code, OpenCode, Hermes oder Ihrer eigenen Anwendung.

## Das Unternehmen und sein Projektportfolio

Das Unternehmen und sein Projektportfolio: Millionen von Kunden; monatliche Umsätze in Milliardenhöhe.

## Tokens mit Rabatt kaufen.

Aborabatt für regelmäßige Arbeit. Aktionscodes bieten bis 50% beim Tokenkauf.

Abo

Wählen Sie einen Tarif mit Rabatt für Ihre regelmäßigen Anfragen.

Aktionscode bis 50%

Geben Sie den Code beim Kauf ein. Der Preis wird nach den gültigen Aktionsbedingungen berechnet.

Ausgaben in der Historie

Modell, Tokens und Betrag werden für jede Anfrage gespeichert.

[Abo wählen](https://ailoot.ai/docs/de-ch/billing/subscriptions/) · [Modellpreise ansehen](https://ailoot.ai/models/de-ch/)

## Verbinden Sie die API mit dem Produkt, das Sie verkaufen.

SaaS, Anwendungen und Bots nach dem offiziellen Angebot und Lizenzvertrag von Ailoot. Fordern Sie für den Weiterverkauf eine Reseller-Lizenz an.

Kommerzielle Anwendung

Integrieren Sie Text-, Bild-, Video- und Audioerzeugung in kostenpflichtige Funktionen Ihres Dienstes.

Reseller-Lizenz

Senden Sie Projektbeschreibung und Zugangsmodell. Fordern Sie schriftliche Nutzungs- und Weiterverkaufsbedingungen an.

Dokumente auf der Website

Offizielles Angebot, Lizenzvertrag und Datenschutzerklärung sind vor der Verbindung zugänglich.

[Reseller-Lizenz anfordern](mailto:support@ailoot.ai) · [Offizielles Angebot und Lizenzvertrag](https://ailoot.ai/legal/offer?lang=de-ch)

## Ailoot · Das Unternehmen und sein Projektportfolio





Ailoot baut auf bewährte Betriebserfahrung, einen großen Kundenstamm, stabilen Service und kontinuierliche KPI-Kontrolle.





Das Unternehmen und sein Projektportfolio: Millionen von Kunden; monatliche Umsätze in Milliardenhöhe.





Ailoot nutzt diese Betriebserfahrung für den API-Zugang zu KI-Funktionen in Kundenprodukten, Agenten, Anwendungen und Automatisierungen.
