# Create Testset

Source: https://agenta.ai/docs/reference/api/create-testset

`POST /testsets/`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Create an empty testset artifact.

Only creates the artifact row (name, slug, metadata). No variant or
revision is created; add testcases by committing a revision with
`/testsets/revisions/commit`, or use `/simple/testsets/` to create
a testset with seed rows in a single call.

## Parameters

- `testset_id` (in query, string (uuid))

## Request body schema

Content type: `application/json` (required)

- `testset` (object, required): Testset artifact to create. The call only creates the artifact row; testcases are added by committing a revision (see /testsets/revisions/commit) or by using the /simple/testsets/ surface.
  - `folder_id` (string (uuid), nullable)
  - `flags` (object, nullable)
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `slug` (string, nullable)

## Response schemas

### 200: Successful Response

- `count` (integer): 1 if a testset was returned, 0 otherwise. Default: `0`.
- `testset` (object, nullable): The testset artifact. Does not include testcases.
  - `folder_id` (string (uuid), nullable)
  - `flags` (object, nullable)
  - `tags` (object, nullable)
  - `meta` (object, nullable)
  - `name` (string, nullable)
  - `description` (string, nullable)
  - `created_at` (string (date-time), nullable)
  - `updated_at` (string (date-time), nullable)
  - `deleted_at` (string (date-time), nullable)
  - `created_by_id` (string (uuid), nullable)
  - `updated_by_id` (string (uuid), nullable)
  - `deleted_by_id` (string (uuid), nullable)
  - `slug` (string, nullable)
  - `id` (string (uuid), nullable)

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
