For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordPlatform
DocumentationIntegrationsAPI referenceSDKsChangelog
DocumentationIntegrationsAPI referenceSDKsChangelog
  • API Reference
      • POSTCreate a dataset
      • POSTList datasets
      • GETRetrieve a dataset
      • PATCHUpdate a dataset
      • DELDelete a dataset
      • POSTCreate a dataset log
      • POSTList dataset logs
      • GETRetrieve a dataset log
      • PATCHUpdate a dataset log
      • DELDelete a dataset log
      • POSTBulk create dataset logs
      • POSTRun evaluators on a dataset
      • GETList dataset evaluation runs
      • PUTReplace a dataset log
      • POSTImport existing logs into a dataset
      • DELRemove logs from a dataset
      • GETGet dataset logs summary
      • POSTGet filtered dataset logs summary
  • Reference
    • Filters API Reference
LogoLogo
DiscordPlatform
API ReferenceDatasets

Create a dataset

POST
https://api.respan.ai/api/datasets/
POST
/api/datasets/
$curl -X POST https://api.respan.ai/api/datasets/ \
> -H "Authorization: Bearer sk_live_xxxxx" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Support Conversations - July",
> "description": "Sampled support chats for July",
> "sampling": 40,
> "start_time": "2025-07-01T00:00:00Z",
> "end_time": "2025-07-31T23:59:59Z",
> "initial_log_filters": {
> "status_code": {
> "operator": "eq",
> "value": 200
> }
> }
>}'
1{
2 "id": "6d0b2c7e-3a6a-4c09-9c7e-1f2d9e2d3f0a",
3 "name": "Custom Workflow Logs",
4 "description": "Manually curated logs for workflow analysis",
5 "type": "sampling",
6 "status": "ready",
7 "initial_log_filters": {},
8 "created_at": "2025-12-09T10:00:00Z",
9 "updated_at": "2025-12-09T10:00:00Z"
10}
Create a new dataset from existing logs, create an empty dataset, or duplicate an existing dataset.
Was this page helpful?
Previous

List datasets

Next
Built with

Headers

AuthorizationstringRequired

Bearer token. Use Bearer YOUR_API_KEY.

Request

This endpoint expects an object.
namestringOptional

Dataset name. Required unless source_dataset_id is provided.

descriptionstringOptional
Dataset description.
samplingintegerOptionalDefaults to 100

Percent of matching logs to add (1-100).

start_timedatetimeOptional
Start of the time range to sample logs from.
end_timedatetimeOptional
End of the time range to sample logs from.
is_emptybooleanOptionalDefaults to false
Create an empty dataset without importing logs.
initial_log_filtersmap from strings to objectsOptional

Platform-standard filters keyed by field name.

source_dataset_idstringOptional
Existing dataset ID to duplicate. Copies logs asynchronously.

Response

Dataset created.
idstring
namestring
descriptionstring
typestring
statusenum
Allowed values:
initial_log_filtersmap from strings to objects

Platform-standard filters keyed by field name.

created_atdatetime
updated_atdatetime

Errors

401
Unauthorized Error
404
Not Found Error