> 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/accept-request.md).

# Accept Request

This section allows you to accept the created request's cost and upload the source video

## Accept and Upload Video Request

> Calling this endpoint reserves the estimated credits and returns signed URL(s) for \*\*multi-part upload\*\*.\
> \
> \### Video uploads\
> The Video API uses multi-part upload to receive the video file for processing. You can use a simple byte-division function to create segments for the API to receive.\
> \
> For example, if you have a 900MB video file and the system returns 3 upload URLs. You would then:\
> \
> \- Upload bytes 0-300,000,000 via HTTP PUT to \`urls\[0]\`\
> \- Upload bytes 300,000,001-600,000,000 via HTTP PUT to \`urls\[1]\`\
> \- Upload bytes 600,000,001-900,000,000 via HTTP PUT to \`urls\[2]\`\
> \
> If one of the uploads fail, you may reuse the same URL to retry - the action overwrites any partially uploaded data.\
> \
> A successful response from the PUT request returns an \`ETag\` value in the header for each segment. Retain the part number and ETag pair for the next step (PATCH /video/{requestId}/complete-upload/).\
> \
> \## Response body\
> \
> \| \*\*Property\*\*  | \*\*Type\*\*   | \*\*Description\*\*                                     |\
> \|---------------|------------|-----------------------------------------------------|\
> \| \*\*uploadId\*\*  | String     | Upload ID for multi-part upload                     |\
> \| \*\*urls\*\*      | Array      | URLs for multi-part uploads                         |<br>

```json
{"openapi":"3.0.3","info":{"title":"Video API","version":"1.0.0"},"tags":[{"name":"Accept Request","description":"This section allows you to accept the created request's cost and upload the source video\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":{"AcceptResponse":{"type":"object","properties":{"uploadId":{"type":"string","description":"Upload ID for completing multi-part upload"},"urls":{"type":"array","description":"URLs to PUT the parts to. The source video should be split into urls.length number of byte ranges.","items":{"type":"string"}},"message":{"type":"string","description":"The endpoint will return message only if the video will be sourced from an external storage provider"}}}},"responses":{"BadRequest":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"PaymentRequired":{"description":"Payment required","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"}}}}}},"ServiceUnavailable":{"description":"Service unavailable","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}},"paths":{"/video/{requestId}/accept":{"patch":{"tags":["Accept Request"],"summary":"Accept and Upload Video Request","operationId":"AcceptVideoRequest","description":"Calling this endpoint reserves the estimated credits and returns signed URL(s) for **multi-part upload**.\n\n### Video uploads\nThe Video API uses multi-part upload to receive the video file for processing. You can use a simple byte-division function to create segments for the API to receive.\n\nFor example, if you have a 900MB video file and the system returns 3 upload URLs. You would then:\n\n- Upload bytes 0-300,000,000 via HTTP PUT to `urls[0]`\n- Upload bytes 300,000,001-600,000,000 via HTTP PUT to `urls[1]`\n- Upload bytes 600,000,001-900,000,000 via HTTP PUT to `urls[2]`\n\nIf one of the uploads fail, you may reuse the same URL to retry - the action overwrites any partially uploaded data.\n\nA successful response from the PUT request returns an `ETag` value in the header for each segment. Retain the part number and ETag pair for the next step (PATCH /video/{requestId}/complete-upload/).\n\n## Response body\n\n| **Property**  | **Type**   | **Description**                                     |\n|---------------|------------|-----------------------------------------------------|\n| **uploadId**  | String     | Upload ID for multi-part upload                     |\n| **urls**      | Array      | URLs for multi-part uploads                         |\n","parameters":[{"in":"path","name":"requestId","schema":{"type":"string","format":"uuid"},"required":true}],"responses":{"202":{"description":"Successful response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PaymentRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"500":{"$ref":"#/components/responses/InternalServerError"},"503":{"$ref":"#/components/responses/ServiceUnavailable"}}}}}}
```


---

# 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/accept-request.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.
