Examples
List training examples with filtering and pagination.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidQuery Parameters
1 <= value11 <= value <= 10020Filter by source: user, synthetic
Filter by reviewed status
Response Body
application/json
application/json
curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/examples"{}Upload user-provided training examples.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Payload for bulk-creating training examples.
Accepts either the canonical {"examples": [...]} envelope or a
bare JSON array [{...}, ...] for convenience. The latter is
silently wrapped before validation.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/examples" \ -H "Content-Type: application/json" \ -d '{ "examples": [ { "input_payload": {} } ] }'[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "input_payload": {}, "expected_decision": "string", "confidence": 0, "reason_codes": [ "string" ], "source": "string", "reviewed": true, "created_at": "2019-08-24T14:15:22Z" }]Generate synthetic training examples using the teacher model.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request to generate synthetic training examples via LLM.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/examples/generate" \ -H "Content-Type: application/json" \ -d '{}'[ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "input_payload": {}, "expected_decision": "string", "confidence": 0, "reason_codes": [ "string" ], "source": "string", "reviewed": true, "created_at": "2019-08-24T14:15:22Z" }]Get a summary of training data distribution without paginating through all examples. Returns counts by source (user/synthetic), by decision option, and totals.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuidResponse Body
application/json
application/json
curl -X GET "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/examples/stats"{ "total": 0, "labelled": 0, "unlabelled": 0, "by_source": { "property1": 0, "property2": 0 }, "by_decision": { "property1": 0, "property2": 0 }, "options": [ "string" ], "max_allowed": 5000}Delete a single training example.
A 64-character hexadecimal Sparkient API key. Create a key in the Sparkient dashboard and send it as Authorization: Bearer YOUR_API_KEY.
In: header
Path Parameters
uuiduuidResponse Body
application/json
curl -X DELETE "https://example.com/api/v1/decision-types/497f6eca-6276-4993-bfeb-53cbbbba6f08/examples/497f6eca-6276-4993-bfeb-53cbbbba6f08"