Skip to main content

Datasets

GET/v1/orgs/{org_id}/datasets

List Datasets

List evaluation datasets for an organization.

Runtime, CI or Admin tokenscope: readoperation_id: datasets.list

Authentication

Any bearer token belonging to the org can read this endpoint.

SDK install

pip install znyx-sdknpm install @znyx/sdk

Path parameters

NameTypeRequiredDescription
org_id#pathstringrequired

Query parameters

NameTypeRequiredDescription
category#querystring | nulloptionalSingle category (legacy)
categories#querystring | nulloptionalComma-separated category list for multi-select
source#querystring | nulloptionalznyx_sample | industry_standard | customer
limit#queryintegeroptional
offset#queryintegeroptional

Header parameters

NameTypeRequiredDescription
X-API-Key#headerstring | nulloptional
authorization#headerstring | nulloptional

Responses

StatusDescription
200Successful Response
422Validation Error

Response schema

totalrequiredinteger
limitrequiredinteger
offsetrequiredinteger
datasetsrequired

Errors & what triggers them

CodeTriggerFix
401Missing or expired Authorization header.
403Token does not have org access (wrong org_id, or insufficient role).
404Resource does not exist in this org.

Notes & examples

Dataset sources

Datasets have a source field:

  • customer — ones your team created or imported.
  • znyx_sample — small built-in datasets shipped with every org (jailbreak, PII, toxicity, etc.). Auto-seeded on registration.
  • industry_standard — externally-authored benchmarks (TruthfulQA, BOLD, RealToxicityPrompts, etc.). Installed on demand via the catalog.

Use ?source=znyx_sample to hide the full industry-standard library when filtering inside the Console.

Filtering by category

category (legacy) accepts a single category. categories (new, comma-separated) accepts multiple. Prefer categories for multi-select UIs.

  • GET /v1/orgs/{org_id}/datasets/catalog — browse everything available for install.
  • POST /v1/orgs/{org_id}/datasets/install — install a ZNYX sample or industry benchmark.
  • POST /v1/orgs/{org_id}/datasets — create a custom dataset.

Request

curl -X GET 'https://api.znyx.ai/v1/orgs/00000000-0000-0000-0000-000000000000/datasets' \
  -H 'Authorization: Bearer $ZNYX_TOKEN'

Response

application/json

Successful Response

{
  "total": 0,
  "limit": 0,
  "offset": 0,
  "datasets": [
    {
      "id": "string",
      "name": "string",
      "description": null,
      "category": null,
      "trust_level": "string",
      "source": "string",
      "sample_count": 0,
      "is_public": false,
      "created_by": null,
      "created_at": null,
      "updated_at": null
    }
  ]
}

Schema: object