Skip to main content
DocumentationDevelopers

Images

Generate images from a text prompt with FLUX.2.

Documentation menu

Generate an image

curl "$CCSIO_BASE_URL/images/generations" \
  -H "Authorization: Bearer $CCSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "flux.2-klein-4b", "prompt": "A lighthouse at dawn, watercolor", "size": "1024x1024", "response_format": "b64_json"}' \
  | jq -r '.data[0].b64_json' | base64 --decode > lighthouse.png
  • prompt: what to draw. It must not be empty.
  • size: WIDTHxHEIGHT in pixels, for example 1024x1024.
  • n: how many images; seed: the same seed and prompt give the same image.
  • response_format: b64_json, the image inline as base64. URLs are not served.
Explore the platform

Get your first API key

Registration is open. Four steps to your first call: create your account, create your organization, create your API key, and start using it.

  1. 01Create your account
  2. 02Create your organization
  3. 03Create your API key
  4. 04Start using it