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

# बैच सूचीबद्ध करें

> गेटवे के स्थायी एसिंक्रोनस जॉब स्टोर से प्रमाणित वर्कस्पेस के स्वामित्व वाले एसिंक्रोनस बैच जॉब सूचीबद्ध करता है।

वर्कस्पेस में पूर्वावलोकन सुविधा का ऐक्सेस आवश्यक है। सेटअप, वेबहुक और परिणामों को संभालने के लिए [वीडियो और बैच कार्य](../../guides/async-video-and-batch.mdx) देखें।


## OpenAPI

````yaml hi/openapi/v1/openapi.localized.yaml GET /batches
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:
  /batches:
    get:
      tags:
        - Gateway
      summary: बैच सूचीबद्ध करें
      description: >-
        गेटवे के स्थायी एसिंक्रोनस जॉब स्टोर से प्रमाणित वर्कस्पेस के स्वामित्व
        वाले एसिंक्रोनस बैच जॉब सूचीबद्ध करता है।
      operationId: listBatches
      parameters:
        - name: limit
          in: query
          description: >-
            लौटाए जाने वाले बैच जॉब की अधिकतम संख्या। डिफ़ॉल्ट 20 और सीमा 100
            है।
          schema:
            type: integer
            minimum: 1
            maximum: 100
        - name: status
          in: query
          description: >-
            बैच जीवनचक्र स्थिति फ़िल्टर। पैरामीटर दोहराएँ, कॉमा से अलग स्थिति
            मान दें, या कॉमा से अलग फ़िल्टर के लिए statuses उपयोग करें।
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: statuses
          in: query
          description: कॉमा से अलग जीवनचक्र स्थिति फ़िल्टर।
          schema:
            type: string
        - name: offset
          in: query
          description: पेज लौटाने से पहले छोड़े जाने वाले बैच जॉब की संख्या।
          schema:
            type: integer
            minimum: 0
            maximum: 10000
      responses:
        '200':
          description: बैच सूची का जवाब
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchListResponse'
        '401':
          description: अनधिकृत
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    BatchListResponse:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/BatchResponse'
        first_id:
          type: string
          nullable: true
        last_id:
          type: string
          nullable: true
        has_more:
          type: boolean
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        ok:
          type: boolean
          example: false
        error:
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
          example: error_type
        message:
          type: string
          example: Human-readable error message
        description:
          type: string
          example: Additional error details.
        generation_id:
          type: string
          example: G-abc123
        status_code:
          type: integer
          example: 502
        error_type:
          type: string
          enum:
            - user
            - system
          example: system
        error_origin:
          type: string
          enum:
            - user
            - gateway
            - upstream
          example: upstream
        reason:
          type: string
          example: all_candidates_failed
        attempt_count:
          type: integer
          example: 2
        failed_providers:
          type: array
          items:
            type: string
          example:
            - google-ai-studio
            - openai
        failed_statuses:
          type: array
          items:
            type: integer
          example:
            - 403
            - 429
        upstream_error:
          $ref: '#/components/schemas/ErrorUpstreamError'
        failure_sample:
          type: array
          items:
            $ref: '#/components/schemas/ErrorFailureSampleItem'
        provider_failure_diagnostics:
          $ref: '#/components/schemas/ErrorProviderFailureDiagnostics'
        routing_diagnostics:
          $ref: '#/components/schemas/ErrorRoutingDiagnostics'
        provider_candidate_diagnostics:
          $ref: '#/components/schemas/ErrorProviderCandidateDiagnostics'
        provider_enablement:
          $ref: '#/components/schemas/ErrorProviderEnablementDiagnostics'
        missing_pricing_providers:
          type: array
          items:
            type: string
        provider_payment_required_provider:
          type: string
          example: openai
        provider_payment_required_support_notice:
          type: string
          example: >-
            Our upstream provider billing appears to be unavailable. If this
            persists, contact support.
        details:
          type: array
          items:
            type: object
            additionalProperties: true
      additionalProperties: true
    BatchResponse:
      type: object
      properties:
        id:
          type: string
        native_batch_id:
          type: string
          nullable: true
          description: प्रदाता का मूल बैच ID, जब वह गेटवे के स्वामित्व वाले ID से अलग हो।
        object:
          type: string
        endpoint:
          type: string
        errors:
          type: object
        input_file_id:
          type: string
        completion_window:
          type: string
        status:
          type: string
        lifecycle_status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - cancelled
            - expired
          description: >-
            पोलिंग, WebSocket और webhook उपभोक्ताओं के लिए सामान्यीकृत
            एसिंक्रोनस जीवनचक्र स्थिति।
        progress:
          type: integer
          minimum: 0
          maximum: 100
          description: >-
            प्रदाता की अनुरोध संख्या से निकाला गया अनुमानित बैच पूर्णता प्रतिशत,
            यदि उपलब्ध हो। पूर्ण बैच 100 बताते हैं।
        polling_url:
          type: string
          format: uri
        websocket_url:
          type: string
          format: uri
          description: >-
            एसिंक्रोनस जॉब के सामान्यीकृत जीवनचक्र अपडेट की सदस्यता लेने के लिए
            WebSocket URL।
        cancel_url:
          type: string
          format: uri
          nullable: true
          description: संगतता के लिए आरक्षित; वर्तमान में हमेशा null।
        results_url:
          type: string
          format: uri
          nullable: true
          description: >-
            समर्थित अंतिम-स्थिति बैच के लिए प्रमाणित Phaseo JSONL डाउनलोड URL।
            प्रोसेसिंग के दौरान null। अंतिम बैच में आउटपुट न भी हो सकता है।
            स्वामी वर्कस्पेस की API कुंजी उपयोग करें; प्रदाता की अवधारण सीमाएँ
            लागू होती हैं।
        output_file_id:
          type: string
        error_file_id:
          type: string
        created_at:
          type: integer
        in_progress_at:
          type: integer
        expires_at:
          type: integer
        finalizing_at:
          type: integer
        completed_at:
          type: integer
        failed_at:
          type: integer
        expired_at:
          type: integer
        cancelling_at:
          type: integer
        cancelled_at:
          type: integer
        request_counts:
          $ref: '#/components/schemas/BatchRequestCounts'
        metadata:
          type: object
        request_id:
          type: string
        provider:
          type: string
        session_id:
          type: string
        webhook:
          $ref: '#/components/schemas/AsyncWebhookPublicState'
        next_webhook_retry_at:
          type: string
          nullable: true
        last_webhook_progress:
          type: number
          nullable: true
        last_webhook_progress_at:
          type: string
          nullable: true
        last_webhook_dispatched_at:
          type: string
          nullable: true
        finalized_at:
          type: string
          nullable: true
        pricing_lines:
          type: array
          items:
            type: object
            additionalProperties: true
        usage:
          type: object
          description: अंतिमकरण के बाद सामान्यीकृत कुल उपयोग और लागत।
          properties:
            requests:
              type: integer
              nullable: true
            input_tokens:
              type: integer
              nullable: true
            output_tokens:
              type: integer
              nullable: true
            total_tokens:
              type: integer
              nullable: true
            cost_nanos:
              type: integer
              nullable: true
            cost_usd:
              type: number
              nullable: true
            currency:
              type: string
        billing:
          $ref: '#/components/schemas/BatchBillingSummary'
    ErrorUpstreamError:
      type: object
      properties:
        code:
          type: string
          nullable: true
          example: PERMISSION_DENIED
        message:
          type: string
          nullable: true
          example: The caller does not have permission.
        description:
          type: string
          nullable: true
        param:
          type: string
          nullable: true
    ErrorFailureSampleItem:
      type: object
      properties:
        provider:
          type: string
          nullable: true
        type:
          type: string
          nullable: true
        status:
          type: integer
          nullable: true
        upstream_error_code:
          type: string
          nullable: true
        upstream_error_message:
          type: string
          nullable: true
        upstream_error_description:
          type: string
          nullable: true
        upstream_error_param:
          type: string
          nullable: true
        upstream_payload_preview:
          type: string
          nullable: true
        retryable:
          type: boolean
          nullable: true
      additionalProperties: true
    ErrorProviderFailureDiagnostics:
      type: object
      properties:
        category:
          type: string
          enum:
            - credentials_not_configured
            - credentials_invalid_or_forbidden
            - provider_access_missing
            - region_or_project_restriction
            - model_unavailable_for_endpoint
            - rate_limited
            - server_error
        hint:
          type: string
        provider:
          type: string
          nullable: true
    ErrorRoutingDiagnostics:
      type: object
      properties:
        filterStages:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
              beforeCount:
                type: integer
              afterCount:
                type: integer
              droppedProviders:
                type: array
                items:
                  type: object
                  properties:
                    providerId:
                      type: string
                      nullable: true
                    reason:
                      type: string
                      nullable: true
                  additionalProperties: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderCandidateDiagnostics:
      type: object
      properties:
        totalProviders:
          type: integer
        supportsEndpointCount:
          type: integer
        candidateCount:
          type: integer
        droppedUnsupportedEndpoint:
          type: array
          items:
            type: string
        droppedMissingAdapter:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              endpoint:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
    ErrorProviderEnablementDiagnostics:
      type: object
      properties:
        capability:
          type: string
        providersBefore:
          type: array
          items:
            type: string
        providersAfter:
          type: array
          items:
            type: string
        dropped:
          type: array
          items:
            type: object
            properties:
              providerId:
                type: string
                nullable: true
              reason:
                type: string
                nullable: true
            additionalProperties: true
      additionalProperties: true
    BatchRequestCounts:
      type: object
      properties:
        total:
          type: integer
        completed:
          type: integer
        failed:
          type: integer
    AsyncWebhookPublicState:
      type: object
      description: >-
        सुरक्षित रूप से साफ़ किया गया एसिंक्रोनस webhook कॉन्फ़िगरेशन और डिलीवरी
        स्थिति। सीक्रेट कभी नहीं लौटाए जाते; `has_secret` बताता है कि
        हस्ताक्षरित डिलीवरी सक्षम हैं या नहीं। हस्ताक्षरित डिलीवरी में
        x-phaseo-signature, x-phaseo-timestamp, x-phaseo-event-id,
        x-phaseo-event-type, x-phaseo-delivery-key, x-phaseo-attempt और
        x-phaseo-max-attempts हेडर शामिल होते हैं।
      properties:
        url:
          type: string
          format: uri
          nullable: true
        events:
          type: array
          items:
            type: string
        has_secret:
          type: boolean
        delivery:
          $ref: '#/components/schemas/AsyncWebhookDeliverySummary'
        attempts:
          type: array
          items:
            $ref: '#/components/schemas/AsyncWebhookDeliveryAttempt'
    BatchBillingSummary:
      type: object
      properties:
        currency:
          type: string
        billed:
          type: boolean
        charged:
          type: boolean
        reason:
          type: string
        state:
          type: string
          enum:
            - pending
            - estimated
            - settled
            - void
        reservation_id:
          type: string
          nullable: true
        reservation_status:
          type: string
          nullable: true
        estimated_provider_cost:
          type: string
          nullable: true
        estimated_user_cost:
          type: string
          nullable: true
        settled_provider_cost:
          type: string
          nullable: true
        settled_user_cost:
          type: string
          nullable: true
        estimated_nanos:
          type: integer
          nullable: true
        reserved_nanos:
          type: integer
          nullable: true
        estimation_truncated:
          type: boolean
          nullable: true
          description: >-
            बड़े बैच इनपुट फ़ाइल के सीमित नमूने से आरक्षण अनुमान का विस्तार किया
            गया हो तो True।
        estimation_sample_size:
          type: integer
          nullable: true
          description: आरक्षण अनुमान के लिए सीधे मूल्यांकित इनपुट पंक्तियों की संख्या।
        estimation_total_rows:
          type: integer
          nullable: true
          description: आरक्षण अनुमान द्वारा दर्शाई गई कुल इनपुट पंक्तियाँ।
        total_nanos:
          type: integer
          nullable: true
        cost_nanos:
          type: integer
          nullable: true
        cost_usd:
          type: number
          nullable: true
        finalized_at:
          type: string
          nullable: true
        pricing_breakdown:
          type: object
          additionalProperties: true
    AsyncWebhookDeliverySummary:
      type: object
      description: >-
        गेटवे द्वारा प्रबंधित एसिंक्रोनस webhooks की सार्वजनिक डिलीवरी जानकारी।
        इससे जॉब निष्पादन स्थिति को webhook डिलीवरी स्वास्थ्य से अलग समझें।
      properties:
        total_attempts:
          type: integer
          description: इस जॉब के लिए दर्ज कुल डिलीवरी प्रयास।
        delivered_events:
          type: integer
          description: डिलीवरी पूर्ण स्थिति तक पहुँचने वाली डिलीवरी कुंजियों की संख्या।
        delivered_event_types:
          type: array
          description: कम से कम एक बार डिलीवर हुई डिलीवरी कुंजियाँ।
          items:
            type: string
          example:
            - video.completed
        pending_retries:
          type: integer
          description: वर्तमान में पुनः प्रयास के लिए निर्धारित डिलीवरी कुंजियों की संख्या।
        next_retry_at:
          type: string
          nullable: true
          description: अगले निर्धारित पुनः प्रयास का ISO टाइमस्टैम्प, यदि मौजूद हो।
        last_attempt_at:
          type: string
          nullable: true
          description: सबसे हालिया डिलीवरी प्रयास का ISO टाइमस्टैम्प।
        last_attempt_status:
          type: string
          nullable: true
          enum:
            - delivered
            - scheduled_retry
            - failed_permanently
          description: सबसे हालिया डिलीवरी प्रयास का परिणाम।
        last_response_status:
          type: integer
          nullable: true
          description: webhook गंतव्य द्वारा लौटाई गई HTTP स्थिति, यदि उपलब्ध हो।
        last_delivered_at:
          type: string
          nullable: true
          description: सबसे हालिया सफल डिलीवरी का ISO टाइमस्टैम्प।
        last_failure_at:
          type: string
          nullable: true
          description: सबसे हालिया विफल या पुनः प्रयास वाले प्रयास का ISO टाइमस्टैम्प।
        last_error_message:
          type: string
          nullable: true
          description: सबसे हालिया डिलीवरी त्रुटि संदेश, यदि उपलब्ध हो।
    AsyncWebhookDeliveryAttempt:
      type: object
      description: गेटवे द्वारा प्रबंधित एसिंक्रोनस webhook का हालिया डिलीवरी प्रयास।
      properties:
        id:
          type: string
          description: ऑडिट और डिबगिंग के लिए स्थिर प्रयास पहचानकर्ता।
        delivery_key:
          type: string
          description: इस इवेंट की डिलीवरी के लिए आइडेम्पोटेंसी कुंजी।
          example: video.completed
        event_type:
          type: string
          description: webhook गंतव्य को डिलीवर किया गया इवेंट प्रकार।
          example: video.completed
        status:
          type: string
          enum:
            - delivered
            - scheduled_retry
            - failed_permanently
        attempt_number:
          type: integer
          description: इस डिलीवरी कुंजी के लिए एक से शुरू होने वाला प्रयास क्रमांक।
        max_attempts:
          type: integer
          description: डिलीवरी को स्थायी रूप से विफल चिह्नित करने से पहले अधिकतम प्रयास।
        tried_at:
          type: string
          description: यह प्रयास किए जाने का ISO टाइमस्टैम्प।
        delivered_at:
          type: string
          nullable: true
          description: इस प्रयास की सफल डिलीवरी का ISO टाइमस्टैम्प।
        next_retry_at:
          type: string
          nullable: true
          description: >-
            इस प्रयास के बाद अगले पुनः प्रयास का ISO टाइमस्टैम्प, यदि निर्धारित
            हो।
        response_status:
          type: integer
          nullable: true
          description: webhook गंतव्य द्वारा लौटाई गई HTTP स्थिति, यदि उपलब्ध हो।
        error_message:
          type: string
          nullable: true
          description: डिलीवरी त्रुटि संदेश, यदि उपलब्ध हो।
        response_body_preview:
          type: string
          nullable: true
          description: >-
            webhook गंतव्य के जवाब के बॉडी का संवेदनशील जानकारी हटाया गया
            पूर्वावलोकन।
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Bearer टोकन से प्रमाणीकरण

````

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