Skip to main content
POST
/
v1beta
/
tasks
Create a task
curl --request POST \
  --url https://api.indices.io/v1beta/tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "display_name": "<string>",
  "task": "<string>",
  "website": "<string>",
  "creation_params": {
    "is_fully_autonomous": false,
    "auto_generate_schemas": true,
    "initial_input_values": {},
    "secrets": [
      {
        "secret_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "description": "<string>"
      }
    ]
  },
  "input_schema": "<string>",
  "output_schema": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "current_state": "not_ready",
  "display_name": "<string>",
  "task": "<string>",
  "website": "<string>",
  "input_schema": "<string>",
  "output_schema": "<string>",
  "creation": {
    "auto_generate_schemas": true,
    "secrets": [
      {
        "secret_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "description": "<string>"
      }
    ],
    "secret_bindings": {}
  },
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "required_secrets": [
    {
      "name": "<string>",
      "type": "login",
      "requires_totp": false
    }
  ],
  "failure_info": {
    "category": "<string>",
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Enter your API key as the bearer token. Set header: Authorization to Bearer <api_key>

Body

application/json
display_name
string
required

Short title shown in the dashboard. Informational only; not used to generate the task.

task
string
required

Detailed explanation of the task to be performed.

website
string<uri>
required

The website to perform the task on.

Required string length: 1 - 2083
creation_params
CreationParams · object
required

Information used during task creation.

input_schema
string | null

Task input parameters as a JSON schema string. Required when auto_generate_schemas is disabled. Must be omitted when auto_generate_schemas is enabled; remains null until generation completes.

output_schema
string | null

Task output schema as a JSON schema string. Required when auto_generate_schemas is disabled. Must be omitted when auto_generate_schemas is enabled; remains null until generation completes.

Response

Successful response

id
string<uuid>
required

Unique identifier for the object.

current_state
enum<string>
required

Current state of the task, in particular whether it is ready to use.

Available options:
not_ready,
waiting_for_manual_completion,
ready,
failed
display_name
string
required

Short title shown in the dashboard. Informational only.

task
string
required

Detailed explanation of the task to be performed.

website
string<uri>
required

The website to perform the task on.

Required string length: 1 - 2083
input_schema
string | null
required

Task input schema as a JSON schema string. May be null while the task is not ready (e.g. schema generation in progress). Guaranteed non-null when current_state is ready.

output_schema
string | null
required

Task output schema as a JSON schema string. May be null while the task is not ready (e.g. schema generation in progress). Guaranteed non-null when current_state is ready.

creation
TaskCreation · object
required

Parameters set during the creation of this task.

created_at
string<date-time>
required

Timestamp when the object was created.

updated_at
string<date-time>
required

Timestamp when the object was last updated.

required_secrets
SecretSlotDefinition · object[]

List of secrets that must be provided when running this task.

failure_info
TaskFailureInfo · object

Failure information if the task failed, including user-friendly explanation and suggestions