POST
/
v2
/
task
API_KEY='live_...'
curl --request POST \
--url "https://api.scale.com/v2/task" \
--header "Authorization: Bearer $API_KEY" \
--header "Content-Type: application/json" \
--data '{
"project_name": "My Chat Project",
"template_variables": {
"prompt": "Explain quantum computing",
"context": "For a general audience"
},
"metadata": {
"priority": "high",
"source": "api"
}
}'
{
  "task_id": "task_123",
  "project": "project_123",
  "batch": "batch_123",
  "status": "pending",
  "created_at": "2025-01-01T08:31:03.169Z",
  "threads": []
}

Required parameters

You are expected to provide one of the following:

  • Project ID (project_id)
  • Project Name (project_name)

Template Variables

Template variables are key-value pairs that populate your project’s task template. The available variables depend on your specific project configuration.

Common template variables:

  • prompt - The main instruction or question for the task
  • context - Additional context or background information
  • examples - Sample inputs or outputs to guide the task
  • constraints - Specific requirements or limitations

Authorizations

Authorization
string
header
required

Your API Key is the Bearer token. See the Authentication section to learn how to access your key.

Body

application/json

Response

200
application/json

Chat task created successfully.

The response is of type object.