# OPUS to FLAC

Convert Opus audio to FLAC audio.

<p><a href="/audio/opus/opus-to-flac" style="color:rgb(230,0,6);font-weight:600;font-size:0.875rem;text-decoration:none">Try OPUS to FLAC in the browser &rarr;</a></p>

Convert.FAST uses this same API — what you see in the browser is what you get in code.

## Quick reference

| | |
|---|---|
| **Job type** | `audio.opus-to-flac` |
| **targetFormat** | `flac` |
| **Category** | audio |
| **Input formats** | `.opus`, `.ogg` |
| **Output extension** | `.flac` |
| **Costing** | 1 credit per 5 minutes |
| **Max file size** | 2 GB |
| **Max duration** | 3000 min |

## Example

<!-- code-tabs:start default=curl -->
### cURL
```bash
# 1) Submit
JOB_ID=$(curl -sS -X POST "https://api.tools.fast/convert" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@audio.opus" \
  -F "targetFormat=flac" | jq -r '.id')
# → 202 Accepted: {"id": "019e3a7b-...", "status": "Queued"}

# 2) Poll until terminal status
while true; do
  RESPONSE=$(curl -sS "https://api.tools.fast/convert/job/${JOB_ID}" \
    -H "X-Fast-Api-Key: $API_KEY")
  STATUS=$(echo "$RESPONSE" | jq -r '.status')
  [ "${STATUS}" = "Succeeded" ] && break
  [ "${STATUS}" = "Failed" ] || [ "${STATUS}" = "Canceled" ] && { echo "$RESPONSE" | jq; exit 1; }
  sleep 1
done

# 3) Download
curl -sS "https://api.tools.fast/convert/job/${JOB_ID}/download" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -o "audio.flac"
# → Binary file (audio/flac, 6.0 MB)
```
<!-- code-tabs:end -->

## Options

This converter does not support additional options.

## Cost estimate

<!-- code-tabs:start default=curl -->
### cURL
```bash
curl -sS "https://api.tools.fast/convert/estimate/opus/flac?durationMinutes=10"
```
<!-- code-tabs:end -->

## Related

- [OPUS to MP3](opus-to-mp3.md)
- [OPUS to WAV](opus-to-wav.md)
- [OPUS to OGG](opus-to-ogg.md)
- [OPUS to M4A](opus-to-m4a.md)
- [OPUS to AAC](opus-to-aac.md)
