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

# Generate an image (synchronous)



## OpenAPI

````yaml /api-reference/openapi.json post /v1/images
openapi: 3.1.0
info:
  title: Rimp API
  version: 1.0.0
  description: >-
    AI generation API across 8 modalities — image, video, voice, music, avatar,
    chat, 3D and upscale. Multi-model side-by-side comparisons, unified billing,
    one API key.
servers:
  - url: https://api.rimp.io
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/images:
    post:
      summary: Generate an image (synchronous)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                prompt:
                  type: string
                aspect_ratio:
                  type: string
                  enum:
                    - '1:1'
                    - '3:2'
                    - '2:3'
                    - '16:9'
                    - '9:16'
                num_outputs:
                  type: integer
                  minimum: 1
                  maximum: 4
                negative_prompt:
                  type: string
                seed:
                  type: integer
      responses:
        '200':
          description: Generation completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generation'
        '402':
          description: Insufficient credits.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Generation:
      type: object
      properties:
        id:
          type: string
        object:
          type: string
          enum:
            - generation
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - canceled
        modality:
          type: string
          enum:
            - image
            - video
            - voice
            - music
            - avatar
            - chat
            - 3d
            - upscale
        prompt:
          type: string
        params:
          type: object
          additionalProperties: true
        reserved_credits:
          type: integer
        charged_credits:
          type: integer
        refunded_credits:
          type: integer
        cache_hit:
          type: boolean
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/GenerationOutput'
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
          required:
            - type
            - code
            - message
    GenerationOutput:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
          enum:
            - image
            - video
            - audio
            - thumbnail
        mime:
          type: string
        width:
          type: integer
          nullable: true
        height:
          type: integer
          nullable: true
        duration_s:
          type: string
          nullable: true
        url:
          type: string
          format: uri
        moderation_status:
          type: string
          enum:
            - pending
            - approved
            - flagged
            - blocked
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````