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

# Bildgenerierungsaufgabe erstellen

> Erstellt eine asynchrone Bildgenerierungsaufgabe und gibt eine task_id zurück.



## OpenAPI

````yaml /de/openapi.json post /v1/images/generations
openapi: 3.1.0
info:
  title: APIAny.AI Öffentliche API
  version: 1.0.0
  description: >-
    Öffentliche API von APIAny.AI für Modellaggregation, asynchrone
    Medienaufgaben, Chat-Generierung, Guthabenabfrage und Aufgabenabfrage.
servers:
  - url: https://apiany.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Models
    description: Öffentlicher Modellkatalog.
  - name: Chat
    description: Endpunkte für Textgenerierung und chatkompatible Funktionen.
  - name: Images
    description: Endpunkte für Bildgenerierung und Bildbearbeitung.
  - name: Videos
    description: Endpunkte für Videogenerierung.
  - name: Moderation
    description: Image safety and moderation endpoints.
  - name: Tasks
    description: Abfrage asynchroner Aufgaben.
  - name: Account
    description: Konto- und Guthabenabfrage.
  - name: Free APIs
    description: Free utility APIs protected by API key rate limits.
paths:
  /v1/images/generations:
    post:
      tags:
        - Images
      summary: Bildgenerierungsaufgabe erstellen
      description: >-
        Erstellt eine asynchrone Bildgenerierungsaufgabe und gibt eine task_id
        zurück.
      operationId: createImageGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageGenerationRequest'
            examples:
              textToImage:
                value:
                  model: nano-banana
                  prompt: A clean product hero image for an AI API gateway
                  size: 1k
              withReferences:
                value:
                  model: nano-banana-pro
                  prompt: Create a premium ecommerce hero image using these references
                  size: 2k
                  input_images:
                    - https://example.com/reference-1.png
                    - https://example.com/reference-2.png
      responses:
        '202':
          description: Aufgabe erstellt.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncTaskCreateResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ImageGenerationRequest:
      type: object
      properties:
        model:
          type: string
          example: nano-banana
        prompt:
          type: string
        size:
          type: string
          example: 1k
        input_images:
          type: array
          items:
            type: string
            format: uri
        callback_url:
          type: string
          format: uri
      required:
        - model
        - prompt
    AsyncTaskCreateResponse:
      type: object
      properties:
        task_id:
          type: string
          example: task_123
        status:
          type: string
          enum:
            - pending
            - processing
        model:
          type: string
        poll_url:
          type: string
          example: /v1/tasks/task_123
      required:
        - task_id
        - status
        - poll_url
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - invalid_request
                - auth_error
                - rate_limit
                - insufficient_quota
                - content_policy
                - timeout
                - network_error
                - service_error
                - billable_error
                - unknown
            message:
              type: string
            param:
              type:
                - string
                - 'null'
            code:
              type:
                - string
                - 'null'
          required:
            - type
            - message
      required:
        - error
  responses:
    BadRequest:
      description: Ungültige Anfrageparameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Fehlender oder ungültiger API-Key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````