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

# जनरेशन प्राप्त करें

> ID के आधार पर किसी विशिष्ट जनरेशन को प्राप्त करता है।

आपकी टीम से जुड़े `request_id` का संग्रहीत ऑडिट रिकॉर्ड प्राप्त करता है।

उपयोग करें:

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

यदि गेटवे ने उस जनरेशन के अनुरोध का पूरा विवरण दर्ज किया है， तो प्रतिक्रिया में यह भी शामिल होगा:

* `replay_supported`: क्या रीप्ले के लिए तैयार पेलोड उपलब्ध है
* `replay_request`: संग्रहीत अनुरोध बॉडी, जिसे नियंत्रित तरीके से फिर चलाने के लिए मूल एंडपॉइंट पर वापस भेज सकते हैं

रीप्ले की सामान्य प्रक्रिया:

1. `GET /v1/generations?id=<request_id>` से जनरेशन रिकॉर्ड पढ़ें।
2. जाँचें कि `replay_supported === true` है।
3. `endpoint` से बताए गए मूल एंडपॉइंट, जैसे `/v1/chat/completions` या `/v1/responses`, पर `replay_request` फिर भेजें।


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml GET /generations
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    OpenAI-संगत एंडपॉइंट के माध्यम से विभिन्न AI मॉडल तक पहुँचने के लिए एक गेटवे
    API।
  version: 1.0.0
  contact:
    name: Phaseo
    url: https://phaseo.app
    email: danielbutler500@gmail.com
servers:
  - url: https://api.phaseo.app/v1
    description: वैश्विक रूटिंग
security:
  - BearerAuth: []
tags:
  - name: Gateway
    description: Core Phaseo Gateway operations.
paths:
  /generations:
    get:
      tags:
        - Gateway
      summary: जनरेशन प्राप्त करें
      description: ID के आधार पर किसी विशिष्ट जनरेशन को प्राप्त करता है।
      operationId: getGeneration
      parameters:
        - name: id
          in: query
          required: true
          description: जनरेशन का ID
          schema:
            type: string
      responses:
        '200':
          description: जनरेशन डेटा
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerationResponse'
        '401':
          description: अनधिकृत
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                  error:
                    type: string
                  reason:
                    type: string
        '404':
          description: नहीं मिला
          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: >-
            बताता है कि इस जनरेशन के लिए replay-ready अनुरोध payload उपलब्ध है
            या नहीं।
        replay_request:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            उपलब्ध होने पर इस जनरेशन के लिए कैप्चर किया गया replay-ready अनुरोध
            payload।
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

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