API reference
Eleven operations. Each is POST https://api.datagoat.io/v1/<path> over REST and a tool of the same
name over MCP (https://api.datagoat.io/mcp). The full schemas are in
openapi.json, generated from the same definitions the
server validates against. The one call has its own page: The ask call.
| Tool | REST | Does | Cost |
|---|---|---|---|
dg_ask |
/v1/ask |
Answer yesno, score, choice and rank questions about cases, from a record in any shape. The one call. | one decision per answered case; a fit on a new record |
dg_add_dataset |
/v1/add-dataset |
Store a record of any shape (rows, CSV, a URL, or a presigned upload), appending pieces until the first ask | free |
dg_poll |
/v1/poll |
Follow a pending ask to its answer | free |
dg_preflight |
/v1/preflight |
Check a table before the first ask: grain, column values, fitness | free |
dg_report_outcomes |
/v1/report-outcomes |
Record what really happened after you acted | free |
dg_drift |
/v1/drift |
Compare a refit with the fit before it: keep, refit or abandon | free |
dg_verify |
/v1/verify |
Check a Verdict is genuine. Needs no key. | free |
dg_describe |
/v1/describe |
Question types, shapes, limits, prices, retention, and the sample records. Needs no key. | free |
dg_delete_dataset |
/v1/delete-dataset |
Delete a stored dataset now | free |
dg_attest |
/v1/attest |
Record that a case was acted on through a lever; the engine judges compliance | free |
dg_evidence |
/v1/evidence |
Did acting work? Outcomes of cases acted on vs not | free |
POST /v1/agents/register with no credential returns a free test key for the samples.
Conventions
- Auth:
Authorization: Bearer dgk_live_…(ordgk_test_…, or an OAuth token). - Idempotency: send
idempotency_keyondg_ask. A retry with the same key within 24 hours returns the first answer and never fits or bills twice; the same key with a different body is a - Pending: a first fit on a large record answers
202with{"status": "pending", "task_id"}. Polldg_poll; do not re-send the ask. - Errors: RFC 9457 problems,
application/problem+json, withcode,remedy,fieldandrequest_id. A refusal is not an error: it is an answer withstate: "refused". - Determinism: the same record bytes and the same question give the same answer. Change one byte and the next ask fits again.
- Retention: inline data is deleted when the call ends; stored datasets 24 hours after last use; answers after 24 hours. See Your data.
- MCP tool hints:
dg_ask,dg_poll,dg_preflight,dg_drift,dg_evidence,dg_verifyanddg_describeare read-only;dg_add_dataset,dg_report_outcomesanddg_attestwrite;dg_delete_datasetis destructive.dg_askanddg_add_datasetare open-world because they can download afetch_url. - Response size: an answer carries every case you asked about (up to 10,000) and every
ranked case (up to
top_k, at most 1,000). Over MCP, ask about the cases the conversation needs; bulk scoring belongs on REST.