curl --request GET \
--url https://api.replicas.dev/v1/replica/{id}/canvas/{filename} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/replica/{id}/canvas/{filename}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/replica/{id}/canvas/{filename}', 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://api.replicas.dev/v1/replica/{id}/canvas/{filename}",
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://api.replicas.dev/v1/replica/{id}/canvas/{filename}"
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://api.replicas.dev/v1/replica/{id}/canvas/{filename}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/replica/{id}/canvas/{filename}")
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{
"filename": "reports/q3/summary.md",
"kind": "markdown",
"sizeBytes": 123,
"mimeType": "<string>",
"content": "<string>",
"base64": "<string>",
"tooLarge": true,
"revision": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Get Canvas Item
Reads a single Canvas item by its Canvas-relative path, including nested paths. Text kinds (markdown, mermaid, html, text) return UTF-8 text in content. Binary kinds (image, pdf, video, audio, other) return base64 in base64. Items over the 5 MB preview cap return tooLarge: true with neither payload; callers should reach for replicas media upload for those.
curl --request GET \
--url https://api.replicas.dev/v1/replica/{id}/canvas/{filename} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.replicas.dev/v1/replica/{id}/canvas/{filename}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.replicas.dev/v1/replica/{id}/canvas/{filename}', 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://api.replicas.dev/v1/replica/{id}/canvas/{filename}",
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://api.replicas.dev/v1/replica/{id}/canvas/{filename}"
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://api.replicas.dev/v1/replica/{id}/canvas/{filename}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.replicas.dev/v1/replica/{id}/canvas/{filename}")
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{
"filename": "reports/q3/summary.md",
"kind": "markdown",
"sizeBytes": 123,
"mimeType": "<string>",
"content": "<string>",
"base64": "<string>",
"tooLarge": true,
"revision": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}{
"error": "<string>",
"details": "<string>",
"code": "<string>"
}Authorizations
API key authentication. Obtain your API key from the Replicas dashboard under Organization → Settings → API Keys.
Path Parameters
The unique identifier of the replica
The Canvas-relative file path, including extension (e.g. reports/q3/summary.md). Encode / as %2F in the request URL.
"reports/q3/summary.md"
Response
Successful response
A single Canvas item's content. Text kinds populate content; binary kinds populate base64. Items over the 5 MB preview cap return tooLarge: true with neither payload populated.
The Canvas-relative file path, including nested folders.
"reports/q3/summary.md"
The kind of Canvas item, inferred from its file extension.
markdown, mermaid, html, text, image, pdf, video, audio, other MIME type to render the content with (e.g. text/markdown; charset=utf-8, image/png).
UTF-8 text for markdown / mermaid / html / text kinds.
Base64 payload for image / pdf / video / audio / other kinds.
Present and true when the file exceeded the engine's preview size cap.
SHA-256 revision to pass as expectedRevision when saving editable text.
^[a-f0-9]{64}$