Api.Airforce
API REFERENCE

이미지 생성

Flux, Nano-Banana, Wan 등으로 확장되는 통합 OpenAI 호환 엔드포인트를 사용하여 이미지를 생성하고 편집하세요.

POST /v1/images/generations

OpenAI와 호환되는 드롭인 images.generate SDK. 공급자별 매개변수는 표준 매개변수와 함께 존재합니다. 즉, 백엔드는 각 모델이 이해하는 내용을 전달합니다.

POSThttps://api.airforce/v1/images/generations

이미지 모델

· live

공통 매개변수

ParameterTypeRequiredDescription
modelstringRequiredImage model ID. Filter /v1/models by output_modalities.includes("image").
promptstringRequiredImage description.
nintegerOptionalNumber of variations to generate per request. Capped by the model's image_caps.max_n.
sizestringOptionalOpenAI-style WxH, e.g. "1024x1024". Provider-specific values pass through.
aspect_ratiostringOptionalAlternative to size. "16:9", "1:1", "9:16", … Validated against image_caps.aspect_ratios.
qualitystringOptional"standard" | "hd" (OpenAI) or model-specific labels. Validated.
response_formatstringOptional"url" (default) or "b64_json".
seedintegerOptionalReproducibility seed. Same prompt + same seed = same image (where the upstream supports it).
input_imagesarrayOptional[{ url? } | { b64_json? }] for image-to-image / reference / first-frame.
ssebooleanOptionalWhen 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.

기본 예

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"
  }'

응답 형태

ParameterTypeRequiredDescription
createdintegerOptionalUnix timestamp.
dataarrayOptionalGenerated assets.
data[].urlstringOptionalPre-signed CDN URL when response_format is "url".
data[].b64_jsonstringOptionalBase64-encoded PNG when response_format is "b64_json".
data[].revised_promptstringOptionalSome models rewrite the prompt before generating; the rewritten version is returned here.
{
  "created": 1715000000,
  "data": [{
    "url": "https://cdn.api.airforce/images/abc123.png"
  }]
}

스트리밍 변형

통과하다 sse: true 유휴 시간 제한이 엄격한 미들웨어를 통해 프록싱할 때. 응답은 완전한 JSON이 포함된 하나의 SSE 이벤트입니다. [DONE].

data: {"created":1715000000,"data":[{"url":"https://cdn.api.airforce/images/abc123.png"}]}

data: [DONE]

이미지 대 이미지 및 참조

다음을 갖춘 모델 image_caps.max_input_images > 0 참조 이미지를 수락합니다. URL 또는 base64로 인코딩된 데이터를 전달하세요.

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"}
    ]
  }'

모델별 매개변수

위의 공통 매개변수 외에도 개별 모델 제품군은 추가 항목을 허용합니다. 알 수 없는 매개변수는 있는 그대로 업스트림에 전달되므로 향후 제공자별 노브도 SDK 업데이트 없이 작동합니다.

Flux

flux-2-klein-4b, flux-2-klein-9b, flux-2-dev

ParameterTypeRequiredDescription
aspect_ratiostringOptional"1:1", "16:9", "9:16", "4:3", "3:4", "21:9", "9:21".
image_urlsarrayOptionalReference images for img2img mode.

Nano-Banana

nano-banana-2, nano-banana-2-search, nano-banana-pro

ParameterTypeRequiredDescription
aspect_ratiostringOptional"1:1", "16:9", "9:16", "4:3".
resolutionstringOptional"512", "1024", "2048".
image_urlsarrayOptionalReference 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.

ParameterTypeRequiredDescription
custombooleanOptionalSwitch from "auto" to fully custom mode.
instrumentalbooleanOptionalSuppress vocals.
stylestringOptionalGenre tag list, e.g. "EDM, Bass".

역량 발견

각 이미지 모델은 image_caps ~에 /v1/models 클라이언트가 보내기 전에 입력을 확인할 수 있도록:

ParameterTypeRequiredDescription
image_caps.max_nintegerOptionalMaximum n per request.
image_caps.aspect_ratiosarrayOptionalAllowed aspect_ratio values.
image_caps.qualitiesarrayOptionalAllowed quality values.
image_caps.sizesarrayOptionalAllowed size values when applicable.
image_caps.max_input_imagesintegerOptional0 = text-only model. Higher = supports reference images.
image_caps.price_per_image_centsintegerOptionalCost per generated image. Multiply by n for the total request cost.