curl --request POST \
--url https://anythingmd.com/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operation": "convert",
"capabilityVersion": "1",
"source": {
"type": "document",
"documentId": "<string>"
},
"includeImages": false,
"force_refresh": true,
"forceRefresh": true,
"allowPartial": true,
"startPage": 50000,
"content_hash": "<string>",
"contentHash": "<string>",
"idempotencyKey": "<string>",
"webhookUrl": "<string>"
}
'import requests
url = "https://anythingmd.com/api/v1/jobs"
payload = {
"operation": "convert",
"capabilityVersion": "1",
"source": {
"type": "document",
"documentId": "<string>"
},
"includeImages": False,
"force_refresh": True,
"forceRefresh": True,
"allowPartial": True,
"startPage": 50000,
"content_hash": "<string>",
"contentHash": "<string>",
"idempotencyKey": "<string>",
"webhookUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operation: 'convert',
capabilityVersion: '1',
source: {type: 'document', documentId: '<string>'},
includeImages: false,
force_refresh: true,
forceRefresh: true,
allowPartial: true,
startPage: 50000,
content_hash: '<string>',
contentHash: '<string>',
idempotencyKey: '<string>',
webhookUrl: '<string>'
})
};
fetch('https://anythingmd.com/api/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://anythingmd.com/api/v1/jobs"
payload := strings.NewReader("{\n \"operation\": \"convert\",\n \"capabilityVersion\": \"1\",\n \"source\": {\n \"type\": \"document\",\n \"documentId\": \"<string>\"\n },\n \"includeImages\": false,\n \"force_refresh\": true,\n \"forceRefresh\": true,\n \"allowPartial\": true,\n \"startPage\": 50000,\n \"content_hash\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"operation": "convert",
"capabilityVersion": "<string>",
"status": "queued",
"source": {
"type": "document",
"documentId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fileSource": "managed",
"includeImages": true,
"cached": true,
"pageRange": {
"start": 4503599627370496,
"end": 4503599627370496
},
"partial": true,
"nextStartPage": 4503599627370496,
"estimatedTotalPages": 0,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"errorCode": "<string>",
"idempotencyKey": "<string>",
"usage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"stage": "preparing",
"stageProgress": 50,
"message": "<string>"
}{
"id": "<string>",
"operation": "convert",
"capabilityVersion": "<string>",
"status": "queued",
"source": {
"type": "document",
"documentId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fileSource": "managed",
"includeImages": true,
"cached": true,
"pageRange": {
"start": 4503599627370496,
"end": 4503599627370496
},
"partial": true,
"nextStartPage": 4503599627370496,
"estimatedTotalPages": 0,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"errorCode": "<string>",
"idempotencyKey": "<string>",
"usage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"stage": "preparing",
"stageProgress": 50,
"message": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>",
"quote": {
"id": "<string>",
"operation": "convert",
"capabilityVersion": "<string>",
"estimatedUsage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"estimatedCredits": 1,
"maximumCredits": 1,
"priceVersion": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"topUpPath": "<string>",
"requiredCredits": 1,
"availableCredits": 1
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "document_too_large",
"maxPages": 123,
"estimatedPages": 123,
"jobId": "<string>"
}Create a conversion job
Starts an asynchronous conversion. Credits for the estimated pages are reserved now and settled on the pages actually converted. Send an Idempotency-Key so a retry returns the same job instead of starting a second one. Returns 402 when the workspace does not have enough credits, and 413 when the document is over the page limit.
curl --request POST \
--url https://anythingmd.com/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"operation": "convert",
"capabilityVersion": "1",
"source": {
"type": "document",
"documentId": "<string>"
},
"includeImages": false,
"force_refresh": true,
"forceRefresh": true,
"allowPartial": true,
"startPage": 50000,
"content_hash": "<string>",
"contentHash": "<string>",
"idempotencyKey": "<string>",
"webhookUrl": "<string>"
}
'import requests
url = "https://anythingmd.com/api/v1/jobs"
payload = {
"operation": "convert",
"capabilityVersion": "1",
"source": {
"type": "document",
"documentId": "<string>"
},
"includeImages": False,
"force_refresh": True,
"forceRefresh": True,
"allowPartial": True,
"startPage": 50000,
"content_hash": "<string>",
"contentHash": "<string>",
"idempotencyKey": "<string>",
"webhookUrl": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
operation: 'convert',
capabilityVersion: '1',
source: {type: 'document', documentId: '<string>'},
includeImages: false,
force_refresh: true,
forceRefresh: true,
allowPartial: true,
startPage: 50000,
content_hash: '<string>',
contentHash: '<string>',
idempotencyKey: '<string>',
webhookUrl: '<string>'
})
};
fetch('https://anythingmd.com/api/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://anythingmd.com/api/v1/jobs"
payload := strings.NewReader("{\n \"operation\": \"convert\",\n \"capabilityVersion\": \"1\",\n \"source\": {\n \"type\": \"document\",\n \"documentId\": \"<string>\"\n },\n \"includeImages\": false,\n \"force_refresh\": true,\n \"forceRefresh\": true,\n \"allowPartial\": true,\n \"startPage\": 50000,\n \"content_hash\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"idempotencyKey\": \"<string>\",\n \"webhookUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"id": "<string>",
"operation": "convert",
"capabilityVersion": "<string>",
"status": "queued",
"source": {
"type": "document",
"documentId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fileSource": "managed",
"includeImages": true,
"cached": true,
"pageRange": {
"start": 4503599627370496,
"end": 4503599627370496
},
"partial": true,
"nextStartPage": 4503599627370496,
"estimatedTotalPages": 0,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"errorCode": "<string>",
"idempotencyKey": "<string>",
"usage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"stage": "preparing",
"stageProgress": 50,
"message": "<string>"
}{
"id": "<string>",
"operation": "convert",
"capabilityVersion": "<string>",
"status": "queued",
"source": {
"type": "document",
"documentId": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"fileSource": "managed",
"includeImages": true,
"cached": true,
"pageRange": {
"start": 4503599627370496,
"end": 4503599627370496
},
"partial": true,
"nextStartPage": 4503599627370496,
"estimatedTotalPages": 0,
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"error": "<string>",
"errorCode": "<string>",
"idempotencyKey": "<string>",
"usage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"stage": "preparing",
"stageProgress": 50,
"message": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>",
"quote": {
"id": "<string>",
"operation": "convert",
"capabilityVersion": "<string>",
"estimatedUsage": {
"inputBytes": 4503599627370495,
"discoveredPages": 4503599627370495,
"ocrPages": 4503599627370495,
"outputBytes": 4503599627370495,
"durationMs": 4503599627370495
},
"estimatedCredits": 1,
"maximumCredits": 1,
"priceVersion": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
},
"topUpPath": "<string>",
"requiredCredits": 1,
"availableCredits": 1
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "document_too_large",
"maxPages": 123,
"estimatedPages": 123,
"jobId": "<string>"
}Authorizations
Create a key under Settings → API Keys and send it as Authorization: Bearer amd_live_…. See https://docs.anythingmd.com/authentication.
Headers
If reused within the retention window, replay the original result instead of a second mutation
1Body
Work to perform
convert Capability version to invoke; defaults to 1
1Where the input document comes from
- Option 1
- Option 2
Show child attributes
Show child attributes
If true, save image artifacts with download URLs; if false, skip image bodies
If true, bypass document cache and perform a full conversion
Alias for force_refresh
If true and the workspace cannot pay for the whole document, convert as many pages as its credits cover instead of returning 402. The job reports partial: true and nextStartPage.
First page to convert (1-based). Use nextStartPage from a partial job to convert the rest.
1 <= x <= 100000Optional SHA-256 payload checksum (e.g. sha256:)
1Alias for content_hash
1If the same key is reused within the idempotency window, return the original job instead of creating a duplicate
1Optional callback URL when the job reaches a terminal status (future; polling remains required)
Response
Existing job returned for a replayed idempotency key
Id of an async job
1convert Pinned version of this capability. Quotes, receipts, rate cards, and Skills key off operation + version.
1queued, running, input_required, succeeded, failed, canceled, expired - Option 1
- Option 2
Show child attributes
Show child attributes
ISO-8601 creation time
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ISO-8601 last status change
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$managed, external True when results were returned from content-hash cache
Pages this job converted (1-based, inclusive), when known
Show child attributes
Show child attributes
True when the job stopped at the pages its credits covered; convert the rest with startPage = nextStartPage
Present on partial jobs: the first page not yet converted
2 <= x <= 9007199254740991Page count read from the file before converting, when it could be read
-9007199254740991 <= x <= 9007199254740991^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Present when status is failed
Stable machine code when status is failed. stranded_running means the worker or client disappeared; it is not a conversion failure.
Natural usage units for this job; never credits or currency
Show child attributes
Show child attributes
Fine-grained phase within the current status
preparing, converting, finalizing, complete, error 0–100 progress within the current stage
0 <= x <= 100Human-readable status for display