Verwandle deine Ideen in beeindruckende Bilder und Videos mit unseren leistungsstarken KI-Modellen
Teste und erkunde die Bildgenerierungs-API mit mehreren Modellen und Ausgabeformaten
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));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.
https://api.imagegpt.online/generate/text-imageAlle Anfragen müssen Ihren API-Schlüssel im Header enthalten. Halten Sie ihn geheim.
x-api-key: YOUR_API_KEYEin fehlender oder ungültiger API-Schlüssel gibt eine 401 Unauthorized Antwort zurück.
Senden Sie einen JSON-Body mit folgenden Feldern:
| Parameter | Typ | Standard | Beschreibung |
|---|---|---|---|
model* | string | — | Modell-ID für die Generierung. |
prompt* | string | — | Textbeschreibung des zu generierenden Bildes. |
width | number | 512 | Ausgabebildbreite in Pixeln. |
height | number | 512 | Ausgabebildhö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:
outputType: "binary"
const blob = await response.blob();
const url = URL.createObjectURL(blob);outputType: "url"
{
"success": true,
"taskId": "imagegpt_img-...",
"url": "https://...",
"creditsDeducted": 3
}outputType: "base64"
{
"success": true,
"taskId": "imagegpt_img-...",
"base64": "/9j/4QWm...",
"creditsDeducted": 3
}Eine minimale Text-zu-Bild-Anfrage mit fetch API:
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:
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:
Schnelle, leichte Modelle für Entwürfe.
e.g. Flux Schnell, Z Image Turbo
Ausgewogene Qualität für den Alltag.
e.g. GPT Image 1.0, Seedream, Nova Canvas
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.