For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
GuidesIntegrationsAPI ReferencesRelease notes
GuidesIntegrationsAPI ReferencesRelease notes
    • APIs overview
  • Upload API
    • Errors
  • REST API
    • Authentication
    • File Metadata
    • Add Ons
      • GETDocument info
      • POSTConvert document
      • GETDocument conversion job status
      • POSTConvert video
      • GETVideo conversion job status
    • Changelog
    • Versioning
  • URL API
    • File Information
    • File Names
    • File groups
    • Image processing limitations
    • Image compression
    • Image resize and crop
    • Image rotation
    • Image overlays
    • Image colors
    • Image definition
    • Image recognition
    • Other image operations
    • Proxy
    • Signed URLs
    • CDN settings
    • Integrations
Dashboard
LogoLogo
REST APIConversion

Convert document

POST
https://api.uploadcare.com/convert/document/
POST
/convert/document/
$curl -X POST https://api.uploadcare.com/convert/document/ \
> -H "Accept: application/vnd.uploadcare-v0.7+json" \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "paths": [
> "https://cdn.uploadcare.com/5ffa2545-ea40-4e71-a9e4-3a8e49b7b737/document/-/format/jpg/-/page/1/",
> "18574696-50b5-4d6a-84c2-48ffc3de1d40/document/-/format/jpg/-/dpi/150/",
> "18574696-50b5-4d6a-84c2-48ffc3de1d40/document/-/format/jpg/-/quality/80/",
> "18574696-50b5-4d6a-84c2-48ffc3de1d40/document/-/format/jpg/-/dpi/200/-/quality/90/",
> "88a51210-bd69-4411-bc72-a9952d9512cd/document/-/format/pdf/",
> "8ddbbb48-0927-4df7-afac-c6031668b01b/document/"
> ],
> "store": "0",
> "save_in_group": "1"
>}'
1{
2 "problems": {
3 "8ddbbb48-0927-4df7-afac-c6031668b01b": "Bad path \"8ddbbb48-0927-4df7-afac-c6031668b01b\". Use UUID or CDN URL"
4 },
5 "result": [
6 {
7 "original_source": "https://cdn.uploadcare.com/5ffa2545-ea40-4e71-a9e4-3a8e49b7b737/document/-/format/jpg/-/page/1/",
8 "uuid": "d52d7136-a2e5-4338-9f45-affbf83b857d",
9 "token": 445630631
10 },
11 {
12 "original_source": "88a51210-bd69-4411-bc72-a9952d9512cd/document/-/format/pdf/",
13 "uuid": "28843a09-dd3d-4b8a-ad4f-8aa5f8f60ff2",
14 "token": 445630637
15 }
16 ]
17}
Uploadcare allows you to convert files to different target formats. Check out the [conversion capabilities](https://uploadcare.com/docs/transformations/file-conversion/#document-file-formats) for each supported format.
Was this page helpful?
Previous

Document conversion job status

Next
Built with

Uploadcare allows you to convert files to different target formats. Check out the conversion capabilities for each supported format.

Authentication

Authorizationstring
Every request made to `https://api.uploadcare.com/` MUST be signed. HTTPS SHOULD be used with any authorization scheme. Requests MUST contain the `Authorization` header defining `auth-scheme` and `auth-param`: `Authorization: auth-scheme auth-param`. Every request MUST contain the `Accept` header identifying the REST API version: `Accept: application/vnd.uploadcare-v0.7+json`. There are two available authorization schemes: * For production: `Uploadcare`, a scheme where a `signature`, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend. * For quick tests: `Uploadcare.Simple`, a simple scheme where your [Secret API Key](https://app.uploadcare.com/projects/-/api-keys/) MUST be specified in every request's `auth-param`.

Headers

AcceptstringRequired
Version header.

Request

This endpoint expects an object.
pathslist of stringsOptional

An array of UUIDs of your source documents to convert together with the specified target format (see documentation).

storeenumOptional

When store is set to "0", the converted files will only be available for 24 hours. "1" makes converted files available permanently. If the parameter is omitted, it checks the Auto file storing setting of your Uploadcare project identified by the public_key provided in the auth-param.

Allowed values:
save_in_groupenumOptionalDefaults to 0

When save_in_group is set to "1", multi-page documents additionally will be saved as a file group.

Allowed values:

Response

Success.
problemsmap from strings to strings

Dictionary of problems related to your processing job, if any. A key is the path you requested.

resultlist of objects
Result for each requested path, in case of no errors for that path.

Errors

400
Bad Request Error
401
Unauthorized Error
406
Not Acceptable Error

Every request made to https://api.uploadcare.com/ MUST be signed. HTTPS SHOULD be used with any authorization scheme.

Requests MUST contain the Authorization header defining auth-scheme and auth-param: Authorization: auth-scheme auth-param.

Every request MUST contain the Accept header identifying the REST API version: Accept: application/vnd.uploadcare-v0.7+json.

There are two available authorization schemes:

  • For production: Uploadcare, a scheme where a signature, not your Secret API Key MUST be specified. Signatures SHOULD be generated on backend.
  • For quick tests: Uploadcare.Simple, a simple scheme where your Secret API Key MUST be specified in every request’s auth-param.