> ## Documentation Index
> Fetch the complete documentation index at: https://docs.insforge.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate images (deprecated)

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



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/ai.yaml post /api/ai/image/generation
openapi: 3.0.3
info:
  title: Insforge AI API
  version: 1.0.0
  description: >-
    Model Gateway helper APIs for OpenRouter key provisioning, model discovery,
    and deprecated compatibility proxy routes
servers: []
security: []
paths:
  /api/ai/image/generation:
    post:
      tags:
        - Client
      summary: Generate images (deprecated)
      description: >-
        Deprecated compatibility proxy. New integrations should use OpenRouter
        image-capable models directly with the provisioned OpenRouter key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationOptions'
      responses:
        '200':
          description: Images generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  model:
                    type: string
                    description: Model used for generation
                  images:
                    type: array
                    items:
                      $ref: '#/components/schemas/OpenRouterImageMessage'
                  text:
                    type: string
                    description: Text content from multimodal models
                  count:
                    type: integer
                    description: Number of images generated
                  metadata:
                    type: object
                    properties:
                      model:
                        type: string
                      revisedPrompt:
                        type: string
                      usage:
                        $ref: '#/components/schemas/TokenUsage'
                  nextActions:
                    type: string
                    example: >-
                      Images have been generated successfully. Use the returned
                      URLs or base64 data to access them.
        '400':
          description: Invalid request - missing model or prompt
        '401':
          description: Unauthorized
        '500':
          description: Failed to generate image
      deprecated: true
      security:
        - bearerAuth: []
components:
  schemas:
    ImageGenerationOptions:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: OpenRouter model identifier for image generation
          example: openai/dall-e-3
        prompt:
          type: string
          description: Text prompt describing the desired image
          example: A serene landscape with mountains and a lake at sunset
    OpenRouterImageMessage:
      type: object
      properties:
        type:
          type: string
          enum:
            - image_url
        image_url:
          type: object
          properties:
            url:
              type: string
              description: Can be a direct URL or data:image base64 URL
    TokenUsage:
      type: object
      properties:
        promptTokens:
          type: integer
        completionTokens:
          type: integer
        totalTokens:
          type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````