Scale AI Tasks API

The Tasks API from Scale AI — 5 operation(s) for tasks.

OpenAPI Specification

scale-ai-tasks-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Scale AI REST Batches Tasks API
  description: 'The Scale REST API is the unified programmatic surface for Scale''s data

    engine. It is resource-oriented with JSON responses, supports live and

    sandbox modes via API key, and is versioned at v1. This OpenAPI is an

    API Evangelist research artifact covering core resources — tasks, batches,

    and projects — based on the public reference at api-reference.scale.com.

    '
  version: 1.0.0
  contact:
    name: API Evangelist
    url: https://apievangelist.com
servers:
- url: https://api.scale.com/v1
  description: Scale REST API (v1)
security:
- BasicAuth: []
tags:
- name: Tasks
paths:
  /task:
    post:
      summary: Create a task
      operationId: createTask
      tags:
      - Tasks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                project:
                  type: string
                instruction:
                  type: string
                attachment:
                  type: string
      responses:
        '200':
          description: Task created.
  /task/{task_id}:
    parameters:
    - name: task_id
      in: path
      required: true
      schema:
        type: string
    get:
      summary: Retrieve a task
      operationId: retrieveTask
      tags:
      - Tasks
      responses:
        '200':
          description: A task.
  /tasks:
    get:
      summary: Retrieve multiple tasks
      operationId: listTasks
      tags:
      - Tasks
      parameters:
      - name: project
        in: query
        schema:
          type: string
      - name: batch
        in: query
        schema:
          type: string
      - name: status
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Tasks page.
  /task/{task_id}/cancel:
    post:
      summary: Cancel a task
      operationId: cancelTask
      tags:
      - Tasks
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Task canceled.
  /task/{task_id}/setMetadata:
    post:
      summary: Set task metadata
      operationId: setTaskMetadata
      tags:
      - Tasks
      parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
      responses:
        '200':
          description: Metadata updated.
components:
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: 'HTTP Basic authentication. Use your Scale API key (live or sandbox) as

        the username and leave the password blank.

        '