Görüntü oluşturma
Flux, Nano-Banana, Wan ve daha fazlasına yayılan birleşik, OpenAI uyumlu bir uç nokta ile görüntüler oluşturun ve düzenleyin.
OpenAI uyumlu tek bir görsel endpoint'i Flux, Nano-Banana, Wan ve diğer sağlayıcılara dağılır. Upstream ne olursa olsun aynı request şeklini gönderin; sağlayıcıya özel seçenekler geçirilir ve her modelin yeteneklerine göre doğrulanır.
Görsel modellerini, models endpoint'ini listeleyerek ve output modalities'i image içerenleri tutarak keşfedin.
POST /v1/images/generations
OpenAI ile uyumlu açılır images.generate SDK'dır. Sağlayıcıya özgü parametreler standart olanların yanında yer alır; arka uç, her modelin anladığını iletir.
https://api.airforce/v1/images/generationsResim modelleri
…· liveOrtak parametreler
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | Image model ID. Filter /v1/models by output_modalities.includes("image"). |
| prompt | string | Required | Image description. |
| n | integer | Optional | Number of variations to generate per request. Capped by the model's image_caps.max_n. |
| size | string | Optional | OpenAI-style WxH, e.g. "1024x1024". Provider-specific values pass through. |
| aspect_ratio | string | Optional | Alternative to size. "16:9", "1:1", "9:16", … Validated against image_caps.aspect_ratios. |
| quality | string | Optional | "standard" | "hd" (OpenAI) or model-specific labels. Validated. |
| response_format | string | Optional | "url" (default) or "b64_json". |
| seed | integer | Optional | Reproducibility seed. Same prompt + same seed = same image (where the upstream supports it). |
| input_images | array | Optional | [{ url? } | { b64_json? }] for image-to-image / reference / first-frame. |
| sse | boolean | Optional | When true the response is sent as Server-Sent Events. The full JSON arrives in one event followed by [DONE]. Useful to keep long upstream renders from timing out at proxies. |
Temel örnek
curl https://api.airforce/v1/images/generations \
-H "Authorization: Bearer sk-air-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-2-dev",
"prompt": "A cute baby sea otter floating on its back",
"n": 1,
"response_format": "url"
}'Tepki şekli
| Parameter | Type | Required | Description |
|---|---|---|---|
| created | integer | Optional | Unix timestamp. |
| data | array | Optional | Generated assets. |
| data[].url | string | Optional | Image URL when response_format is "url" (default). The image is re-hosted to a file host and the link ends in /image.jpeg; null if the re-host fails. |
| data[].b64_json | string | Optional | Base64-encoded image bytes when response_format is "b64_json". The format follows the upstream provider (often JPEG), not necessarily PNG. |
{
"created": 1715000000,
"data": [{
"url": "https://.../image.jpeg"
}]
}Akış varyantı
Geçmek sse: true sıkı boşta kalma zaman aşımlarına sahip ara yazılım aracılığıyla proxy yaparken. Yanıt, JSON'un tamamını içeren bir SSE olayıdır, ardından [DONE].
data: {"created":1715000000,"data":[{"url":"https://.../image.jpeg"}]}
data: [DONE]Görüntüden görüntüye ve referans
Şunlara sahip modeller: image_caps.max_input_images > 0 referans görsellerini kabul edin. URL'leri veya base64 kodlu verileri iletin.
curl https://api.airforce/v1/images/generations \
-H "Authorization: Bearer sk-air-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-2-dev",
"prompt": "Same character, now in a snowy forest",
"aspect_ratio": "16:9",
"input_images": [
{"url": "https://example.com/character.jpg"}
]
}'Modele özgü parametreler
Yukarıdaki ortak parametrelerin ötesinde, bireysel model aileleri ekstraları kabul eder. Bilinmeyen parametreler olduğu gibi yukarı akışa iletilir, böylece gelecekte sağlayıcıya özel herhangi bir düğme bir SDK güncellemesi olmadan da çalışır.
Flux
flux-2-klein-4b, flux-2-klein-9b, flux-2-dev
| Parameter | Type | Required | Description |
|---|---|---|---|
| aspect_ratio | string | Optional | "1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "9:21". |
| image_urls | array | Optional | Reference images for img2img mode. |
Nano-Banana
nano-banana-2, nano-banana-2-search, nano-banana-pro
| Parameter | Type | Required | Description |
|---|---|---|---|
| aspect_ratio | string | Optional | "1:1", "16:9", "9:16", "4:3". |
| resolution | string | Optional | "512", "1024", "2048". |
| image_urls | array | Optional | Reference images. |
Suno (music via /v1/images/generations)
suno-v4.5, suno-v5 — Suno historically routes through this endpoint. Native music API at /v1/audio/music is preferred for new code.
| Parameter | Type | Required | Description |
|---|---|---|---|
| custom | boolean | Optional | Switch from "auto" to fully custom mode. |
| instrumental | boolean | Optional | Suppress vocals. |
| style | string | Optional | Genre tag list, e.g. "EDM, Bass". |
Yetenekleri keşfetme
Her görüntü modeli ortaya çıkar image_caps Açık /v1/models böylece istemciler girişleri göndermeden önce doğrulayabilirler:
| Parameter | Type | Required | Description |
|---|---|---|---|
| image_caps.max_n | integer | Optional | Maximum n per request. |
| image_caps.aspect_ratios | array | Optional | Allowed aspect_ratio values. |
| image_caps.qualities | array | Optional | Allowed quality values. |
| image_caps.max_input_images | integer | Optional | 0 = text-only model. Higher = supports reference images. |
| image_caps.supports_url_input | boolean | Optional | Whether input_images may be passed as URLs (vs base64). |
| image_caps.supports_seed | boolean | Optional | Whether the model honours a seed value (most scraping-proxy upstreams ignore it). |
Görsel fiyatlandırması image_caps üzerinde değildir — maliyet için modelin /v1/models üzerindeki fiyat alanlarını kullanın.