# StableStudio Grok Image Generation

> StableStudio Grok Image Generation is a paid API for AI agents from stablestudio.io, paid per call via x402, $10/call, status unknown (last checked 2026-09-13).

Generates an AI image via Grok model from a text prompt, returning a job ID for async retrieval

## Facts

- Endpoint: POST https://stablestudio.io/api/generate/grok/generate
- Price: $10/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stablestudio-grok-image-generation-e0f7c05b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_LS8uJxT26TYgVuOvgBAxF

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 stablestudio-grok-image-generation-e0f7c05b -d '<json body>'
```

Example prompt: Generate a photorealistic image of a neon-lit Tokyo street at night, 16:9 aspect ratio, 2 MP resolution, in PNG format — use StableStudio's Grok model and enhance the prompt automatically.

## When to prefer this

Choose this endpoint when you need pay-per-use AI image generation without a subscription, specifically using the Grok model. Prefer it over Stable Diffusion or DALL-E endpoints when xAI's Grok visual quality is desired, or when you need flexible resolution up to 4 MP and multiple aspect ratios. Ideal for agentic workflows where the user pays per image rather than committing to a monthly plan.

## Known failure modes

- Invalid or empty prompt returns a 400 validation error
- Unsupported resolution or aspect_ratio enum value returns a 400 error
- Payment failure (insufficient USDC balance) returns a 402 Payment Required
- Safety tolerance exceeded — prompt blocked by content filter, returns a 4xx error with reason
- Job creation succeeds but generation fails asynchronously — status polling reveals error state
- Seed value out of safe integer range returns a 400 validation error

## How this service works

Pay-per-generation AI image and video creation. No subscriptions ever.

## Output

A JSON object containing a job ID, generation status ('pending'), job type ('grok-generate'), and a success flag. The agent must poll a separate endpoint using the job ID to retrieve the final image URL once generation completes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "prompt": {
   "type": "string",
   "maxLength": 8000,
   "minLength": 1,
   "description": "A detailed description of the image you want to generate"
  },
  "aspect_ratio": {
   "enum": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4",
    "3:2",
    "2:3",
    "2:1",
    "1:2",
    "19.5:9",
    "9:19.5",
    "20:9",
    "9:20"
   ],
   "type": "string",
   "default": "16:9",
   "description": "Aspect ratio of the output image"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "type": "grok-generate",
  "jobId": "cmpbmzaee000j04jrzx4f43tw",
  "status": "pending",
  "pollUrl": "https://stablestudio.dev/api/jobs/cmpbmzaee000j04jrzx4f43tw",
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stablestudio-grok-image-generation-e0f7c05b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablestudio.io](https://www.zero.xyz/host/stablestudio.io/llms.txt)
