Image GPT
GPT Image 1.5 pour une génération et un édition d'images de haute qualité
Fonctionnalités
- Génération d'image à partir de texte
- Édition d'images avec des invites
- Plusieurs niveaux de qualité
- Tailles d'image flexibles
Tarification
| Quality | 1024×1024 | 1536×1024 |
|---|---|---|
| low | 2 (~$0.02) | 3 (~$0.03) |
| medium | 8 (~$0.09) | 10 (~$0.11) |
| high | 30 (~$0.33) | 40 (~$0.44) |
Total credits = base_credits × num_images
Point de terminaison
POST
/api/v1/images/generateParamètres
| Paramètre | Type | Obligatoire | Description |
|---|---|---|---|
| model | string | Obligatoire | Must be "gpt-image-1.5" |
| prompt | string | Obligatoire | Text description of the image |
| quality | string | Facultatif | "low", "medium", or "high" (default: medium) |
| image_size | string | Facultatif | "1024x1024", "1536x1024", or "1024x1536" |
| num_images | number | Facultatif | Number of images (1-4) |
| input_image | string | Facultatif | URL or base64 for image editing |
Exemple de Demande
{
"model": "gpt-image-1.5",
"prompt": "A serene Japanese garden with cherry blossoms",
"quality": "high",
"image_size": "1024x1024",
"num_images": 1
}Exemple de réponse
{
"success": true,
"data": {
"task_id": "task_gpt123",
"credits_used": 30,
"remaining_credits": 470,
"model": "gpt-image-1.5"
}
}Exemples de Code
curl -X POST https://gateway.nanobananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-1.5",
"prompt": "A serene Japanese garden with cherry blossoms",
"quality": "high",
"image_size": "1024x1024"
}'