# GlianaAI KREA-2 Medium Image Generation

> GlianaAI KREA-2 Medium Image Generation is a paid API for AI agents from api.glianalabs.com, paid per call via x402, $0.0435/call, status unknown (last checked 2026-09-15).

Generates images using the KREA-2 Medium model via a pay-per-call x402 endpoint, returning a media URL, with payment settled in USDC on-chain.

## Facts

- Endpoint: GET https://api.glianalabs.com/x402/krea-2-medium
- Price: $0.0435/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/glianaai-krea-2-medium-image-generation-1d7693c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uiIWUDGCbT8blryVrjxZT

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 glianaai-krea-2-medium-image-generation-1d7693c2
```

Example prompt: Generate an image of a misty Japanese mountain village at dawn using GlianaAI's KREA-2 Medium model — pay the $0.045 USDC fee automatically.

## When to prefer this

Choose this endpoint when you need KREA-2 Medium quality image generation without pre-registering for an API key, and your agent can pay per-call in USDC via x402 on Base, Tempo, or Solana. Ideal for autonomous agents that need on-demand image generation with crypto-native payments and no subscription overhead.

## Known failure modes

- Insufficient USDC balance — payment rejected, 402 response with payment-required details
- Invalid or empty prompt — 400 Bad Request
- Model unavailable or overloaded — 503 Service Unavailable
- Malformed x402 payment header — 402 or 400 error
- Network timeout during inference — connection error or 504

## How this service works

One endpoint for 90+ generative AI models, live market data, SEC filings and identity APIs — image, video, music, speech, LLM chat, crypto and FX rates, DEX liquidity, gas, US company fundamentals and insider trades, document OCR and face matching. Pay per request in USDC on Tempo, Base, Solana, Algorand or BNB Chain with no signup, or top up a prepaid balance in rupiah.

## Output

Returns a JSON object containing the model name ('krea-2-medium'), an output object with the generated image as a media URL, and the amount charged in micro-USD (e.g. 45000 for $0.045).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "krea-2-medium",
  "output": {
   "url": "https://api.glianalabs.com/v1/media/<id>"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/glianaai-krea-2-medium-image-generation-1d7693c2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.glianalabs.com](https://www.zero.xyz/host/api.glianalabs.com/llms.txt)
