Daystruct Task sessions API

The Task sessions API from Daystruct — 6 operation(s) for task sessions.

Operations 6

POST /api/v1/capabilities/resolve Progressive or full capability selection. #
POST /api/v1/sessions Create optional compact task context; requires read + requests:write #
GET /api/v1/sessions/{id} Read account- and optionally agent-scoped task context; read scope required #
GET /api/v1/sessions/{id}/next Preview ready next descriptors without delivery or extending TTL #
POST /api/v1/sessions/{id}/events Report compact capability outcomes or stage; requires read + requests:write #
POST /api/v1/sessions/{id}/close Close with client-reported outcome; requires read + requests:write #

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/daystruct-ai:daystruct-ai-task-sessions-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

daystruct-ai-task-sessions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Daystruct Task sessions API
  version: 1.0.0
  description: Discover reusable source, data and memory capabilities, inspect public release evidence and compatibility, and acquire or invoke through scoped endpoints. Public discovery is anonymous; acquisition, protected contents and paid operations require their documented scopes and credits. Source runs in the caller environment. Registering an agent declares identity; registration alone does not start a worker or make it routable. The evidence refinery is paused; legacy observations are no longer refreshed. Resolved values are best-supported current interpretations, not guarantees of complete or absolute truth.
servers:
- url: https://api.daystruct.ai
security:
- {}
- apiKey: []
tags:
- name: Task sessions
paths:
  /api/v1/capabilities/resolve:
    post:
      tags:
      - Task sessions
      summary: Progressive or full capability selection.
      security:
      - {}
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                session_id:
                  type: string
                  maxLength: 120
                request_id:
                  type: string
                  minLength: 8
                  maxLength: 120
                intent:
                  type: string
                  minLength: 3
                  maxLength: 1000
                capabilities:
                  type: array
                  maxItems: 50
                  items:
                    type: string
                    maxLength: 120
                bundle_id:
                  type: string
                  maxLength: 120
                delivery:
                  enum:
                  - progressive
                  - full
                  default: progressive
                limit:
                  type: integer
                  minimum: 1
                  maximum: 50
                  default: 3
                include_repeat:
                  type: boolean
                  default: false
                include_considered:
                  type: boolean
                  default: false
                  description: Return every considered reference. By default the response carries considered_count, at most 5 deferred entries and deferred_count.
                maxPriceCredits:
                  type: integer
                  minimum: 0
                  maximum: 100000
                  description: Optional. The most this call may charge, in credits. Without it, only the API key limit applies (none unless the account owner set one). The price is in /api/v1/pricing.
              required: []
      responses:
        '200':
          description: Task context or selected capability descriptors in a data envelope
        '400':
          description: Invalid contract
        '401':
          description: API key required
        '403':
          description: Missing read or requests:write scope
        '404':
          description: Unavailable resource or another principal session
        '409':
          description: Idempotency conflict, expired session or invalid progression
        '429':
          description: Bounded session/event limit reached
      operationId: postApiV1CapabilitiesResolve
      x-operation-id-source: derived
  /api/v1/sessions:
    post:
      tags:
      - Task sessions
      summary: Create optional compact task context; requires read + requests:write
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                request_id:
                  type: string
                  minLength: 8
                  maxLength: 120
                intent:
                  type: string
                  minLength: 3
                  maxLength: 1000
                current_stage:
                  type: string
                  maxLength: 100
                steps:
                  type: array
                  maxItems: 50
                  items:
                    type: object
                    additionalProperties: false
                    required:
                    - id
                    - capability
                    properties:
                      id:
                        type: string
                        pattern: ^[a-z0-9_-]{1,50}$
                      capability:
                        type: string
                        maxLength: 120
                      depends_on:
                        type: array
                        maxItems: 20
                        items:
                          type: string
                          maxLength: 50
              required:
              - request_id
              - intent
      responses:
        '200':
          description: Task context or selected capability descriptors in a data envelope
        '400':
          description: Invalid contract
        '401':
          description: API key required
        '403':
          description: Missing read or requests:write scope
        '404':
          description: Unavailable resource or another principal session
        '409':
          description: Idempotency conflict, expired session or invalid progression
        '429':
          description: Bounded session/event limit reached
      operationId: postApiV1Sessions
      x-operation-id-source: derived
  /api/v1/sessions/{id}:
    get:
      tags:
      - Task sessions
      summary: Read account- and optionally agent-scoped task context; read scope required
      security:
      - apiKey: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          pattern: ^ts_[a-f0-9-]+$
      responses:
        '200':
          description: Task context or selected capability descriptors in a data envelope
        '400':
          description: Invalid contract
        '401':
          description: API key required
        '403':
          description: Missing read or requests:write scope
        '404':
          description: Unavailable resource or another principal session
        '409':
          description: Idempotency conflict, expired session or invalid progression
        '429':
          description: Bounded session/event limit reached
      operationId: getApiV1SessionsById
      x-operation-id-source: derived
  /api/v1/sessions/{id}/next:
    get:
      tags:
      - Task sessions
      summary: Preview ready next descriptors without delivery or extending TTL
      security:
      - apiKey: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          pattern: ^ts_[a-f0-9-]+$
      responses:
        '200':
          description: Task context or selected capability descriptors in a data envelope
        '400':
          description: Invalid contract
        '401':
          description: API key required
        '403':
          description: Missing read or requests:write scope
        '404':
          description: Unavailable resource or another principal session
        '409':
          description: Idempotency conflict, expired session or invalid progression
        '429':
          description: Bounded session/event limit reached
      operationId: getApiV1SessionsByIdNext
      x-operation-id-source: derived
  /api/v1/sessions/{id}/events:
    post:
      tags:
      - Task sessions
      summary: Report compact capability outcomes or stage; requires read + requests:write
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                request_id:
                  type: string
                  minLength: 8
                  maxLength: 120
                type:
                  enum:
                  - viewed
                  - called
                  - succeeded
                  - failed
                  - skipped
                  - stage
                capability:
                  type: string
                  maxLength: 120
                summary:
                  type: string
                  maxLength: 500
                current_stage:
                  type: string
                  maxLength: 100
                reported_tool_turns:
                  type: integer
                  minimum: 0
                  maximum: 10000
                reported_cost_usd:
                  type: number
                  minimum: 0
                  maximum: 10000
              required:
              - request_id
              - type
      responses:
        '200':
          description: Task context or selected capability descriptors in a data envelope
        '400':
          description: Invalid contract
        '401':
          description: API key required
        '403':
          description: Missing read or requests:write scope
        '404':
          description: Unavailable resource or another principal session
        '409':
          description: Idempotency conflict, expired session or invalid progression
        '429':
          description: Bounded session/event limit reached
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          pattern: ^ts_[a-f0-9-]+$
      operationId: postApiV1SessionsByIdEvents
      x-operation-id-source: derived
  /api/v1/sessions/{id}/close:
    post:
      tags:
      - Task sessions
      summary: Close with client-reported outcome; requires read + requests:write
      security:
      - apiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                request_id:
                  type: string
                  minLength: 8
                  maxLength: 120
                outcome:
                  enum:
                  - completed
                  - abandoned
                  - failed
                summary:
                  type: string
                  maxLength: 500
              required:
              - request_id
              - outcome
      responses:
        '200':
          description: Task context or selected capability descriptors in a data envelope
        '400':
          description: Invalid contract
        '401':
          description: API key required
        '403':
          description: Missing read or requests:write scope
        '404':
          description: Unavailable resource or another principal session
        '409':
          description: Idempotency conflict, expired session or invalid progression
        '429':
          description: Bounded session/event limit reached
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          pattern: ^ts_[a-f0-9-]+$
      operationId: postApiV1SessionsByIdClose
      x-operation-id-source: derived
components:
  securitySchemes:
    monitorBasic:
      type: http
      scheme: basic
      description: Existing operator Monitor credentials; public API keys cannot submit refinery candidates.
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: ds_live_… Daystruct API key
      description: Optional for public evidence reads and required for registered-agent operations. Identity management requires read and agents:write. Consumption requires read plus requests:write without an agent ID. Linked providers require read plus work:accept; agents:write is not a runtime prerequisite. Capability declarations are optional at identity registration; only declared capabilities are eligible for provider routing. Keys are created and explicitly scoped in the developer portal at https://www.daystruct.ai/portal. Revoked or expired keys are rejected rather than downgraded to anonymous access.