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

# Create Ai Generated Image



## OpenAPI

````yaml https://dev-api.cattix.com/openapi.json post /api/v1/media/integrations/freepik/generated-images
openapi: 3.1.0
info:
  title: CATTIX API
  description: CATTIX Backend API
  version: 0.107.0
servers:
  - url: http://localhost:8000
    description: Local
  - url: https://dev-api.cattix.com
    description: Development
  - url: https://staging-api.cattix.com
    description: Staging
  - url: https://api.cattix.com
    description: Production
security: []
paths:
  /api/v1/media/integrations/freepik/generated-images:
    post:
      tags:
        - Media
      summary: Create Ai Generated Image
      operationId: >-
        create_ai_generated_image_api_v1_media_integrations_freepik_generated_images_post
      parameters:
        - name: company_id
          in: query
          required: true
          schema:
            type: integer
            description: Company ID
            title: Company Id
          description: Company ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AIGenerateRequestSchema'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MediaUploadResponseSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    AIGenerateRequestSchema:
      properties:
        prompt:
          type: string
          maxLength: 1000
          minLength: 3
          title: Prompt
          description: Text prompt for image generation
        size:
          type: string
          enum:
            - square_1_1
            - classic_4_3
            - traditional_3_4
            - widescreen_16_9
            - social_story_9_16
          title: Size
          description: >-
            Image aspect ratio (square_1_1, classic_4_3, traditional_3_4,
            widescreen_16_9, social_story_9_16)
          default: square_1_1
        guidance_scale:
          type: number
          maximum: 2
          minimum: 0
          title: Guidance Scale
          description: How closely to follow the prompt (0.0-2.0)
          default: 1
        filter_nsfw:
          type: boolean
          title: Filter Nsfw
          description: Filter NSFW content
          default: true
        style:
          anyOf:
            - type: string
            - type: 'null'
          title: Style
          description: >-
            Optional style modifier (e.g., 'anime', 'photo', 'digital-art',
            '3d', 'painting')
        negative_prompt:
          anyOf:
            - type: string
              minLength: 3
            - type: 'null'
          title: Negative Prompt
          description: What to avoid in the image (min 3 chars)
        seed:
          anyOf:
            - type: integer
              maximum: 1000000
              minimum: 0
            - type: 'null'
          title: Seed
          description: Seed for reproducibility (0-1000000)
        tags:
          items:
            type: string
          type: array
          title: Tags
          description: Optional tags for the generated image
        alt_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Alt Text
          description: Optional alt text for accessibility
      type: object
      required:
        - prompt
      title: AIGenerateRequestSchema
    MediaUploadResponseSchema:
      properties:
        id:
          type: integer
          title: Id
        filename:
          type: string
          title: Filename
        url:
          type: string
          title: Url
        file_size:
          type: integer
          title: File Size
        mime_type:
          type: string
          title: Mime Type
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
        source_type:
          $ref: '#/components/schemas/MediaSourceType'
        external_id:
          anyOf:
            - type: string
            - type: 'null'
          title: External Id
        external_metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: External Metadata
        tags:
          items:
            type: string
          type: array
          title: Tags
        alt_text:
          anyOf:
            - type: string
            - type: 'null'
          title: Alt Text
        date_added:
          type: string
          format: date-time
          title: Date Added
        date_updated:
          type: string
          format: date-time
          title: Date Updated
      type: object
      required:
        - id
        - filename
        - url
        - file_size
        - mime_type
        - source_type
        - date_added
        - date_updated
      title: MediaUploadResponseSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    MediaSourceType:
      type: string
      enum:
        - upload
        - stock
        - ai_generated
      title: MediaSourceType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: api/v1/users/authorization/token

````