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

# Get moderation detail by media ID

GET https://api.fastpix.com/v1/agents/moderation/{mediaId}

This endpoint retrieves the latest moderation details for a media item using its source media ID, without requiring a job ID. The response includes the ID of the moderated output media, its moderation status, and all flagged segments.

#### How it works

1. Send a `GET` request to this endpoint, replacing `{mediaId}` with the source media ID of a media item that has been moderated.

2. The response returns that media's flagged `segments`.

Reference: https://fastpix.com/docs/agents-api/moderation-agent/get-moderation-by-media

## Authentication

- `Authorization` header (basic auth, required) — FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. * Username: Access Token ID * Password: Secret Key Activate your FastPix account to generate your API credentials. See the guide here

## Request

### Path parameters

- `mediaId` (string, required) — The source media identifier.

## Response

### 200

Moderation detail fetched successfully

- `success` (boolean, optional) — Shows the request status. Returns true for success and false for failure.
- `data` (ModerationMediaDetailResponseData, optional)

## Types

### ModerationMediaDetailResponseData

- `jobId` (string, optional, nullable) — The job the media belongs to.
- `sourceMediaId` (string, optional) — The source media identifier.
- `mediaId` (string, optional, nullable) — The moderated output media id, or null until processing completes.
- `status` (string, optional) — The media's moderation status.
- `segments` (list of ModerationSegment, optional) — The media's flagged spans.
- `createdAt` (datetime, optional) — When the media entry was created.
- `updatedAt` (datetime, optional) — When the media entry was last updated.

### ModerationSegment

A single flagged span on a media.

- `modality` (string, optional) — The track the span was detected on.
- `start` (double, optional) — Start offset in seconds.
- `end` (double, optional) — End offset in seconds.
- `tcrIn` (string, optional) — SMPTE timecode of the span start.
- `tcrOut` (string, optional) — SMPTE timecode of the span end.
- `category` (string, optional) — The detected category.
- `riskScore` (double, optional) — The detection risk score reported for the span.
- `action` (enum, optional) — The action applied when a condition is matched. Video tracks support cut, blur and flag; audio tracks support beep, mute and flag.
  - Allowed values: `cut`, `blur`, `flag`, `beep`, `mute`

## Examples

**Response**

```json
{
  "success": true,
  "data": {
    "jobId": "98ad26de-b58b-4943-a2d6-449482afb50b",
    "sourceMediaId": "ea0da10d-1b72-40e5-b98d-f9f7516abbce",
    "mediaId": "7b1c2d3e-4f50-4a6b-9c8d-0e1f2a3b4c5d",
    "status": "completed",
    "segments": [
      {
        "modality": "video",
        "start": 12.5,
        "end": 14,
        "tcrIn": "00:00:12:15",
        "tcrOut": "00:00:14:00",
        "category": "nudity",
        "riskScore": 0.94,
        "action": "blur"
      }
    ],
    "createdAt": "2026-11-20T09:43:36Z",
    "updatedAt": "2026-11-20T09:43:59Z"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

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

```go
package main

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

func main() {

	url := "https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce"

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

	req.SetBasicAuth("<username>", "<password>")

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

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

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

}
```

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

url = URI("https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce")

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

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

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

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

HttpResponse<String> response = Unirest.get("https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce")
  .basicAuth("<username>", "<password>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fastpix.com/v1/agents/moderation/ea0da10d-1b72-40e5-b98d-f9f7516abbce")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```