> ## 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 ar/openapi/v1/openapi.localized.yaml GET /videos
openapi: 3.0.3
info:
  title: Phaseo Gateway API
  description: >-
    واجهة API للبوابة تتيح الوصول إلى نماذج ذكاء اصطناعي متنوعة عبر نقاط نهاية
    متوافقة مع OpenAI.
  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:
  /videos:
    get:
      tags:
        - Gateway
      summary: عرض قائمة الفيديوهات
      description: يسرد مهام إنشاء الفيديو غير المتزامنة للفريق المصادق عليه.
      operationId: listVideos
      parameters:
        - name: limit
          in: query
          description: >-
            الحد الأقصى لمهام الفيديو المُرجعة. القيمة الافتراضية 50 والحد
            الأعلى 200.
          schema:
            type: integer
            minimum: 1
            maximum: 200
        - name: status
          in: query
          description: مرشح حالة دورة حياة الفيديو. كرر المعلمة أو قدم قيماً مفصولة بفواصل.
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: offset
          in: query
          description: عدد مهام الفيديو التي تُتجاوز قبل إرجاع الصفحة.
          schema:
            type: integer
            minimum: 0
            maximum: 10000
        - name: after
          in: query
          description: يرجع مهام الفيديو بعد معرّف الفيديو هذا بالترتيب المحدد.
          schema:
            type: string
        - name: order
          in: query
          description: يرتب مهام الفيديو حسب وقت الإنشاء.
          schema:
            type: string
            enum:
              - asc
              - desc
      responses:
        '200':
          description: استجابة قائمة الفيديوهات
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoListResponse'
components:
  schemas:
    VideoListResponse:
      type: object
      properties:
        object:
          type: string
          example: list
        data:
          type: array
          items:
            $ref: '#/components/schemas/VideoGenerationResponse'
        first_id:
          type: string
          nullable: true
        last_id:
          type: string
          nullable: true
        has_more:
          type: boolean
    VideoGenerationResponse:
      type: object
      properties:
        id:
          type: string
        polling_url:
          type: string
        websocket_url:
          type: string
          format: uri
          description: >-
            عنوان WebSocket للاشتراك في تحديثات دورة الحياة الموحدة للمهام غير
            المتزامنة.
        model:
          type: string
        request_id:
          type: string
        session_id:
          type: string
        status:
          type: string
          enum:
            - queued
            - processing
            - completed
            - failed
            - cancelled
            - expired
        lifecycle_status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - cancelled
            - expired
          description: >-
            حالة دورة الحياة غير المتزامنة الموحدة لمستهلكي الاستطلاع وWebSocket
            وwebhook.
        cancel_url:
          type: string
          format: uri
          nullable: true
          description: محجوز للتوافق؛ قيمته حالياً null دائماً.
        output_access:
          type: string
          enum:
            - bytes
            - signed_url
            - both
        generation_id:
          type: string
          nullable: true
        native_video_id:
          type: string
          nullable: true
          description: >-
            معرّف الفيديو/المهمة الأصلي لدى المزوّد عندما يختلف عن معرّف
            البوابة.
        created_at:
          oneOf:
            - type: integer
            - type: string
        started_at:
          nullable: true
          oneOf:
            - type: integer
            - type: string
        completed_at:
          nullable: true
          oneOf:
            - type: integer
            - type: string
        object:
          type: string
          example: video
        poll_after_seconds:
          type: integer
          example: 20
        provider:
          type: string
        seconds:
          type: number
        size:
          type: string
        audio:
          type: boolean
        content_url:
          type: string
          description: >-
            موجود عندما يتضمن output_access القيمة bytes (نقطة نهاية تتطلب
            المصادقة).
        download_url:
          type: string
          nullable: true
          description: >-
            عنوان URL موقّع من الطرف الأول للتنزيل المباشر عندما تكون الحالة
            completed.
        expires_at:
          type: integer
          nullable: true
          description: طابع Unix الزمني (بالثواني) لانتهاء صلاحية download_url الموقّع.
        progress:
          type: integer
          nullable: true
        progress_source:
          type: string
        asset:
          type: object
          nullable: true
          properties:
            id:
              type: string
            mime_type:
              type: string
            bytes:
              type: integer
            sha256:
              type: string
            width:
              type: integer
            height:
              type: integer
            duration_seconds:
              type: number
        outputs:
          type: array
          items:
            $ref: '#/components/schemas/VideoOutput'
        billing:
          $ref: '#/components/schemas/VideoBillingSummary'
        webhook:
          $ref: '#/components/schemas/AsyncWebhookPublicState'
        next_webhook_retry_at:
          type: string
          nullable: true
          description: >-
            طابع ISO الزمني لإعادة محاولة webhook المستخدم المجدولة التالية، إن
            كانت في قائمة الانتظار.
        last_webhook_progress:
          type: number
          nullable: true
          description: أحدث فئة تقدم تقريبية أُرسلت إلى مستهلكي webhook.
        last_webhook_progress_at:
          type: string
          nullable: true
          description: طابع ISO الزمني عند إرسال أحدث فئة تقدم لـwebhook.
        last_webhook_dispatched_at:
          type: string
          nullable: true
          description: طابع ISO الزمني لأحدث محاولة إرسال webhook.
        usage:
          type: object
          properties:
            cost:
              type: number
            is_byok:
              type: boolean
          additionalProperties: true
        error:
          nullable: true
    VideoOutput:
      type: object
      properties:
        index:
          type: integer
        mime_type:
          type: string
        bytes_available:
          type: boolean
        content_url:
          type: string
          description: موجود عندما يتضمن output_access القيمة bytes.
        download_url:
          type: string
          description: عنوان URL موقّع من الطرف الأول لهذا الناتج.
        expires_at:
          type: integer
          description: طابع Unix الزمني (بالثواني) لانتهاء صلاحية عنوان URL لهذا الناتج.
    VideoBillingSummary:
      type: object
      properties:
        currency:
          type: string
        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
        state:
          type: string
          enum:
            - pending
            - estimated
            - settled
            - void
        billable:
          type: boolean
        total_nanos:
          type: integer
          nullable: true
        estimated_nanos:
          type: integer
          nullable: true
        reserved_nanos:
          type: integer
          nullable: true
        reservation_id:
          type: string
          nullable: true
        reservation_status:
          type: string
          nullable: true
        charge_reason:
          type: string
          nullable: true
        charged:
          type: boolean
          nullable: true
        billed_at:
          type: string
      additionalProperties: true
    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'
    AsyncWebhookDeliverySummary:
      type: object
      description: >-
        ملخص تسليم عام لخطافات webhook غير المتزامنة التي تديرها البوابة.
        استخدمه للتمييز بين حالة تنفيذ المهمة وسلامة تسليم 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: حالة HTTP التي ترجعها وجهة webhook، إن توفرت.
        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: حالة HTTP التي ترجعها وجهة webhook، إن توفرت.
        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.