Get the result
curl --request GET \
--url https://api.relettr.com/v1/chapters/{chapter_id}/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.relettr.com/v1/chapters/{chapter_id}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.relettr.com/v1/chapters/{chapter_id}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "chapter_result",
"chapter_id": "<string>",
"version": 123,
"expires_at": "2023-11-07T05:31:56Z",
"layout": "original",
"format": "png",
"pages": [
{
"index": 123,
"width": 123,
"height": 123,
"bytes": 123,
"sha256": "<string>",
"url": "<string>"
}
],
"strip": [
{
"index": 123,
"height": 123,
"url": "<string>"
}
],
"zip": {
"bytes": 123,
"url": "<string>"
},
"regions_json": {
"url": "<string>"
},
"warnings": [
{
"code": "missing_glyphs",
"page": 123,
"region_ids": [
"<string>"
]
}
],
"glossary_proposals": [
{
"source": "<string>",
"target": "<string>",
"type": "name",
"gender": "f",
"since_chapter": 2,
"note": "<string>"
}
]
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}Chapters
Get the result
Returns signed download URLs, valid for 1 hour. Call again for fresh URLs. Downloads are not metered.
Returns 409 chapter_not_ready before the first success, and
409 chapter_locked while the chapter is in needs_review with open
zones.
GET
/
chapters
/
{chapter_id}
/
result
Get the result
curl --request GET \
--url https://api.relettr.com/v1/chapters/{chapter_id}/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.relettr.com/v1/chapters/{chapter_id}/result"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.relettr.com/v1/chapters/{chapter_id}/result', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "chapter_result",
"chapter_id": "<string>",
"version": 123,
"expires_at": "2023-11-07T05:31:56Z",
"layout": "original",
"format": "png",
"pages": [
{
"index": 123,
"width": 123,
"height": 123,
"bytes": 123,
"sha256": "<string>",
"url": "<string>"
}
],
"strip": [
{
"index": 123,
"height": 123,
"url": "<string>"
}
],
"zip": {
"bytes": 123,
"url": "<string>"
},
"regions_json": {
"url": "<string>"
},
"warnings": [
{
"code": "missing_glyphs",
"page": 123,
"region_ids": [
"<string>"
]
}
],
"glossary_proposals": [
{
"source": "<string>",
"target": "<string>",
"type": "name",
"gender": "f",
"since_chapter": 2,
"note": "<string>"
}
]
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}{
"error": {
"type": "invalid_request",
"code": "parameter_invalid",
"message": "<string>",
"request_id": "<string>",
"param": "files[3].content_type",
"doc_url": "<string>"
}
}Authorizations
Response
The result.