---
title: "Register an uploaded audio file"
description: "Step 3 of uploading an audio clip. The returned id is the media ID to pass in referenceAudioMediaIds."
canonical: "https://platform.pixai.art/en/docs/api-v2/media/registerAudio"
last-updated: "2026-11-02"
---

# Register an uploaded audio file

Step 3 of uploading an audio clip. The returned `id` is the media ID to pass in `referenceAudioMediaIds`.



## POST https://api.pixai.art/v2/media/audio/register

Authentication: send your API key as `Authorization: Bearer <API key>`.

Machine-readable OpenAPI spec: https://platform.pixai.art/openapi-spec.v2.yaml

### Request body (`application/json`)

- `externalId` (string, required)
  The `externalId` returned by `POST /v2/media/audio/upload-url`.

Example:

```json
{
  "externalId": "3f2b8c1e-6a4d-4f6e-9b1a-2c7d5e8f9a01"
}
```

### Responses

- `200`
  The registered audio file.
  Body fields:
  - `id` (string, required)
    The media ID.
  - `fileUrl` (string | null, optional)
    URL of the file.
  - `duration` (number | null, optional)
    Length in seconds.
  - `size` (number | null, optional)
    Size in bytes.
  - `codec` (string | null, optional)
- `401`
  `UNAUTHORIZED`: no API key was sent. An invalid, revoked or expired key answers `{"message": "invalid token", "code": 40100001}` instead, with a numeric `code`.
