curl --request GET \
--url https://canary.effectiveai.app/api/v2/files/{fileId}/text \
--header 'Authorization: Bearer <token>'import requests
url = "https://canary.effectiveai.app/api/v2/files/{fileId}/text"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://canary.effectiveai.app/api/v2/files/{fileId}/text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://canary.effectiveai.app/api/v2/files/{fileId}/text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://canary.effectiveai.app/api/v2/files/{fileId}/text"
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))
}HttpResponse<String> response = Unirest.get("https://canary.effectiveai.app/api/v2/files/{fileId}/text")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://canary.effectiveai.app/api/v2/files/{fileId}/text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"textRevision": "<string>",
"versionId": "<string>",
"text": "<string>",
"location": {
"startOffsetBytes": 1,
"endOffsetBytes": 1
},
"nextCursor": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}Read a bounded chunk of existing extracted text
Read-only optional representation for persistent files with an existing extraction in versioned storage, including SERFF. Never starts acquisition, OCR, extraction or materialization. Rechecks content access and export policy on every request. Reads at most maxBytes + 128 text bytes from storage; JSON is below 400 KiB including escaping. Source-page mapping is not inferred. A changed revision requires restarting without a cursor.
curl --request GET \
--url https://canary.effectiveai.app/api/v2/files/{fileId}/text \
--header 'Authorization: Bearer <token>'import requests
url = "https://canary.effectiveai.app/api/v2/files/{fileId}/text"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://canary.effectiveai.app/api/v2/files/{fileId}/text', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://canary.effectiveai.app/api/v2/files/{fileId}/text",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://canary.effectiveai.app/api/v2/files/{fileId}/text"
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))
}HttpResponse<String> response = Unirest.get("https://canary.effectiveai.app/api/v2/files/{fileId}/text")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://canary.effectiveai.app/api/v2/files/{fileId}/text")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"fileId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"textRevision": "<string>",
"versionId": "<string>",
"text": "<string>",
"location": {
"startOffsetBytes": 1,
"endOffsetBytes": 1
},
"nextCursor": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}{
"error": "<string>",
"code": "<string>",
"details": [
{
"location": "path",
"path": [
"<string>"
],
"code": "required",
"message": "<string>"
}
],
"requestId": "<string>"
}Authorizations
Effective API key. Send Authorization: Bearer sk-eai-...
Path Parameters
Query Parameters
Maximum UTF-8 bytes of text per response, 4–65536 (default 16384). Character boundaries may shorten a chunk. Repeat unchanged with cursor.
4 <= x <= 65536Opaque nextCursor. Fixed 24-hour lifetime; bound to caller scope, file, maxBytes and text revision.
1 - 128Response
A revision-bound text chunk with byte location and continuation.
Opaque identity of this extracted-text revision, distinct from an original-file version. Changed text invalidates continuation.
68Source file version that produced this extraction, or null when unproven. Currently null; never inferred from the current download.
Existing UTF-8 extracted text, at most maxBytes UTF-8 bytes. Empty available text is a successful terminal response. Page markers, if present, remain in text.
65536Show child attributes
Show child attributes
Continue with the same file and maxBytes, or null at the end. Retry the same request safely; deduplicate by revision and start offset.