Skip to content

For AI agents: every API docs page in one plain-text file is at /docs/llms-full.txt, and the documentation index is at /llms.txt. This page is available as Markdown at https://diffio.ai/docs/developers/guides/compare-flash-and-pro.md, and every docs URL returns Markdown when requested with Accept: text/markdown.

Compare Flash and Pro on one recording

Restore one recording with both models, listen to them side by side, and see what each one cost.

How it works

  1. Your code → Diffio API: POST /projects, generation diffio-flash
  2. Your code → Diffio API: upload, once
  3. Your code → Diffio API: POST …/generations, diffio-pro, same upload
  4. Diffio API → Your code: two generations complete, price_per_hour_usd each
  5. Your code → Diffio API: GET …/media, once per generation
  6. Your code: compare.html, original, Flash, Pro
Two generations of one project share its upload; only the restore runs twice.

Build it

  1. 1

    One project, a Flash generation

    Create the project with generation: {"model": "diffio-flash"} and upload the file once.

  2. 2

    A Pro generation on the same upload

    POST …/generations with diffio-pro. Nothing is uploaded again; each generation has its own status, files and price.

  3. 3

    Work out the cost

    Each generation reports price_per_hour_usd (the same list prices as GET /models). A restore bills whole seconds of the recording with a 60 second minimum; GET /usage reports what was billed.

  4. 4

    Listen side by side

    Each generation's media grant has files.audio; the owner's grant also has files.original.

The complete script

Pass an audio or video file; it writes compare.html.

What you get

The finished Diffio 4.7 Pro project of the same lecture in the Diffio app

Diffio 4.7 Flash

Diffio 4.7 Pro

The same 60 seconds of an archival lecture, as uploaded and restored by each model. How this recording was restored.
  • compare.html: the original and both results on one page, each with its cost.
  • Both generations stay on the project: keep the one you prefer, or let your users choose.
Output of python compare.py interview.mp3
Terminal
diffio-4.7-flash: 60 s at $5.0/h = $0.08
diffio-4.7-pro: 60 s at $10.0/h = $0.17
open compare.html

API reference

  • POSTCreate a project (/projects): The project and its Flash generation.
  • POSTCreate a generation (/projects/{project_id}/generations): The Pro generation.
  • GETGet a playback grant (/projects/{project_id}/generations/{generation_id}/media): audio and original URLs.
  • GETList models (/models): Every model and its price per hour.

Report an issue with this page