Nano Banana APIs: $0,01$0,04(75% RABATT)
Menü
ImageGPT AI API

API-Dokumentation

Verwandle deine Ideen in beeindruckende Bilder und Videos mit unseren leistungsstarken KI-Modellen

API-Playground für direkte Bildgenerierung

Teste und erkunde die Bildgenerierungs-API mit mehreren Modellen und Ausgabeformaten

Modell auswählen

Endpunkt

POSThttps://api.imagegpt.online/generate/text-image

Header

Anfrage-Body

Code-Beispiel

fetch('https://api.imagegpt.online/generate/text-image', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
  "prompt": "Photorealistic portrait of the same person (keep his real face unchanged). A man with medium curly brown hair, light skin, and soft features sits relaxed, forearms on a light blue table, holding a small white puppy with a red collar. He wears a cozy color-block knitted sweater (beige, tan, light blue, black) with ribbed neck and cuffs, a silver watch, and a turquoise-beaded bracelet. Soft diffused lighting, smooth steel-blue background, slightly elevated front angle warm, intimate, digital photo",
  "width": 512,
  "height": 512,
  "model": "FLUX-SCHNELL",
  "outputType": "binary",
  "outputFormat": "png"
})
})
  .then(response => response.blob())
  .then(blob => {
    const imageUrl = URL.createObjectURL(blob);
    console.log('Image URL:', imageUrl);
    // Display in img tag: document.getElementById('myImg').src = imageUrl;
  })
  .catch(error => console.error('Error:', error));
API-Dokumentation

Bildgenerierungs-API

Eine einheitliche REST-API zur Bildgenerierung mit 15+ KI-Modellen — Text-zu-Bild und Bild-zu-Bild mit mehreren Ausgabeformaten, alles über einen Endpunkt mit Kredit-Preissystem.

POSThttps://api.imagegpt.online/generate/text-image

Alle Anfragen müssen Ihren API-Schlüssel im Header enthalten. Halten Sie ihn geheim.

http header
x-api-key: YOUR_API_KEY

Ein fehlender oder ungültiger API-Schlüssel gibt eine 401 Unauthorized Antwort zurück.

Senden Sie einen JSON-Body mit folgenden Feldern:

ParameterTypStandardBeschreibung
model*
string—Modell-ID für die Generierung.
prompt*
string—Textbeschreibung des zu generierenden Bildes.
width
number512Ausgabebildbreite in Pixeln.
height
number512Ausgabebildhöhe in Pixeln.
outputType
string"binary"Ausgabeformat: "binary", "url" oder "base64".
outputFormat
string"png"Bilddateiformat: "png" oder "jpg".
image
string[]—Array von Eingabebild-URLs (max 3). Nur für Bild-zu-Bild erforderlich.

* Pflichtfelder.

Die Antwortform hängt vom gewählten outputType ab:

binary

outputType: "binary"

js
const blob = await response.blob();
const url = URL.createObjectURL(blob);
url

outputType: "url"

json
{
  "success": true,
  "taskId": "imagegpt_img-...",
  "url": "https://...",
  "creditsDeducted": 3
}
base64

outputType: "base64"

json
{
  "success": true,
  "taskId": "imagegpt_img-...",
  "base64": "/9j/4QWm...",
  "creditsDeducted": 3
}

Eine minimale Text-zu-Bild-Anfrage mit fetch API:

javascript
fetch('https://api.imagegpt.online/generate/text-image', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    model: 'FLUX-SCHNELL',
    prompt: 'A futuristic city at sunset, photorealistic',
    width: 512,
    height: 512,
    outputType: 'url',
    outputFormat: 'png'
  })
})
  .then(res => res.json())
  .then(data => console.log('Image URL:', data.url));

Für Bild-zu-Bild fügen Sie ein image Array hinzu:

javascript
body: JSON.stringify({
  model: 'FLUX-KONTEXT',
  prompt: 'Same person, wearing a red jacket',
  image: ['https://example.com/input.jpg'],
  width: 512,
  height: 512,
  outputType: 'url',
  outputFormat: 'png'
})

Credits werden pro generiertem Bild berechnet. Das Badge zeigt den Preis:

Economy
3 Credits / Bild

Schnelle, leichte Modelle für Entwürfe.

e.g. Flux Schnell, Z Image Turbo

Standard
10–30 Credits / Bild

Ausgewogene Qualität für den Alltag.

e.g. GPT Image 1.0, Seedream, Nova Canvas

Premium
35–100 Credits / Bild

Höchste Treue für Produktionsqualität.

e.g. Nano Banana Pro, Seedream 4.0, Ideogram

ImageGPT verbietet NSFW-, sexuell explizite, anzügliche, ausbeuterische, täuschende oder schädliche KI-generierte Inhalte. Auf unterstützte Bild- und Videogenerierung wird Inhaltsmoderation angewendet.