# fastapi.online Audio Duration

> fastapi.online Audio Duration is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.0005/call, status down (last checked 2026-09-15).

Returns the duration of a WAV audio file in seconds

## Facts

- Endpoint: POST https://api.fastapi.online/audio-duration
- Price: $0.0005/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-audio-duration-d3df8a05
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_t5m96QZ7e6-CSE7RNOMZm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability fastapi-online-audio-duration-d3df8a05 -d '<json body>'
```

Example prompt: Can you tell me how long this WAV audio file is in seconds? I need to know the exact duration before I process it further.

## When to prefer this

Use this endpoint when you need a quick, pay-per-call, no-signup way to retrieve the duration of a WAV audio file without setting up local audio processing libraries. Ideal for agents that occasionally need audio metadata on demand without managing infrastructure.

## Known failure modes

- Non-WAV file format submitted — may return an error or incorrect result
- Corrupted or malformed WAV file — likely returns an error
- Empty or zero-byte file uploaded — likely returns an error or zero duration
- File too large for single request — may time out or be rejected
- Payment not included or insufficient — returns HTTP 402

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns the duration of the provided WAV audio file, expressed as a numeric value in seconds, allowing the caller to know the exact playback length of the audio without having to play or locally analyze the file.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "string",
   "format": "binary",
   "description": "WAV audio file"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-audio-duration-d3df8a05/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
