> For Diffio's key facts and every Markdown page, see [llms.txt](https://diffio.ai/llms.txt). This page is also available as HTML at https://diffio.ai/api-overview/.

Diffio speech restoration API: REST plus Python and Node SDKs from $5/hour, billed per second with a $5 starter credit. Keys, authentication, models.

# Speech restoration API: build Diffio into your product

One Python or Node helper call uploads, restores and downloads a file.

**From $5/hour** billed per second $5 starter credit

[Explore SDK docs](https://diffio.ai/docs/developers/quick-start/)

[API pricing: 60-second minimum per generation, no card needed](https://diffio.ai/api-pricing/)

## Python and Node SDK example

`pip install diffio`

restore_amelia.py

```
from diffio import DiffioClient

client = DiffioClient()  # reads DIFFIO_API_KEY

result = client.restore_audio(
    "amelia_earhart.wav",
    model="diffio-4.7-flash",
    output_path="amelia_restored.mp3",
    on_progress=lambda g: print(g.status),
)

print(result.project.id, result.generation.id)
print(result.output_path)
```

`npm install diffio`

restore-amelia.mjs

```
import { DiffioClient } from "diffio"

const client = new DiffioClient() // DIFFIO_API_KEY

const result = await client.restoreAudio({
  file: "amelia_earhart.wav",
  model: "diffio-4.7-flash",
  outputPath: "amelia_restored.mp3",
  onProgress: (g) => console.log(g.status),
})

console.log(result.project.id, result.generation.id)
console.log(result.output_path)
```

REST requests and responses at `https://api.diffio.ai/v2` use `snake_case` field names (such as `file_name` and `size_bytes`), and both SDKs keep them; JavaScript SDK helper options use camelCase (such as `outputPath`).

## From an uploaded recording to restored speech audio

The helper above runs these four stages; call each one yourself for full control.

1. ### Create and upload a project

   Create a project and upload the recording to its upload URL.

   [Create project endpoint](https://diffio.ai/docs/api-reference/create-project/)
2. ### Start a restoration

   Pass `diffio-4.7-flash` or `diffio-4.7-pro` in `model`.

   [Create generation endpoint](https://diffio.ai/docs/api-reference/create-generation/)
3. ### Wait for completion

   Poll the generation, or get [webhooks](https://diffio.ai/docs/developers/webhooks/).

   [Get generation endpoint](https://diffio.ai/docs/api-reference/get-generation/)
4. ### Download restored speech audio

   Fetch a signed playback grant and save the restored file.

   [Generation media endpoint](https://diffio.ai/docs/api-reference/get-generation-media/)

### Base URL and authentication

```
https://api.diffio.ai/v2
Authorization: Bearer $DIFFIO_API_KEY
```

Keep the key on your server; the SDKs send it for you. [Authentication reference](https://diffio.ai/docs/api-reference/introduction/#authentication)

**Keys, headers and permissions**

[Create an API key](https://diffio.ai/developers/api-keys/) in the developer dashboard and keep it on your server as a secret. Send it on every request to `https://api.diffio.ai/v2` as `Authorization: Bearer <key>`; the SDKs read `DIFFIO_API_KEY` from the environment automatically. Each key carries scopes to match the endpoints it calls.

### Batch, not streaming

Uploaded recordings run as cloud batch jobs; video keeps its picture.

**Batch jobs and video**

The helper above runs these four stages for you. Use the explicit resource workflow when your backend needs control over each stage. The [developer quickstart](https://diffio.ai/docs/developers/quick-start/) includes complete Python and Node examples.

Diffio processes uploaded recordings as cloud batch jobs rather than as a real-time streaming API. For supported video inputs, API processing restores the speech soundtrack while the picture and other visuals remain unchanged.

## Before and after: Diffio 4.7 Flash and Pro on one recording

Switch versions while it plays; results depend on the source.

**An archival David Gooding lecture, used with permission. Rendered with Diffio 4.7 on November 3, 2026. Source & method**

The first 60 seconds of an archival David Gooding lecture, used with the owner’s permission. The Flash and Pro versions were restored with Diffio 4.7 on November 3, 2026. All three play at matched loudness as 160 kbps MP3, with no other enhancement. [Source and render record](https://diffio.ai/media/recording-rescue/manifest.json).

## Diffio 4.7 Flash and Pro API models

Same requests for both; pick by speed and quality. Billed per second of source.

| Detail | [Diffio 4.7 Flash](https://diffio.ai/api-model-cards/#model-diffio-4.7-flash) | [Diffio 4.7 Pro](https://diffio.ai/api-model-cards/#model-diffio-4.7-pro) |
| --- | --- | --- |
| Speed | About 30× faster than real time | About 10× faster than real time |
| Price per hour | $5.00 | $10.00 |
| Model ID | `diffio-4.7-flash` | `diffio-4.7-pro` |

- [Model cards Selection details, inputs and limits](https://diffio.ai/api-model-cards/)
- [API pricing Per-second rates, billing rules and examples](https://diffio.ai/api-pricing/)
- [Speech enhancement APIs compared Diffio against Krisp, ElevenLabs, Auphonic and others](https://diffio.ai/speech-enhancement-api-comparison/)

## Get your API key

Every API account starts with a one-time $5 usage credit, so you can run your first generations without a payment method.

[Read the quickstart](https://diffio.ai/docs/developers/quick-start/)
