Skip to main content
GET
/
api
/
v1
/
create-document
/
{request_id}
Create Document Result Check
import requests

url = "https://www.datalab.to/api/v1/create-document/{request_id}"

headers = {"X-API-Key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
curl --request GET \
--url https://www.datalab.to/api/v1/create-document/{request_id} \
--header 'X-API-Key: <api-key>'
const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};

fetch('https://www.datalab.to/api/v1/create-document/{request_id}', 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://www.datalab.to/api/v1/create-document/{request_id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "status": "<string>",
  "result_url": "<string>",
  "expires_in": 123,
  "success": true,
  "error": "<string>",
  "output_format": "<string>",
  "output_base64": "<string>",
  "runtime": 123,
  "page_count": 123,
  "cost_breakdown": {},
  "versions": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

X-API-Key
string
header
required

Path Parameters

request_id
string
required

Cookies

wos-session
string
datalab_active_team
string

Response

Successful Response

Response model for create document endpoint.

status
string
required

The status of the request. Should be 'complete' when the request is done.

result_url
string | null

Signed URL for downloading the completed result JSON when direct result download is required.

expires_in
integer | null

Number of seconds until result_url expires.

success
boolean | null

Whether the document creation was successful.

error
string | null

Error message if document creation failed.

output_format
string | null

Output format: 'docx'.

output_base64
string | null

Base64-encoded document (DOCX).

runtime
number | null

Processing time in seconds.

page_count
integer | null

Number of pages in the document.

cost_breakdown
Cost Breakdown · object | null

A dictionary of the cost breakdown of this request.

versions

A dictionary of the versions of the libraries used in the request.