video-add-adapter

Implements a video-generation provider adapter with async submit/poll mapping, pricing, and tests.

7|12|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/OpenRouterTeam/docs --skill video-add-adapter-openrouterteam
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: video-add-adapter
Source: https://github.com/OpenRouterTeam/docs/tree/main/.agents/skills/video-add-adapter
Command: npx skills add https://github.com/OpenRouterTeam/docs --skill video-add-adapter-openrouterteam

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding a new video-generation provider to the OpenRouter platform requires touching many coordinated pieces—adapter code, enums, pricing SKUs, factory registration, and tests—and missing any one of them produces silent routing or billing failures. This Skill guides the implementation of a complete provider adapter from a finished research note. ## Core Features & Use Cases - Adapter Implementation: Extends BaseVideoGenerationAdapter with getUrl, transformRequest, transformResponse, getVideoDuration, and getEstimatedSKUItems, using Zod to validate upstream submit, poll, terminal, and artifact responses. - Job Lifecycle & Capability Mapping: Classifies pending/running/completed/failed/cancelled states correctly and extends serving enums so staged supported_video_parameters stay schema-valid. - Pricing and Registration: Defines per-second/per-video SKU units and registers the strategy, adapter enum, factory entry, provider mapping, and endpoint pricing override. - Use Case: After completing a research note at docs/video-research/<provider>.md, use this Skill to implement the full adapter, wire pricing, and add tests covering submit, poll states, artifact fetch, and SKU calculation. ## Quick Start Implement a new video-generation provider adapter from the completed research note in docs/video-research, including pricing registration and tests.

Frequently Asked Questions about video-add-adapter

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new video generation provider adapter?▼

Extend BaseVideoGenerationAdapter and implement getUrl, transformRequest, transformResponse, getVideoDuration, and getEstimatedSKUItems, using existing provider adapters as templates. Then register the adapter enum, factory entry, provider mapping, and pricing strategy, and add tests covering submit, poll states, and SKU calculation.

How do I map async video job submit and poll responses?▼

Return the upstream job ID from submit and classify pending, running, completed, failed, and cancelled states without treating transient poll responses as terminal. Validate and normalize upstream submit, poll, terminal, and artifact responses with Zod schemas.

Why does a staged video endpoint accept requests with no duration or resolution limits?▼

The serving read path returns null when supported_video_parameters fails schema validation, and video routing treats missing capability lists as compatible with every request. Extend the serving enums in the same adapter PR so staged capability metadata is schema-valid instead of dropping the capability field.

How do I handle video-in/video-out tools like upscale or edit adapters?▼

Use extractSoleVideoReference for the single video_url reference, reject generation controls, return null from getVideoDuration at request time, and set duration plus the final SKU from the terminal poll. The black-forest-labs-video-upscale and black-forest-labs-video-edit adapters are the reference models.

What tests are required for a video generation adapter?▼

Mock globalThis.fetch and cover submit, each poll state, malformed and error responses, artifact fetch, duration and SKU calculation, input references, passthrough filtering, and redacted logs. Run the video-generation package test and typecheck commands before opening the PR.