Scale AI States API

The States API from Scale AI — 2 operation(s) for states.

Operations 5

POST /states Create Task State #
GET /states List States #
GET /states/{state_id} Get State by State ID #
PUT /states/{state_id} Update Task State #
DELETE /states/{state_id} Delete Task State #

Documentation

Specifications

SDKs

Schemas & Data

📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-response-object-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-chat-completion-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-spans-export-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-response-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-spans-by-span-metrics-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-spans-metrics-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-egp-api-backend-server-api-apps-public-routers-inference-inference-model-models-chat-completion-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-create-chat-completion-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-egp-api-backend-server-utils-model-schemas-completions-chat-completion-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-completion-request-v2-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-execute-agent-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-legacy-evaluation-response-with-views-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-agent-run-schedule-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-register-agent-response-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-update-agent-run-schedule-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-create-agent-run-schedule-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-create-span-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-span-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-research-job-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-job-entity-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-data-source-entity-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-parse-result-entity-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-file-entity-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-sgpvector-store-create-request-base-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-chat-completion-v2-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-completion-v2-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-create-model-endpoint-v1-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-update-model-endpoint-v1-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-create-batch-completions-v2-request-schema.json
📊
JSONSchema
https://artifacts.apis.io/scale-ai/json-schema/scale-ai-create-batch-completions-v1-request-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/scale-ai:scale-ai-states-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

scale-ai-states-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Agentex States API
  version: 0.1.0
tags:
- name: States
paths:
  /states:
    post:
      tags:
      - States
      summary: Create Task State
      operationId: create_task_state_states_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/State'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - States
      summary: List States
      description: List all states, optionally filtered by query parameters.
      operationId: filter_states_states_get
      parameters:
      - name: task_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Task ID
          title: Task Id
        description: Task ID
      - name: agent_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Agent ID
          title: Agent Id
        description: Agent ID
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Limit
          default: 50
          title: Limit
        description: Limit
      - name: page_number
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Page number
          default: 1
          title: Page Number
        description: Page number
      - name: order_by
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Field to order by
          title: Order By
        description: Field to order by
      - name: order_direction
        in: query
        required: false
        schema:
          type: string
          description: Order direction (asc or desc)
          default: desc
          title: Order Direction
        description: Order direction (asc or desc)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/State'
                title: Response Filter States States Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /states/{state_id}:
    get:
      tags:
      - States
      summary: Get State by State ID
      description: Get a state by its unique state ID.
      operationId: get_state_states__state_id__get
      parameters:
      - name: state_id
        in: path
        required: true
        schema:
          type: string
          title: State Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/State'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - States
      summary: Update Task State
      operationId: update_task_state_states__state_id__put
      parameters:
      - name: state_id
        in: path
        required: true
        schema:
          type: string
          title: State Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStateRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/State'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - States
      summary: Delete Task State
      operationId: delete_task_state_states__state_id__delete
      parameters:
      - name: state_id
        in: path
        required: true
        schema:
          type: string
          title: State Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/State'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    State:
      properties:
        task_id:
          type: string
          title: The unique id of the task to send the state to
        agent_id:
          type: string
          title: The unique id of the agent to send the state to
        state:
          additionalProperties: true
          type: object
          title: The state to send to the task.
        id:
          type: string
          title: Id
          description: The task state's unique id
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The timestamp when the state was created
        updated_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated At
          description: The timestamp when the state was last updated
      type: object
      required:
      - task_id
      - agent_id
      - state
      - id
      - created_at
      title: State
      description: 'Represents a state in the agent system. A state is associated uniquely with a task and an agent.


        This entity is used to store states in MongoDB, with each state

        associated with a specific task and agent. The combination of task_id and agent_id is globally unique.


        The state is a dictionary of arbitrary data.'
    CreateStateRequest:
      properties:
        task_id:
          type: string
          title: The unique id of the task to send the state to
        agent_id:
          type: string
          title: The unique id of the agent to send the state to
        state:
          additionalProperties: true
          type: object
          title: The state to send to the task.
      type: object
      required:
      - task_id
      - agent_id
      - state
      title: CreateStateRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    UpdateStateRequest:
      properties:
        state:
          additionalProperties: true
          type: object
          title: The state to update the state with.
      type: object
      required:
      - state
      title: UpdateStateRequest