> ## 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.

# Aufgabendetails abfragen

> Gibt den aktuellen Status und das Endergebnis einer asynchronen Bild-, Video- oder künftigen Audioaufgabe zurück.



## OpenAPI

````yaml /de/openapi.json get /v1/tasks/{task_id}
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/tasks/{task_id}:
    get:
      tags:
        - Tasks
      summary: Aufgabendetails abfragen
      description: >-
        Gibt den aktuellen Status und das Endergebnis einer asynchronen Bild-,
        Video- oder künftigen Audioaufgabe zurück.
      operationId: getTask
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
          example: task_123
      responses:
        '200':
          description: Aufgabendetails.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: Aufgabe nicht gefunden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    TaskResponse:
      type: object
      properties:
        task_id:
          type: string
          example: task_123
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - expired
        model:
          type: string
        created_at:
          type: string
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        result:
          oneOf:
            - $ref: '#/components/schemas/MediaResult'
            - type: 'null'
        error:
          oneOf:
            - 8d836be4-6730-462b-87e7-6fd5a859c79c
            - type: 'null'
      required:
        - task_id
        - status
    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
    MediaResult:
      description: >-
        Ergebnis einer abgeschlossenen Aufgabe. Bildaufgaben verwenden das
        OpenAI-Bildformat (Bildadresse unter data[0].url); Video- und
        Audioaufgaben stellen video_url/audio_url sowie ein urls[]-Array bereit.
      oneOf:
        - $ref: '#/components/schemas/ImageTaskResult'
        - $ref: '#/components/schemas/MediaUrlResult'
    ImageTaskResult:
      type: object
      description: >-
        Ergebnis einer Bildaufgabe (OpenAI-Bildformat); die Bildadresse befindet
        sich unter data[0].url.
      properties:
        created:
          type: integer
        data:
          type: array
          items:
            type: object
            properties:
              url:
                type: string
                format: uri
              b64_json:
                type: string
              revised_prompt:
                type: string
      required:
        - data
    MediaUrlResult:
      type: object
      description: >-
        Ergebnis einer Video- oder Audioaufgabe. Die Hauptadresse ist video_url
        oder audio_url; alle Ausgaben sind zugleich in urls[] aufgeführt.
      properties:
        status:
          type: string
        video_url:
          type: string
          format: uri
        audio_url:
          type: string
          format: uri
        output_url:
          type: string
          format: uri
        urls:
          type: array
          items:
            type: string
            format: uri
  responses:
    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

````