Skip to main content
POST
/
v1beta
/
tasks
JavaScript
import Indices from 'indicesio';

const client = new Indices({
  apiKey: process.env['INDICES_API_KEY'], // This is the default and can be omitted
});

const task = await client.tasks.create({
  creation_params: {},
  display_name: 'display_name',
  task: 'task',
  website: 'https://example.com',
});

console.log(task.id);
{
  "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>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.indices.io/llms.txt

Use this file to discover all available pages before exploring further.

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