Get job status
curl --request GET \
--url https://anythingmd.com/api/v1/jobs/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://anythingmd.com/api/v1/jobs/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://anythingmd.com/api/v1/jobs/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://anythingmd.com/api/v1/jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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>"
}{
"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>"
}Jobs
Get job status
Returns the job and moves it forward. Poll every 2 to 5 seconds until status is succeeded, failed or canceled.
GET
/
api
/
v1
/
jobs
/
{jobId}
Get job status
curl --request GET \
--url https://anythingmd.com/api/v1/jobs/{jobId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://anythingmd.com/api/v1/jobs/{jobId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://anythingmd.com/api/v1/jobs/{jobId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://anythingmd.com/api/v1/jobs/{jobId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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>"
}{
"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>"
}Authorizations
Create a key under Settings → API Keys and send it as Authorization: Bearer amd_live_…. See https://docs.anythingmd.com/authentication.
Response
Current job state
ISO-8601 creation time
Pattern:
^(?:(?:\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
Pattern:
^(?:(?:\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))$Stable machine code when status is failed; the full list with retry guidance is at https://docs.anythingmd.com/errors. unprocessable means the converter could not read this file: do not retry the same file. stranded_running means the worker or client disappeared; it is not a conversion failure.