# Replicate: ideogram-ai/ideogram-v3-balanced

Ideogram V3 balanced tier. Better detail than turbo.

- Method: POST
- Path: `/models/ideogram-ai/ideogram-v3-balanced/predictions`
- Price: $0.12000000

## Input Schema

```json
{
  "type": "object",
  "properties": {
    "input": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 5000,
          "description": "Text prompt describing the desired image."
        },
        "aspect_ratio": {
          "type": "string",
          "enum": [
            "1:1",
            "16:9",
            "9:16",
            "4:3",
            "3:4",
            "3:2",
            "2:3",
            "16:10",
            "10:16",
            "1:3",
            "3:1"
          ]
        },
        "resolution": {
          "type": "string",
          "pattern": "^\\d+x\\d+$",
          "description": "e.g. '1024x1024'."
        },
        "magic_prompt": {
          "type": "string",
          "enum": [
            "Auto",
            "On",
            "Off"
          ]
        },
        "style_type": {
          "type": "string",
          "enum": [
            "None",
            "Auto",
            "General",
            "Realistic",
            "Design"
          ]
        },
        "negative_prompt": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        },
        "image": {
          "type": "string",
          "format": "uri",
          "description": "Reference image for inpaint/remix flows."
        },
        "mask": {
          "type": "string",
          "format": "uri"
        },
        "style_reference_images": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uri"
          },
          "maxItems": 3
        },
        "seed": {
          "type": "integer",
          "minimum": 0,
          "description": "Random seed; omit for non-deterministic outputs."
        }
      },
      "required": [
        "prompt"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "input"
  ],
  "additionalProperties": false
}
```

## Output Schema

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Replicate prediction ID."
    },
    "model": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "succeeded",
        "failed",
        "canceled",
        "processing",
        "starting"
      ]
    },
    "output": {
      "description": "Model-specific output. Image/audio models return CDN URLs (Replicate-hosted, ~24h TTL); vision-LLM models return a string; music models return a single audio URL or array."
    },
    "error": {
      "type": [
        "string",
        "null"
      ]
    },
    "metrics": {
      "type": "object",
      "properties": {
        "predict_time": {
          "type": "number"
        },
        "total_time": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "created_at": {
      "type": "string"
    },
    "completed_at": {
      "type": "string"
    },
    "predicted_price_usd": {
      "type": "string",
      "description": "USD charged for this call."
    }
  },
  "required": [
    "id",
    "model",
    "status",
    "error",
    "predicted_price_usd"
  ],
  "additionalProperties": false,
  "description": "Replicate prediction result with metadata."
}
```

## Networks

| Name | Mode | CAIP-2 | Chain ID / Cluster | Protocols |
|---|---|---|---|---|
| Tempo Mainnet | live | `eip155:4217` | 4217 | mpp |
| Solana Mainnet | live | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | mainnet-beta | mpp, x402 |
| Base | live | `eip155:8453` | 8453 | x402 |

## Accepted Currencies

| Symbol | Name | Decimals | Network | Address | Protocols |
|---|---|---|---|---|---|
| USDC.e | Bridged USDC (Stargate) | 6 | `eip155:4217` | `0x20c000000000000000000000b9537d11c60e8b50` | mpp |
| USDC | USD Coin (Solana) | 6 | `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp` | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | mpp, x402 |
| USDC | USD Coin | 6 | `eip155:8453` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | x402 |

## How to invoke

Payment is handled automatically — the client signs the 402 challenge and retries.

### TypeScript — Tempo (mppx + fetch) ([docs](https://mpp.dev/sdk/typescript/client))

```ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({
  methods: [tempo({ account: privateKeyToAccount('0x...') })],
})

const res = await fetch('https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "input": {
      "prompt": "",
      "aspect_ratio": "1:1",
      "resolution": ""
    }
  }),
})
const data = await res.json()
```

### TypeScript — Solana (@solana/mpp + fetch) ([docs](https://github.com/solana-foundation/mpp-sdk))

```ts
import { createKeyPairSignerFromBytes } from '@solana/kit'
import { Mppx } from 'mppx/client'
import { solana } from '@solana/mpp/client'

const signer = await createKeyPairSignerFromBytes(/* 64-byte secret key */)
Mppx.create({ methods: [solana({ signer })] })

const res = await fetch('https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "input": {
      "prompt": "",
      "aspect_ratio": "1:1",
      "resolution": ""
    }
  }),
})
const data = await res.json()
```

### mppx CLI ([docs](https://mpp.dev/sdk/typescript/cli))

```sh
npx mppx "https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions" -X POST -H 'Content-Type: application/json' -d '{"input":{"prompt":"","aspect_ratio":"1:1","resolution":""}}'
```

### Tempo Wallet ([docs](https://docs.tempo.xyz/cli/wallet))

```sh
tempo request "https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions" -X POST --json '{"input":{"prompt":"","aspect_ratio":"1:1","resolution":""}}'
```

### pay.sh — Solana Foundation ([docs](https://pay.sh))

```sh
pay --mainnet curl "https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions" -X POST -H 'Content-Type: application/json' -d '{"input":{"prompt":"","aspect_ratio":"1:1","resolution":""}}'
```

### agentcash CLI ([docs](https://www.npmjs.com/package/agentcash))

```sh
npx agentcash fetch "https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions" -m POST -b '{"input":{"prompt":"","aspect_ratio":"1:1","resolution":""}}' -p mpp
```

### x402 — Base / Solana USDC (x402-fetch) ([docs](https://x402.org))

```ts
import { wrapFetchWithPayment } from 'x402-fetch'
import { privateKeyToAccount } from 'viem/accounts'

const account = privateKeyToAccount('0x...') // Base USDC wallet
const fetchWithPay = wrapFetchWithPayment(fetch, account)

const res = await fetchWithPay('https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    "input": {
      "prompt": "",
      "aspect_ratio": "1:1",
      "resolution": ""
    }
  }),
})
const data = await res.json()
```

### x402 — agentcash CLI

```sh
npx agentcash fetch "https://replicate.payweave.services/models/ideogram-ai/ideogram-v3-balanced/predictions" -m POST -b '{"input":{"prompt":"","aspect_ratio":"1:1","resolution":""}}' -p x402
```
