Agile Cloud & AIACAI
ACAI PlatformEvidenceDocsPricing
Agile Cloud & AIACAI

Continuous compliance for AI. Every call scanned, classified, audit-logged, and evidence-ready.

Product

  • AI Layer
  • Sample Reports
  • Pricing
  • Documentation
  • Quickstart
  • Start Free

Company

  • About
  • Talk to an Engineer
  • Security
  • Support

Legal

  • Privacy Policy
  • Terms of Service
Service-Disabled Veteran-Owned Small Business
© 2026 Agile Cloud & AI LLC. All rights reserved.
OverviewQuick StartMigration GuideCompliance Quick StartNext Steps

User Guide

AuthenticationChat CompletionsEmbeddingsTranscriptionModelsGuardrailsRate LimitsError HandlingBYOK / Passthrough

Features

Batch APISemantic CacheRAGPromptsSmart RoutingRealtime APIAudit & Compliance

Developer

ArchitectureSelf-HostingAPI ReferenceInteractive DocsConfigurationContributing
Back to site

Image Generation

Generate and edit images with GPT Image, FLUX, MAI-Image, and open-weight creative models. OpenAI-compatible endpoints.

Endpoints

POST https://api.agilecloud.ai/v1/images/generations   # Text-to-image (JSON)
POST https://api.agilecloud.ai/v1/images/edits         # Edit source image(s) (multipart)

Request Parameters

ParameterTypeRequiredDescription
modelstringYes*Model alias, e.g. flux-1.1-pro. *Always set it: the OpenAI default (dall-e-3) is not currently offered and returns 404.
promptstringYesText description of the image (up to 32,000 characters).
nintegerNoNumber of images (1–10). Models that return one image per request (e.g. Kontext) reject n > 1.
sizestringNoWIDTHxHEIGHT, e.g. 1024x1024 (64–8192 px per side). Each model enforces its own supported sizes.
output_formatstringNopng, jpeg, or webp. FLUX models support png and jpeg.
response_formatstringNourl or b64_json. FLUX models return b64_json only (their default). Creative models default to url, which is available only where ACAI re-hosts screened images — request b64_json to be safe.
seedintegerNoReproducible sampling seed (FLUX).
guidancenumberNoFLUX.2 only: prompt adherence, 1.5–10. Rejected by every other model.
stepsintegerNoFLUX.2 only: sampling steps, 1–50. Rejected by every other model.
moderationstringNoGPT Image only: auto (default) or low. Relaxes the provider's own filter; ACAI's screening and hard limits are unchanged.
lorastringNoCreative models only: the id of an ACAI-curated LoRA style adapter enabled for that model. Arbitrary adapters or URLs are not accepted; other models reject this field.
lora_scalenumberNoAdapter strength, 0–2. Only valid with lora.

quality and style are accepted for OpenAI compatibility. GPT Image honours quality; FLUX and MAI-Image ignore both. Edits take the same fields as multipart form data plus one or more image files; masks are not supported on FLUX or MAI-Image.

cURL Example

curl https://api.agilecloud.ai/v1/images/generations \
  -H "Authorization: Bearer $DIRECTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-1.1-pro",
    "prompt": "A futuristic cityscape at sunset with flying cars",
    "size": "1024x1024",
    "output_format": "png"
  }'

Response

{
  "created": 1719000000,
  "data": [
    { "b64_json": "iVBORw0KGgo..." }
  ]
}

Python SDK Example

import base64
from openai import OpenAI

client = OpenAI(
    base_url="https://api.agilecloud.ai/v1",
    api_key="YOUR_API_KEY",
)

response = client.images.generate(
    model="flux-1.1-pro",
    prompt="A futuristic cityscape at sunset with flying cars",
    size="1024x1024",
)

with open("city.png", "wb") as f:
    f.write(base64.b64decode(response.data[0].b64_json))

Models

ModelDescriptionAccess
gpt-image-1.5OpenAI text-to-image and editing; billed on usage tokensPro+
flux.2-proBlack Forest Labs FLUX.2 [pro]: text-to-image and edits with up to 8 reference imagesPro+
flux.2-flexFLUX.2 [flex]: tunable guidance and steps, strong typography, up to 10 reference imagesPro+
mai-image-2.6Microsoft photorealistic text-to-image and edits with up to 5 source images; one image per callPro+
flux-1.1-proBlack Forest Labs text-to-image, up to 1.6 MPPro+
flux-kontext-proText-to-image plus single-image edits via /v1/images/editsPro+
qwen-image-2512Open-weight text-to-image (Apache-2.0)Creative access
qwen-image-edit-2511Open-weight image editing (Apache-2.0)Creative access
z-image-turboOpen-weight fast text-to-image (Apache-2.0)Creative access

DALL-E 3 is not offered; use gpt-image-1.5. flux.2-flex and mai-image-2.6 run on Azure Global capacity, so prompts and images may be processed outside the US. See Models for creative access.

Notes

  • Content safety and prompt injection guardrails apply to every prompt.
  • Creative models are screened by ACAI — prompt, input images, and every output — and fail closed if screening is unavailable. Sexual content involving minors or real, identifiable people is always blocked; no account setting can change that.
  • All requests are audit-logged with compliance metadata. Blocked images are never stored.