Skip to content

Music billed by generated length, final refund state on job.failed, 410 for retired models - #37

Merged
dawidope merged 2 commits into
mainfrom
docs/prod-1.0.56-2
Dec 1, 2026
Merged

dawidope merged 2 commits into
mainfrom
docs/prod-1.0.56-2

Conversation

@dawidope

@dawidope dawidope commented Dec 1, 2026

Copy link
Copy Markdown
Member

What changed

  • Webhooks (webhooks.mdx, openapi*.json): the refund is booked before job.failed is sent, so refunded and price in that payload are final. The example shows a refunded job at 0.
  • Text-to-music (music.mdx, music-price.mdx, pricing.mdx): billed by the length actually generated. The /price quote is for the requested duration and is the maximum; the difference is returned once the result is stored, and the final charge is price in the job result and the job.completed webhook.
  • Errors (errors.mdx): new 410 Gone for retired models, with code: "model_retired", retired_at and replacement, also returned by the model's /price endpoint. The example is a real response for a retired model.

Checks

  • The 410 body (including on /price) checked against the production API.
  • npx mint@latest broken-links (node:22, LF copy): no broken links found.

dawidope and others added 2 commits December 1, 2026 13:24
…10 for retired models

- Webhooks: the refund is booked before job.failed is sent, so
  refunded and price in that payload are final; the example now shows
  a refunded job at 0. The jobs endpoint stays the reference for a job
  that was never charged.
- Text-to-music: billed by the length actually generated. The price
  quote is for the requested duration and is the maximum; the
  difference is returned once the result is stored, and the final
  charge is in the job result and the job.completed webhook (music
  pages and pricing).
- Errors: document 410 Gone with code model_retired, retired_at and
  replacement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dawidope
dawidope merged commit 362e857 into main Dec 1, 2026
2 checks passed
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