# MapleAI Image Generation API

> MapleAI Image Generation API is a paid API for AI agents from base.mapleai.shop, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-30).

Generates images from a text prompt using selectable AI models, priced per image and size in USDC via x402

## Facts

- Endpoint: POST https://base.mapleai.shop/api/v1/images/generations?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/mapleai-image-generation-api-d0355dba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_8Vj2cjUJY9CZtDvV5oe-i

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 mapleai-image-generation-api-d0355dba -d '<json body>'
```

Example prompt: Generate 2 images of a cozy Japanese tea house surrounded by cherry blossoms at sunset using gpt-image-2.5, in 1024x1024 size.

## When to prefer this

Choose this endpoint when you need pay-per-use AI image generation without a subscription, want to select from multiple models (GPT-Image 2, 2.5, Grok Imagine, or 2K variants) in a single API, and need to pay in USDC on Base via x402. It is well-suited for agents that generate images on demand without pre-committing to a platform, or when you want access to both OpenAI-style and Grok image models under one unified endpoint.

## Known failure modes

- Invalid or unsupported model name returns a validation error
- Prompt too long or containing disallowed content triggers a content policy refusal
- Requesting more than 4 images (n > 4) fails schema validation
- Unsupported size string for the selected model returns an error
- Insufficient USDC balance or x402 payment failure blocks the request
- Network timeout if generation takes too long for complex prompts

## How this service works

Generate images, priced per image and size

## Output

A JSON object containing a 'data' array with one or more objects, each holding a 'url' pointing to the generated image hosted on a CDN, plus a 'created' Unix timestamp indicating when the images were produced.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "n": {
   "type": "integer",
   "maximum": 4,
   "minimum": 1
  },
  "size": {
   "type": "string"
  },
  "model": {
   "enum": [
    "gpt-image-2",
    "gpt-image-2.5",
    "gpt-image-2.5-flare",
    "gpt-image-2.5-sunburst",
    "grok-imagine-image",
    "gpt-image-2-2k",
    "gpt-image-2.5-sunburst-2k"
   ],
   "type": "string"
  },
  "prompt": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "url": "https://example.com/image.png"
   }
  ],
  "created": 1700000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/mapleai-image-generation-api-d0355dba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base.mapleai.shop](https://www.zero.xyz/host/base.mapleai.shop/llms.txt)
