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

# Image Generation

> Creates an image response for the given prompt.



## OpenAPI

````yaml post /image/generations
openapi: 3.0.0
info:
  title: Horay.ai API
  description: The Horay.ai REST API
  version: 1.0.0
  contact:
    name: Horay.ai Support
    url: https://www.horay.ai/
  license:
    name: MIT
    url: https://github.com/horayai/OpenAPI/blob/main/LICENSE.txt
servers:
  - url: https://api.horay.ai/v1
security:
  - bearerAuth: []
paths:
  /image/generations:
    post:
      tags:
        - Image
      summary: Image Generation
      description: Creates an image response for the given prompt.
      operationId: ImageGeneration
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/FLUX.1-schnell'
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImagesGenerationResponse'
        '400':
          description: BadRequest
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringData'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringData'
        '404':
          description: NotFound
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringData'
        '429':
          description: RateLimit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringData'
        '503':
          description: Overloaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringData'
        '504':
          description: Timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringData'
      deprecated: false
components:
  schemas:
    FLUX.1-schnell:
      type: object
      required:
        - model
        - prompt
        - image_size
      properties:
        model:
          type: string
          default: black-forest-labs/FLUX.1-schnell
          enum:
            - black-forest-labs/FLUX.1-schnell
        prompt:
          type: string
          default: >-
            an island near sea, with seagulls, moon shining over the sea, light
            house, boats int he background, fish flying over the sea
        image_size:
          title: Image Size
          enum:
            - 1024x1024
            - 1536x1536
            - 768x512
            - 768x1024
            - 1024x576
            - 576x1024
          default: 1024x1024
        seed:
          title: Seed
          type: integer
          minimum: 0
          maximum: 9999999999
    ImagesGenerationResponse:
      type: object
      properties:
        images:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
        timings:
          type: object
          properties:
            inference:
              type: number
              format: float
        seed:
          type: integer
    StringData:
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````