POST
/
beta
/
tasks
/
runs
curl --request POST \
  --url https://api.parallel.ai/beta/tasks/runs \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "task_spec": {
    "output_schema": {
      "json_schema": {
        "additionalProperties": false,
        "properties": {
          "gdp": {
            "description": "GDP in USD for the year, formatted like '\''$3.1 trillion (2023)'\''",
            "type": "string"
          }
        },
        "required": [
          "gdp"
        ],
        "type": "object"
      },
      "type": "json"
    },
    "input_schema": {
      "json_schema": {
        "additionalProperties": false,
        "properties": {
          "gdp": {
            "description": "GDP in USD for the year, formatted like '\''$3.1 trillion (2023)'\''",
            "type": "string"
          }
        },
        "required": [
          "gdp"
        ],
        "type": "object"
      },
      "type": "json"
    }
  },
  "input": "France (2023)",
  "processor": "<string>",
  "metadata": {},
  "source_policy": {
    "domain_policy": {
      "allow_other_domains": true,
      "domains": [
        {
          "domain": "<string>",
          "action": "prefer"
        }
      ]
    }
  }
}'
{
  "run_id": "trun_9907962f83aa4d9d98fd7f4bf745d654",
  "status": "queued",
  "is_active": true,
  "processor": "core",
  "metadata": {
    "my_key": "my_value"
  },
  "created_at": "2025-04-23T20:21:48.037943Z",
  "modified_at": "2025-04-23T20:21:48.037943Z"
}

Authorizations

x-api-key
string
header
required

Body

application/json

Beta task run input with additional features like source policy.

Response

202
application/json

Successful Response

Status of a task run.