Skip to content

feat(render): add WAVE Render to the OpenAPI SSOT (→ codegen SDKs) - #12

Merged
yakimoto merged 2 commits into
mainfrom
feat/render-api
Jun 15, 2026
Merged

feat(render): add WAVE Render to the OpenAPI SSOT (→ codegen SDKs)#12
yakimoto merged 2 commits into
mainfrom
feat/render-api

Conversation

@yakimoto

@yakimoto yakimoto commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Why

WAVE Render has no public surface anywhere in the SDK ecosystem yet (absent from sdk, sdks, wave-surfer-connect, and this SSOT). Per the org convention — one OpenAPI SSOT → codegen → every language SDK — this contributes render to the source of truth so integrators get a render module without a hand-written, drift-prone client.

What

  • Render tag + POST /render — x402-payable (security: []; the payment proof is the identity). Unpaid → 402 + WWW-Authenticate challenge; bad brief → 400 before any charge; 413 OUTPUT_TOO_LARGE / 429 / 451 CONTENT_BLOCKED, all via the normalized Error envelope.
  • Schemas: RenderBrief (a RenderTemplate enum of all 22 templates + props), RenderResult (oneOf inline-dataUrl | signed-url), reusing the shared Error + ValidationError/RateLimitError responses.
  • Per-template prop shapes deliberately stay in the live contract (GET /render/openapi.json) so this enum can't drift from what the renderer accepts.

Safety

Public API contract only — no business refs (content-policy guard: OK). OpenAPI 3.1 parses (35 paths / 56 schemas / 14 tags). Renderer core is source-available BSL; this contract is Apache-2.0 like the rest of the spec.

🤖 Generated with Claude Code


Note

Low Risk
Spec-only addition to the OpenAPI contract; no runtime or auth implementation changes in this diff.

Overview
Adds WAVE Render to the OpenAPI SSOT so codegen can ship a render module instead of hand-written clients.

Introduces a Render tag and POST /render (renderVideo) with security: [] for x402 pay-per-render (402 + WWW-Authenticate, validation 400 before charge, shared Error for 413/429/451). Supports optional Idempotency-Key, binary video/mp4 or RenderResult via Accept: application/json, and documents determinism via sha256.

New schemas: RenderTemplate (22 templates), RenderBrief, and RenderResult (oneOf inline vs signed URL); per-template props stay on GET /render/openapi.json so the enum does not drift.

Reviewed by Cursor Bugbot for commit e8a2a1a. Configure here.


Summary by cubic

Adds WAVE Render to the OpenAPI single source of truth so codegen ships a render module in every SDK. Introduces a POST /render endpoint with x402 pay-per-render and deterministic results.

  • New Features

    • New Render tag and POST /render (security: []) with x402 flow: unpaid → 402 + WWW-Authenticate; invalid brief → 400 before charge.
    • Returns MP4 binary by default, or JSON when Accept: application/json. 4K/alpha delivered via signed, expiring URL.
    • Supports Idempotency-Key to prevent double charges.
    • Schemas: RenderBrief (template + props), RenderTemplate enum (22), RenderResult (inline or url).
    • Determinism via sha256 (body + x-wave-sha256); standardized errors for 413 OUTPUT_TOO_LARGE, 429, 451 CONTENT_BLOCKED.
  • Bug Fixes

    • Made dataUrl required in RenderResultInline so inline responses always carry the MP4 payload and SDKs don’t treat it as nullable.

Written for commit fc5bc1c. Summary will update on new commits.

Review in cubic

Render had no public surface anywhere in the SDK ecosystem (absent from sdk / sdks /
wave-surfer-connect). This adds it to the SSOT so the existing codegen pipeline gives every
language SDK a render module — no hand-written client, no drift.

- Render tag + POST /render (x402-payable → `security: []`, the payment proof is the identity;
  unpaid → 402 + WWW-Authenticate; bad brief → 400 before charge; 413/429/451 normalized).
- RenderBrief (template enum of 22 + props), RenderResult (inline dataUrl | signed url), reusing
  the shared Error envelope + ValidationError/RateLimitError responses.
- Per-template prop shapes stay in the live contract (GET /render/openapi.json) so the enum can't
  drift from the renderer. Reference renderer is source-available (BSL); this contract is public.

Content-policy guard: OK. OpenAPI 3.1 parses; 35 paths / 56 schemas / 14 tags.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: fc5bc1c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@yakimoto, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 1 hour, 32 minutes, and 3 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 112429f2-9169-4ae1-917d-b849c997093a

📥 Commits

Reviewing files that changed from the base of the PR and between 322ecc5 and fc5bc1c.

📒 Files selected for processing (1)
  • openapi.yaml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/render-api
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch feat/render-api

Comment @coderabbitai help to get the list of available commands and usage tips.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Reviewed by Cursor Bugbot for commit e8a2a1a. Configure here.

Comment thread openapi.yaml
Comment thread openapi.yaml
…ding)

The inline-delivery variant carries the MP4 as a base64 data URL, but dataUrl was optional
while delivery/format/sha256/bytes/contentType were required — so a `delivery: inline` response
could validate with no video payload, and codegen SDKs would treat dataUrl as nullable. Make it
required so the inline variant always carries its bytes, matching the VoiceSynthesisInline pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@yakimoto

Copy link
Copy Markdown
Contributor Author

Fixed in fc5bc1c — added `dataUrl` to `RenderResultInline.required`. The inline-delivery variant now always carries its base64 MP4 payload (matching the `VoiceSynthesisInline` pattern), so codegen SDKs treat it as non-optional. Thanks @cursor / @sentry — valid catch.

@yakimoto
yakimoto merged commit 3c5a76f into main Jun 15, 2026
8 checks passed
@yakimoto
yakimoto deleted the feat/render-api branch June 15, 2026 17:02
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