Skip to main content
POST
/
v1
/
repo
/
{repo_name}
/
targets
/
batch
Batch Create Targets
curl --request POST \
  --url http://localhost:8080/v1/repo/{repo_name}/targets/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "targets": [
    {
      "overrides": {
        "temperature": 0.8,
        "u": "my_unconditioned_prompt"
      },
      "target_name": "target_alpha",
      "template": "default"
    },
    {
      "overrides": {
        "v": "my_conditioned_prompt"
      },
      "target_name": "target_beta",
      "template": "target_alpha"
    }
  ]
}
'
{
  "created": [
    "target_alpha",
    "target_beta"
  ],
  "failed": {
    "target_delta": "Template 'nonexistent' not found",
    "target_gamma": "Missing required stim fields: ['teacher_prompt', 'student_prompt']"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-User-Id
string | null

User ID override via header (requires master API key)

Path Parameters

repo_name
string
required

Query Parameters

user_id
string | null

User ID override (requires master API key)

Body

application/json

Batch target creation

targets
TargetConfigWithName · object[]
required

List of targets to create/update

Response

Successful Response

Batch target response model

created
string[]
required

List of successfully created items

failed
Failed · object
required

Dictionary of failed items with error messages