---
title: "Generate images (deprecated)"
method: POST
path: "/api/ai/image/generation"
tags: ["Client"]
deprecated: true
---

# Generate images (deprecated)

`POST /api/ai/image/generation`

> **Deprecated.**

Deprecated compatibility proxy. New integrations should use OpenRouter image-capable models directly with the provisioned OpenRouter key.

## Request body

- ImageGenerationOptions
  - `model` string, required — OpenRouter model identifier for image generation
  - `prompt` string, required — Text prompt describing the desired image

## Response `200`

Images generated successfully

- object
  - `model` string — Model used for generation
  - `images` OpenRouterImageMessage[]
    - `type` 'image_url'
    - `image_url` object
      - `url` string — Can be a direct URL or data:image base64 URL
  - `text` string — Text content from multimodal models
  - `count` integer — Number of images generated
  - `metadata` object
    - `model` string
    - `revisedPrompt` string
    - `usage` TokenUsage
      - `promptTokens` integer
      - `completionTokens` integer
      - `totalTokens` integer
  - `nextActions` string

## Other responses

- `400` — Invalid request - missing model or prompt
- `401` — Unauthorized
- `500` — Failed to generate image

---

[API](https://skmtc.net/insforge/apis/insforge-authentication-api.md) · [All operations](https://skmtc.net/insforge/apis/insforge-authentication-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/insforge/insforge-authentication-api/revisions/a935bb49f932/schema)
