Skip to content

Gateway video generation (async /v1/videos) #509

Open

Description

@vgmartinez

Goal

Proxy async video generation through TrustGate with an OpenAI-shaped create/poll/content API.

Why

OpenAI Sora: POST /v1/videos + get/content. OpenRouter: POST /api/v1/videos (async). Track separately from images/audio so we don’t half-bake sync assumptions.

Architecture (locked)

  • Provider capability (e.g. VideoClient) — registry inherits.
  • Consumer multi-registry: pre-filter CandidateSet to video-capable registries; LB/fallback only among them; pin incapable → 400; none capable → no backend.
  • Never hop outside consumer registries.
  • Chat video_url input stays in Chat multimodal inputs (vision / file / audio parts) #510; this issue is generation jobs.

Consumer surface (async)

  • POST /{consumer}/v1/videos → create job { id, status }
  • GET /{consumer}/v1/videos/{id} (+ /content as upstream allows)

Map OpenRouter’s paths in the OR provider client; keep consumer-facing OpenAI-shaped where possible.

Provider rollout

OpenAI Sora and/or OpenRouter first; Azure preview only if region/model verified. Others deferred.

Governance

Auth, allowlist, long-job TTL/timeouts; cost often non-token → unpriced until #505-style overrides exist.

Priority

After #507 images and #508 audio (P2).

Acceptance criteria

  • Async create + poll (+ content) through TrustGate auth
  • Capability pre-filter + pin fail-closed on multi-registry consumer
  • Clear 4xx for unsupported registry; docs (experimental OK)
  • PR only

Related

#506 · #507 · #508 · #510

Activity

  1. vgmartinez commented on Aug 22, 2026

    @vgmartinez
    ContributorAuthor
  2. vgmartinez commented on Aug 22, 2026

    @vgmartinez
    ContributorAuthor

    Correction: OpenAI Sora videos API exists

    Earlier draft said there was no stable OpenAI /v1/videos. Update: OpenAI now documents async video generation:

    • POST /v1/videos
    • GET /v1/videos/{id} / content download

    OpenRouter similarly: POST /api/v1/videos + poll/content.

    So v1 provider targets can be OpenAI Sora and/or OpenRouter, both async. Azure preview: verify region/model before committing.

    TrustGate consumer surface should still be async create + poll (+ content), aligned with OpenAI’s shape.

  3. vgmartinez commented on Aug 22, 2026

    @vgmartinez
    ContributorAuthor

    Architecture lock (see #507 comment)

    Same consumer-pool capability filter for video jobs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions