Structured output, not free text
Ask for JSON in a schema you define, validate it, then write it. No more parsing prose out of a model.
Extract invoices, triage inbound email, fill forms — all of it ends up as JSON you can write straight into a database or spreadsheet. Runs on Laravel cron, n8n, or Make. Cost per task is measurable, not a flat subscription sitting half idle.
{
"vendor": "PT Sinar Jaya",
"invoice_no": "INV/2026/0912",
"total_idr": 4750000,
"due_date": "2026-12-05"
}
Not hard work, just repeated work: moving numbers from email into a spreadsheet, retyping invoice numbers, entering customer data into forms. Every manual transfer is a fresh typo waiting to surface a month later.
Ask for JSON in a schema you define, validate it, then write it. No more parsing prose out of a model.
It is a plain HTTP call, so it fits a Laravel queue or n8n workflow with the same retry and dead-letter rules as any other job.
One invoice extraction costs about one rupiah. No seat minimum, no monthly fee when the flow is idle.
Everything runs in your systems; DataGo only turns text into data.
Inbound email, a new file in a folder, or a cron schedule. Extract the text (PDF/HTML/email) yourself.
Send the text plus the fields you need. The model fills values; missing fields become null instead of invented data.
Check types and ranges in your code before writing to the database. On failure, retry once with the validation error as context.
Prices come straight from the catalog when the page loads. Estimates assume one short document.
| Model | Role | Input / 1M | Output / 1M | Estimate / request |
|---|---|---|---|---|
deepseek/deepseek-v4-flash |
Cheapest and most consistent for JSON extraction | Rp1.350 | Rp2.250 | Rp1,01 |
glm/glm-5.3-flash |
Fast alternative for classification and email triage | Rp1.575 | Rp4.500 | Rp1,46 |
minimax/minimax-m3.1-flash |
Longer documents with many line items | Rp1.181 | Rp9.450 | Rp2,01 |
Estimates use the token counts shown in the header. Prices update automatically whenever the catalog changes.
Browse all automation modelsThe trick: name the required fields, forbid invention, then validate the result in your own code.
import json, os
from openai import OpenAI
client = OpenAI(
base_url="https://api.datago.id/v1",
api_key=os.environ["DATAGO_API_KEY"],
)
SCHEMA = """Reply with JSON only, in this shape:
{"vendor": str, "invoice_no": str, "total_idr": int, "due_date": "YYYY-MM-DD", "items": [{"name": str, "qty": int, "price_idr": int}]}
If a field is missing in the document, set it to null. Never invent values."""
res = client.chat.completions.create(
model="deepseek/deepseek-v4-flash",
messages=[
{"role": "system", "content": SCHEMA},
{"role": "user", "content": invoice_text},
],
response_format={"type": "json_object"},
temperature=0,
max_tokens=600,
)
data = json.loads(res.choices[0].message.content)
# validate before persisting
assert data["invoice_no"] and isinstance(data["total_idr"], int)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.datago.id/v1",
apiKey: process.env.DATAGO_API_KEY,
});
const SCHEMA = `Reply with JSON only:
{"vendor": string, "invoice_no": string, "total_idr": number, "due_date": "YYYY-MM-DD", "items": [{"name": string, "qty": number, "price_idr": number}]}
If a field is missing in the document, set it to null. Never invent values.`;
const res = await client.chat.completions.create({
model: "deepseek/deepseek-v4-flash",
messages: [
{ role: "system", content: SCHEMA },
{ role: "user", content: invoiceText },
],
response_format: { type: "json_object" },
temperature: 0,
max_tokens: 600,
});
const data = JSON.parse(res.choices[0].message.content);
if (!data.invoice_no || typeof data.total_idr !== "number") {
throw new Error("validation failed: " + JSON.stringify(data));
}
curl https://api.datago.id/v1/chat/completions \
-H "Authorization: Bearer $DATAGO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek/deepseek-v4-flash",
"temperature": 0,
"max_tokens": 600,
"response_format": {"type": "json_object"},
"messages": [
{"role": "system", "content": "Reply with JSON only: {vendor, invoice_no, total_idr, due_date, items[]}. Use null for missing fields, never invent."},
{"role": "user", "content": "INVOICE PT Sinar Jaya INV/2026/0912 total Rp4.750.000 due 5 December 2026"}
]
}'
→ temperature 0 and a tight max_tokens keep cost per task predictable. Validation always lives in your code, never in the prompt.
A short document is roughly 500 input and 150 output tokens. On DeepSeek V4 Flash that is about Rp1,01 per document, so 1,000 documents is roughly Rp1,010. Table prices are pulled live from the catalog, not hardcoded.
Yes. Both support custom HTTP requests, so point them at https://api.datago.id/v1/chat/completions with an Authorization Bearer header.
Validate in your code, then retry once with the validation error as extra context. If it still fails, send it to a dead-letter queue for manual handling — never let it reach the database.
No. Prompts and responses are not stored by DataGo; only token counts for billing.
Pick the single most time-consuming task — invoice extraction or email triage — and measure its weekly cost before expanding.