Skip to content

[Inference Providers] deepinfra: add text-to-video support - #2398

Draft
ovuruska wants to merge 1 commit into
huggingface:mainfrom
ovuruska:deepinfra-text-to-video
Draft

[Inference Providers] deepinfra: add text-to-video support#2398
ovuruska wants to merge 1 commit into
huggingface:mainfrom
ovuruska:deepinfra-text-to-video

Conversation

@ovuruska

Copy link
Copy Markdown
Contributor

What

Adds DeepInfraTextToVideoTask so the deepinfra provider supports text-to-video.

DeepInfra's video generation is asynchronous (submit → poll → fetch), so this follows the novita text-to-video pattern rather than a thin forwarder:

  • makeRoute: v1/openai/videos (POST submits the job).
  • preparePayload: forwards prompt; applies prompt/model after caller parameters.
  • getResponse: reads the job id, polls v1/openai/videos/{id} (router-aware base URL) until status is succeeded/failed, then fetches data[0].url and returns a Blob. Throws typed errors on failure/malformed output.

Wired in getProviderHelper.ts under deepinfra. Existing tasks untouched.

Test

Added a textToVideo integration case to the DeepInfra suite (same skip-gated pattern as the other deepinfra tasks).

🤖 Generated with Claude Code

Add DeepInfraTextToVideoTask for DeepInfra's asynchronous video generation:
POST v1/openai/videos submits the job, then getResponse polls
v1/openai/videos/{id} until the job succeeds or fails and returns the resulting
video as a Blob. Mirrors the novita text-to-video poll pattern (base URL derived
from the request URL, router-aware). prompt/model applied after caller params.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant