# CortexCloud AI Image Generation (Flux/Stability)

> CortexCloud AI Image Generation (Flux/Stability) is a paid API for AI agents from api.cortexcloud.org, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-15).

Generates AI images from text prompts using Flux or Stability models via OpenRouter, billed at $0.02 USDC per image.

## Facts

- Endpoint: GET https://api.cortexcloud.org/x402/v1/images/generations
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/cortexcloud-ai-image-generation-flux-stability-e2deac1f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0LRiPnEIRiAbdOUYe_Yul

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability cortexcloud-ai-image-generation-flux-stability-e2deac1f
```

Example prompt: Generate a photorealistic image of a red fox sitting in a snowy forest at dusk — use the Flux model, 1024x1024 size, and give me 1 image as a URL.

## When to prefer this

Choose this endpoint when you need to generate images via a pay-per-call USDC micropayment model without a subscription, or when you want access to both Flux and Stability AI models through a single OpenAI-compatible interface. Prefer this over raw OpenAI DALL-E if you want Flux-based diffusion outputs or need crypto-native billing on Base.

## Known failure modes

- Invalid or unsupported model name returns an error
- Prompt violates content policy and is rejected
- Unsupported image size string causes a bad request error
- Payment not received or USDC balance insufficient blocks the request
- Network timeout if the model backend is slow to respond
- n exceeds provider limits causing a quota error

## How this service works

OpenAI-compatible AI and data API for agents. Pay per call in USDC on Base via x402 — no API keys, no subscriptions, no lock-in.

## Output

Returns one or more AI-generated images corresponding to the prompt, either as URLs or base64-encoded image data, depending on the response_format parameter. Each call produces the specified number of images (n) at the requested size using the chosen model.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "n": {
   "type": "integer"
  },
  "size": {
   "type": "string"
  },
  "model": {
   "type": "string"
  },
  "prompt": {
   "type": "string"
  },
  "response_format": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "format": "application/json",
 "example": {}
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/cortexcloud-ai-image-generation-flux-stability-e2deac1f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.cortexcloud.org](https://www.zero.xyz/host/api.cortexcloud.org/llms.txt)
