curl --request POST \
--url https://agents.graphy.dev/api/v0/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceText": "In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.",
"metadata": {
"callId": "req-extract-1",
"locale": "EN_US"
}
}
'import requests
url = "https://agents.graphy.dev/api/v0/extract"
payload = {
"sourceText": "In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.",
"metadata": {
"callId": "req-extract-1",
"locale": "EN_US"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceText: 'In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.',
metadata: {callId: 'req-extract-1', locale: 'EN_US'}
})
};
fetch('https://agents.graphy.dev/api/v0/extract', 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://agents.graphy.dev/api/v0/extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceText' => 'In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.',
'metadata' => [
'callId' => 'req-extract-1',
'locale' => 'EN_US'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agents.graphy.dev/api/v0/extract"
payload := strings.NewReader("{\n \"sourceText\": \"In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.\",\n \"metadata\": {\n \"callId\": \"req-extract-1\",\n \"locale\": \"EN_US\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agents.graphy.dev/api/v0/extract")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceText\": \"In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.\",\n \"metadata\": {\n \"callId\": \"req-extract-1\",\n \"locale\": \"EN_US\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.graphy.dev/api/v0/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceText\": \"In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.\",\n \"metadata\": {\n \"callId\": \"req-extract-1\",\n \"locale\": \"EN_US\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}Extract Agent
Build a chart-ready dataset from unstructured text, images, PDFs, or .xlsx spreadsheets. Provide sourceText, attachments, or both.
The response is a Server-Sent Events (SSE) stream with progress, complete, and error events.
curl --request POST \
--url https://agents.graphy.dev/api/v0/extract \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"sourceText": "In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.",
"metadata": {
"callId": "req-extract-1",
"locale": "EN_US"
}
}
'import requests
url = "https://agents.graphy.dev/api/v0/extract"
payload = {
"sourceText": "In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.",
"metadata": {
"callId": "req-extract-1",
"locale": "EN_US"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sourceText: 'In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.',
metadata: {callId: 'req-extract-1', locale: 'EN_US'}
})
};
fetch('https://agents.graphy.dev/api/v0/extract', 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://agents.graphy.dev/api/v0/extract",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sourceText' => 'In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.',
'metadata' => [
'callId' => 'req-extract-1',
'locale' => 'EN_US'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://agents.graphy.dev/api/v0/extract"
payload := strings.NewReader("{\n \"sourceText\": \"In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.\",\n \"metadata\": {\n \"callId\": \"req-extract-1\",\n \"locale\": \"EN_US\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://agents.graphy.dev/api/v0/extract")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"sourceText\": \"In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.\",\n \"metadata\": {\n \"callId\": \"req-extract-1\",\n \"locale\": \"EN_US\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://agents.graphy.dev/api/v0/extract")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sourceText\": \"In Q3, the Direct channel brought in $1.9M, Partner $0.4M, and Marketplace $1.1M.\",\n \"metadata\": {\n \"callId\": \"req-extract-1\",\n \"locale\": \"EN_US\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}GraphConfig with the extracted data via Server-Sent Events.
Request body
ProvidesourceText, attachments, or both — at least one is required. Each attachment is { kind: "image" | "document" | "spreadsheet", mimeType, dataBase64 }, where dataBase64 is RFC 4648 standard base64 (not a data: URL). Limits: 8 images (2 MB each), 2 PDFs (6 MB each), 2 spreadsheets (6 MB each); 12 attachments and 12 MB combined.
The legacy images array is deprecated — use attachments with kind: "image". images and attachments cannot be combined.
Response
The response is a Server-Sent Events stream. See SSE Format for parsing details.event: progress
data: {"message":"Extracting dataset from source content..."}
event: complete
data: {"config":{...},"response":{"message":"Extraction complete"},"extractMeta":{"confidence":"high","needsUserInput":false,"warnings":[]}}
interface ExtractResponse {
config: GraphConfig;
response: {
message: string;
};
extractMeta: ExtractMeta | null;
lastAccuracyEvaluation?: ExtractAccuracyEvaluation;
}
HTTP Status Codes
| Status | Description |
|---|---|
| 200 | Success (stream begins) |
| 400 | Invalid request body / no source |
| 401 | Invalid or missing API key |
| 429 | Rate limit exceeded |
| 500 | Internal server error |
Authorizations
Your Graphy API key (starts with graphy_). Create one in the Graphy console at https://agents.graphy.dev/console/
Body
Provide sourceText, attachments, or both — at least one is required. images and attachments are mutually exclusive.
Raw text to extract data from
500000Images (max 8), PDFs (max 2), and spreadsheets (max 2). Preferred over images[].
12Show child attributes
Show child attributes
Deprecated — use attachments with kind "image".
8Show child attributes
Show child attributes
Optional tracking information for requests
Show child attributes
Show child attributes
Response
SSE stream with progress and completion events

