Text-to-Image
API AI gratis per generare immagini
Nessuna carta di credito · Crediti gratuiti validi 90 giorni · Poi ricarichi il saldo e paghi a consumo, senza abbonamento
FLUX.2 Klein 4B
Text-to-Image
PromptStudio product photo of a matte ceramic coffee mug with a single handle on a walnut table, soft morning window light, thin steam rising, shallow depth of field, warm amber tones
Quale modello di immagini usare
| Modello | Ideale per | Prezzo a immagine | Dimensioni |
|---|---|---|---|
| FLUX.2 Klein 4B | Foto di prodotto e immagini fotografiche; con /images/edits accetta fino a 3 immagini di riferimento |
0,0037 $ a 1024² | 256–1536 px |
| Z-Image-Turbo | Scene fotorealistiche, testi brevi su insegne, prompt negativi | 0,0063 $ a 768² | 128–2048 px |
| Z-Anime | Stili anime e illustrazione | 0,0063 $ a 768² | 128–2048 px |
| FLUX.1 Schnell | Prezzo più basso a parità di dimensioni, bozze, bot | 0,0019 $ a 768² | 256–2048 px |
Prezzi dell'API immagini
| Modello e dimensioni | A immagine | Immagini con $5 |
|---|---|---|
| FLUX.1 Schnell, 768 × 768 | 0,0019 $ | ≈ 2.618 |
| FLUX.2 Klein, 512 × 512 | 0,0019 $ | ≈ 2.679 |
| FLUX.2 Klein, 1024 × 1024 | 0,0037 $ | ≈ 1.361 |
| Z-Image-Turbo, 768 × 768 | 0,0063 $ | ≈ 790 |
| Z-Image-Turbo, 1024 × 768 | 0,0077 $ | ≈ 646 |
Esempio di API text-to-image
- Endpoint
- Model ID
- Campi obbligatori
- Risultato
- Limiti dell'account gratuito
curl -X POST 'https://api.deapi.ai/api/v2/images/generations' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"model": "Flux_2_Klein_4B_BF16",
"prompt": "studio photo of a ceramic mug, morning light",
"width": 1024,
"height": 1024,
"steps": 4,
"seed": 7
}'
import time, requests
API = "https://api.deapi.ai/api/v2"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"}
job = requests.post(f"{API}/images/generations", headers=HEADERS, json={
"model": "Flux_2_Klein_4B_BF16",
"prompt": "studio photo of a ceramic mug, morning light",
"width": 1024, "height": 1024, "steps": 4, "seed": 7,
}).json()["data"]
while True:
status = requests.get(f"{API}/jobs/{job['request_id']}", headers=HEADERS).json()["data"]
if status["status"] in ("done", "error"):
break
time.sleep(2)
print(status.get("result_url")) # invia questo URL alla tua app o al bot Telegram
Dalla registrazione alla prima immagine
-
Crea un account gratuito
-
Crea una API key
-
Invia un prompt
Domande frequenti sull'API immagini
Genera la tua prima immagine con $5 di crediti gratis
Nessuna carta di credito, nessun abbonamento.