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
- Your code → Diffio API:
POST /projects, generation diffio-flash - Your code → Diffio API:
upload, once - Your code → Diffio API:
POST …/generations, diffio-pro, same upload - Diffio API → Your code:
two generations complete, price_per_hour_usd each - Your code → Diffio API:
GET …/media, once per generation - Your code:
compare.html, original, Flash, Pro
Build it
- 1
One project, a Flash generation
Create the project with
generation: {"model": "diffio-flash"}and upload the file once. - 2
A Pro generation on the same upload
POST …/generationswithdiffio-pro. Nothing is uploaded again; each generation has its own status, files and price. - 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
Listen side by side
Each generation's media grant has
files.audio; the owner's grant also hasfiles.original.
The complete script
Pass an audio or video file; it writes compare.html.
"""Restore one recording with Flash and Pro, then write compare.html to hear them side by side.
python compare.py interview.mp3
"""
import html
import math
import os
import sys
from diffio import DiffioClient
path = sys.argv[1]
client = DiffioClient() # reads DIFFIO_API_KEY
# 1. One project and one upload, with a Flash generation...
project = client.projects.create(file_name=os.path.basename(path), size_bytes=os.path.getsize(path),
generation={"model": "diffio-flash"})
client.projects.upload(project, path)
# 2. ...and a Pro generation on the same upload.
pro = client.generations.create(project.id, model="diffio-pro")
# 3. Wait for both; work out each one's cost at list price.
players = []
for generation_id in (project.latest_generation.id, pro.id):
generation = client.generations.wait(project.id, generation_id, timeout=3600)
media = client.generations.media(project.id, generation.id)
seconds = max(60, math.ceil(generation.duration_seconds or 0)) # whole seconds, 60 second minimum
cost = seconds * (generation.price_per_hour_usd or 0) / 3600
print(f"{generation.model}: {seconds} s at ${generation.price_per_hour_usd}/h = ${cost:.2f}")
players.append((f"{generation.model} (${cost:.2f})", media.files["audio"]))
players.insert(0, ("Original", media.files["original"]))
# 4. One page with all three; the URLs work for 6 hours.
with open("compare.html", "w") as page:
page.write("<!doctype html><title>Flash and Pro</title>")
for label, url in players:
page.write(f'<h2>{html.escape(label)}</h2><audio controls src="{html.escape(url)}"></audio>')
print("open compare.html")What you get

Uploaded
Diffio 4.7 Flash
Diffio 4.7 Pro
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
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.htmlAPI 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.