> For the complete documentation index, see [llms.txt](https://developer.topazlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.topazlabs.com/reference/api-endpoints/video/get-request-metrics.md).

# Get Request Metrics

This section allows you to get the metrics for a request

## Get Video Request Metrics

> Get metrics for the request\
> \
> \## Response body\
> \
> \| \*\*Property\*\*        | \*\*Type\*\* | \*\*Description\*\*                                     |\
> \|---------------------|----------|-----------------------------------------------------|\
> \| \*\*minutesInState\*\*  | Object   | Minutes spent in various processing states          |\
> \| \*\*minutesInState.pendingSourceUpload\*\* | Number    | - |\
> \| \*\*minutesInState.initializing\*\*        | Number    | - |\
> \| \*\*minutesInState.preprocessing\*\*       | Number    | - |\
> \| \*\*minutesInState.processing\*\*          | Number    | - |\
> \| \*\*minutesInState.postprocessing\*\*      | Number    | - |\
> \| \*\*minutesToEnhance\*\*| Number   | Time to complete enhancement after source upload    |\
> \| \*\*inputFrames\*\*     | Integer  | Number of input frames                              |\
> \| \*\*outputFrames\*\*    | Integer  | Number of output frames                             |\
> \| \*\*inputSize\*\*       | String   | Size of input video                                 |\
> \| \*\*outputSize\*\*      | String   | Size of output video                                |\
> \| \*\*chunks\*\*          | Array    | Refer to \*\*VideoChunkMetrics\*\* below                |\
> \
> \---\
> \
> \#### VideoChunkMetrics\
> \
> \| \*\*Property\*\*        | \*\*Type\*\*   | \*\*Description\*\*                                  |\
> \|---------------------|------------|--------------------------------------------------|\
> \| \*\*chunkIndex\*\*                | Integer   | Index of the chunk                      |\
> \| \*\*tasks\*\*                     | Array     | List of processing tasks for the chunk  |\
> \| \*\*tasks.\*.minutesProcessing\*\* | Number    | Duration of processing in minutes       |\
> \| \*\*tasks.\*.inputFrames\*\*       | Integer   | Number of input frames                  |\
> \| \*\*tasks.\*.outputFrames\*\*      | Integer   | Number of output frames                 |\
> \| \*\*tasks.\*.inputSize\*\*         | String    | Size of the input file                  |\
> \| \*\*tasks.\*.outputSize\*\*        | String    | Size of the output file                 |<br>

```json
{"openapi":"3.0.3","info":{"title":"Video API","version":"1.0.0"},"tags":[{"name":"Get Request Metrics","description":"This section allows you to get the metrics for a request\n"}],"servers":[{"url":"https://api.topazlabs.com","description":"Production API base URL"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"MetricsResponse":{"type":"object","properties":{"minutesInState":{"type":"object","properties":{"pendingSourceUpload":{"type":"number"},"initializing":{"type":"number"},"preprocessing":{"type":"number"},"processing":{"type":"number"},"postprocessing":{"type":"number"}}},"minutesToEnhance":{"type":"number","description":"Time taken for the final enhanced video to become available for download after user finished uploading the source video."},"inputFrames":{"type":"integer"},"outputFrames":{"type":"integer"},"inputSize":{"type":"string"},"outputSize":{"type":"string"},"chunks":{"type":"array","description":"Metrics for each chunk","items":{"$ref":"#/components/schemas/ChunkMetrics"}}}},"ChunkMetrics":{"type":"object","properties":{"chunkIndex":{"type":"integer","description":"Index of the chunk starting from 0"},"tasks":{"type":"array","description":"Multiple enhancement tasks may have been run on a chunk","items":{"type":"object","properties":{"minutesProcessing":{"type":"number"},"inputFrames":{"type":"integer"},"outputFrames":{"type":"integer"},"inputSize":{"type":"string"},"outputSize":{"type":"string"}}}}}}},"responses":{"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"NotFound":{"description":"Enhancement request with the provided ID not found","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"InternalServerError":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/video/{requestId}/metrics":{"get":{"tags":["Get Request Metrics"],"summary":"Get Video Request Metrics","operationId":"GetVideoRequestMetrics","description":"Get metrics for the request\n\n## Response body\n\n| **Property**        | **Type** | **Description**                                     |\n|---------------------|----------|-----------------------------------------------------|\n| **minutesInState**  | Object   | Minutes spent in various processing states          |\n| **minutesInState.pendingSourceUpload** | Number    | - |\n| **minutesInState.initializing**        | Number    | - |\n| **minutesInState.preprocessing**       | Number    | - |\n| **minutesInState.processing**          | Number    | - |\n| **minutesInState.postprocessing**      | Number    | - |\n| **minutesToEnhance**| Number   | Time to complete enhancement after source upload    |\n| **inputFrames**     | Integer  | Number of input frames                              |\n| **outputFrames**    | Integer  | Number of output frames                             |\n| **inputSize**       | String   | Size of input video                                 |\n| **outputSize**      | String   | Size of output video                                |\n| **chunks**          | Array    | Refer to **VideoChunkMetrics** below                |\n\n---\n\n#### VideoChunkMetrics\n\n| **Property**        | **Type**   | **Description**                                  |\n|---------------------|------------|--------------------------------------------------|\n| **chunkIndex**                | Integer   | Index of the chunk                      |\n| **tasks**                     | Array     | List of processing tasks for the chunk  |\n| **tasks.*.minutesProcessing** | Number    | Duration of processing in minutes       |\n| **tasks.*.inputFrames**       | Integer   | Number of input frames                  |\n| **tasks.*.outputFrames**      | Integer   | Number of output frames                 |\n| **tasks.*.inputSize**         | String    | Size of the input file                  |\n| **tasks.*.outputSize**        | String    | Size of the output file                 |\n","parameters":[{"in":"path","name":"requestId","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetricsResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.topazlabs.com/reference/api-endpoints/video/get-request-metrics.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
