The SDK uses this API to register sources and deliver batches. You only need it directly if you build your own uploader.
Base path
Every endpoint lives under /api/v1. Requests and responses are JSON, except the batch file upload, which sends gzipped JSON Lines to a separate upload URL.
API keys
Send your organization's API key as a bearer token on every request.
GET /api/v1/me
Authorization: Bearer dy_live_...Create keys in the portal under Settings → API keys. Each key belongs to one organization. We store only a hash of each key, so a key is shown once when you create it. See API keys.
| Prefix | Mode | Effect |
|---|---|---|
dy_live_ |
live |
Batches are reviewed and become billable once accepted. |
dy_test_ |
test |
Everything works the same, but batches never become billable. |
Client header
The SDK identifies itself in an optional X-Datayield-Client header, in the form datayield-sdk/<version> <hostname>. Each batch stores it along with the key that sent it, so the portal can show which machine delivered what. Custom uploaders can send their own value.
GET /api/v1/me
Returns the organization and key that the request authenticated as. Use it to check a key before a run.
curl https://datayield.ai/api/v1/me \
-H "Authorization: Bearer $DATAYIELD_API_KEY"{
"organization": { "id": "...", "name": "Example Ltd" },
"key": { "id": "...", "mode": "live" }
}| Field | Type | Meaning |
|---|---|---|
organization.id |
string | Your organization's ID |
organization.name |
string | Your organization's name |
key.id |
string | The ID of the key used, never the key itself |
key.mode |
string | live or test |
Errors
Failed requests return a JSON error body. See Errors.