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

# Generierung abrufen

> Ruft eine bestimmte Generierung anhand ihrer ID ab.

Ruft den gespeicherten Auditdatensatz für eine zu deinem Team gehörende `request_id` ab.

Verwende:

* `GET /v1/generations?id=<request_id>`

Wenn das Gateway alle Anfragedetails dieser Generierung erfasst hat, enthält die Antwort zusätzlich:

* `replay_supported`: Gibt an, ob eine wiedergabefertige Nutzlast verfügbar ist
* `replay_request`: Der gespeicherte Anfrageinhalt, den du für eine kontrollierte Wiederholung an den ursprünglichen Endpunkt senden kannst

Typischer Ablauf für eine Wiederholung:

1. Lies den Generierungsdatensatz mit `GET /v1/generations?id=<request_id>`.
2. Prüfe, ob `replay_supported === true` ist.
3. Sende `replay_request` erneut an den durch `endpoint` angegebenen ursprünglichen Endpunkt, etwa `/v1/chat/completions` oder `/v1/responses`.


## OpenAPI

````yaml de/openapi/v1/openapi.localized.yaml GET /generations
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    Eine Gateway-API für den Zugriff auf verschiedene KI-Modelle über
    OpenAI-kompatible Endpunkte.
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: Globales Routing
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /generations:
    get:
      tags:
        - Gateway
      summary: Generierung abrufen
      description: Ruft eine bestimmte Generierung anhand ihrer ID ab.
      operationId: getGeneration
      parameters:
        - name: id
          in: query
          required: true
          description: ID der Generierung
          schema:
            type: string
      responses:
        '200':
          description: Generierungsdaten
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerationResponse'
        '401':
          description: Nicht autorisiert
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  reason:
                    type: string
        '404':
          description: Nicht gefunden
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
components:
  schemas:
    GenerationResponse:
      type: object
      properties:
        created_at:
          type: string
          format: date-time
        request_id:
          type: string
        team_id:
          type: string
        app_id:
          type: string
          nullable: true
        endpoint:
          type: string
        model_id:
          type: string
        provider:
          type: string
        native_response_id:
          type: string
          nullable: true
        stream:
          type: boolean
        byok:
          type: boolean
        status_code:
          type: number
        success:
          type: boolean
        error_code:
          type: string
          nullable: true
        error_message:
          type: string
          nullable: true
        latency_ms:
          type: number
        generation_ms:
          type: number
        usage:
          type: object
          nullable: true
          properties:
            prompt_tokens:
              type: number
            completion_tokens:
              type: number
            total_tokens:
              type: number
        cost_nanos:
          type: number
        currency:
          type: string
        pricing_lines:
          type: array
          items:
            type: object
        key_id:
          type: string
        throughput:
          type: number
          nullable: true
        replay_supported:
          type: boolean
          description: >-
            Gibt an, ob für diese Generierung eine wiedergabefähige
            Anfrage-Nutzlast verfügbar ist.
        replay_request:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Für diese Generierung erfasste wiedergabefähige Anfrage-Nutzlast,
            sofern verfügbar.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authentifizierung mit Bearer-Token

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.