> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Retrieve a Music Video storyboard shot media URL

POST https://api.beatapi.io/v1/music-video/tasks/{task_id}/shots/{shot_id}/media

Materialize one storyboard shot video using its BeatAPI `shot_id`.
If the shot has not been stored yet, BeatAPI retrieves the current shot
video, stores it under BeatAPI media storage, and returns a BeatAPI media
URL. Repeated calls return the stored URL when available.

This endpoint does not edit the shot and does not compose a new final
Music Video.


Reference: https://docs.beatapi.io/api-reference/core/music-video/get-music-video-shot-media

## Authentication

- `Authorization` header (bearer token, required) — Send your API key as `Authorization: Bearer <BEATAPI_API_KEY>`.

## Request

### Path parameters

- `task_id` (string, required)
- `shot_id` (string, required)

## Response

### 200

Shot media URL

- `data` (ShotMedia, required)

## Errors

### 400 Bad Request Error

Malformed JSON or a field, value or combination this endpoint does not accept (`bad_request`; the message names the field), or input refused by moderation (`content_policy_violation`). Not retryable unchanged.

- `error` (ErrorError, required) — Structured BeatAPI error. Use `code` (or `retryable`) for program logic and retain `request_id` for support.

### 401 Unauthorized Error

No API key (`missing_api_key`), or a key that is wrong, expired, disabled or exhausted (`invalid_api_key`; the message says which). Send it as `Authorization: Bearer <key>`; the key works with or without the `sk-` prefix. Not retryable.

- `error` (ErrorError, required) — Structured BeatAPI error. Use `code` (or `retryable`) for program logic and retain `request_id` for support.

### 404 Not Found Error

Task or shot not found.

- `error` (ErrorError, required) — Structured BeatAPI error. Use `code` (or `retryable`) for program logic and retain `request_id` for support.

### 429 Too Many Requests Error

Too many requests (`rate_limit_exceeded`, including the free-model limits) or too many tasks processing at once (`user_concurrency_exceeded`). Retryable after `Retry-After` seconds (also `error.retry_after_seconds`).

- `error` (ErrorError, required) — Structured BeatAPI error. Use `code` (or `retryable`) for program logic and retain `request_id` for support.

### 500 Internal Server Error

Unexpected internal error (`internal_error`). Retryable; keep `request_id` for support if it persists.

- `error` (ErrorError, required) — Structured BeatAPI error. Use `code` (or `retryable`) for program logic and retain `request_id` for support.

### 503 Service Unavailable Error

The request could not be completed (`processing_unavailable`, `processing_timeout`, `processing_failed` or `result_transfer_failed`). Nothing was charged. Retryable with backoff; `Retry-After` is sent when the wait is known. BeatAPI does not answer 502 or 504.

- `error` (ErrorError, required) — Structured BeatAPI error. Use `code` (or `retryable`) for program logic and retain `request_id` for support.

## Types

### ShotMedia

- `object` (enum, required)
  - Allowed values: `shot_media`
- `task_id` (string, required)
- `shot_id` (string, required)
- `index` (integer, required)
- `status` (enum, required)
  - Allowed values: `queued`, `processing`, `storyboard_ready`, `requires_action`, `editing`, `composing`, `succeeded`, `failed`
- `media` (ShotMediaMedia, required)
- `created_at` (integer, required)
- `updated_at` (integer, required)
- `request_id` (string, required)

### ErrorError

Structured BeatAPI error. Use `code` (or `retryable`) for program logic and retain `request_id` for support.

- `code` (enum, required) — Stable machine-readable error code. `unauthorized` is the deprecated name for a 401; since 2026-09-29 a 401 is `missing_api_key` or `invalid_api_key`. Treat a legacy `unauthorized` like `invalid_api_key`.
  - Allowed values: `bad_request`, `missing_api_key`, `invalid_api_key`, `unauthorized`, `forbidden`, `not_found`, `insufficient_credits`, `idempotency_conflict`, `user_concurrency_exceeded`, `rate_limit_exceeded`, `content_policy_violation`, `processing_unavailable`, `processing_failed`, `processing_timeout`, `result_transfer_failed`, `invalid_signature`, `realtime_disabled`, `realtime_capacity_unavailable`, `realtime_session_expired`, `origin_not_allowed`, `invalid_client_secret`, `transport_not_allowed`, `internal_error`
- `message` (string, required) — English sentence that states the cause; for `bad_request` it names the field. Written for people and logs, not for parsing.
- `retryable` (boolean, required) — Whether making the same call again could succeed. Present on every error; branch on it instead of the status code. True for 429, 500 and 503 (rate_limit_exceeded, user_concurrency_exceeded, internal_error, processing_unavailable, processing_timeout, processing_failed, result_transfer_failed, realtime_capacity_unavailable). False for a request, key or balance that must change first (bad_request, content_policy_violation, missing_api_key, invalid_api_key, insufficient_credits, forbidden, not_found, idempotency_conflict, realtime_disabled and the other realtime credential codes).
- `request_id` (string, required) — Correlation ID to retain for BeatAPI support.
- `retry_after_seconds` (integer, optional) — Seconds to wait before retrying. Present on every 429, and on a 503 when the wait is known; the same value is sent in the `Retry-After` header.
- `docs` (string, optional) — The public Skill page that says what to do about an error. Present on errors answered by the capability endpoints (`/v1/capabilities/search`, `/v1/capabilities/inspect`, `/v1/capabilities/run`); absent on every other endpoint.

### ShotMediaMedia

- `type` (enum, required)
  - Allowed values: `video`
- `url` (string, required)
- `mime_type` (string, required)

## Examples

**Response**

```json
{
  "data": {
    "object": "shot_media",
    "task_id": "task_8K2qA",
    "shot_id": "shot_xxx",
    "index": 0,
    "status": "succeeded",
    "media": {
      "type": "video",
      "url": "https://media.beatapi.io/outputs/task_8K2qA/shots/shot_xxx/current.mp4",
      "mime_type": "video/mp4"
    },
    "created_at": 1782210000,
    "updated_at": 1782210300,
    "request_id": "req_abc123"
  }
}
```

**SDK Code**

```python Music Video_getMusicVideoShotMedia_example
import requests

url = "https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript Music Video_getMusicVideoShotMedia_example
const url = 'https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Music Video_getMusicVideoShotMedia_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Music Video_getMusicVideoShotMedia_example
require 'uri'
require 'net/http'

url = URI("https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Music Video_getMusicVideoShotMedia_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Music Video_getMusicVideoShotMedia_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Music Video_getMusicVideoShotMedia_example
using RestSharp;

var client = new RestClient("https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Music Video_getMusicVideoShotMedia_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.beatapi.io/v1/music-video/tasks/task_8K2qA/shots/shot_xxx/media")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```