> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abstract.inc/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete a robot run

> Lists every file of the run.

The run completes only when each listed file is stored with that size and nothing else
is stored under it. Then the run is listed. Any later upload or file deletion takes it
out of the listing until you complete it again.


## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/robot/runs/{robot}/{run}/complete
openapi: 3.1.0
info:
  title: Abstract API
  version: 1.0.0
  summary: Robot action models and LLMs behind one API key.
  description: >
    `POST /v1/chat/completions` serves the robot action models. `POST
    /v1/responses` and

    `GET /v1/responses/{response_id}` serve the LLM models through the OpenAI
    Responses API.

    `GET /v1/models` lists the LLM model ids.


    The robot models also run over a WebSocket at
    `wss://api.abstract.inc/v1/responses`.

    OpenAPI does not describe it. See [Sessions over
    WebSocket](/robots/sessions).


    `/v1/robot/runs` stores your robot runs (episode logs, the Rerun recording
    with the

    camera video) under your account, and lists, downloads and deletes them.
    Only the key's

    account reaches its runs. An account stores up to 100 GiB of runs;

    `GET /v1/robot/runs/usage` shows what it holds.
  contact:
    name: Abstract
    url: https://abstract.inc
servers:
  - url: https://api.abstract.inc
security:
  - bearerAuth: []
tags:
  - name: Robot models
  - name: Robot runs
  - name: LLM models
paths:
  /v1/robot/runs/{robot}/{run}/complete:
    post:
      tags:
        - Robot runs
      summary: Complete a robot run
      description: >-
        Lists every file of the run. The run completes only when each listed
        file is stored with that size and nothing else is stored under it. Then
        the run is listed. Any later upload or file deletion takes it out of the
        listing until you complete it again.
      operationId: completeRobotRun
      parameters:
        - $ref: '#/components/parameters/Robot'
        - $ref: '#/components/parameters/Run'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - files
              properties:
                files:
                  type: array
                  minItems: 1
                  maxItems: 2000
                  items:
                    $ref: '#/components/schemas/RobotRunFile'
                episode:
                  type: object
                  description: >-
                    The run's episode card, at most 64 KiB of JSON. Listings
                    carry its `run`, `outcome`, `policy`, `kind`, `verdict`,
                    `steps`, `duration_s`, `started_at`, `task` and `tags`.
      responses:
        '200':
          description: The run is complete.
          content:
            application/json:
              schema:
                type: object
                required:
                  - robot
                  - run
                  - files
                  - bytes
                  - completed_at
                properties:
                  robot:
                    type: string
                  run:
                    type: string
                  files:
                    type: integer
                  bytes:
                    type: integer
                  completed_at:
                    type: string
                    format: date-time
        '401':
          $ref: '#/components/responses/Unauthorized'
        '409':
          description: >-
            `run_incomplete`: a listed file is missing or has another size, or a
            stored file is not listed. The message names them.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: '`request_too_large`: the body is over 1 MiB.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: '`invalid_request`: a name, path, query or body breaks its format.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: '`storage_unavailable` or `auth_unavailable`. Retry with backoff.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    Robot:
      name: robot
      in: path
      required: true
      description: Your robot's name, for example `t800`.
      schema:
        type: string
        pattern: ^[a-z0-9][a-z0-9._-]{0,63}$
    Run:
      name: run
      in: path
      required: true
      description: The run's name, its start time as `YYYYMMDD-HHMMSS`.
      schema:
        type: string
        pattern: ^\d{8}-\d{6}$
  schemas:
    RobotRunFile:
      type: object
      required:
        - path
        - size
        - sha256
      properties:
        path:
          type: string
        size:
          type: integer
        sha256:
          type: string
          pattern: ^[0-9a-f]{64}$
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
            - code
          properties:
            message:
              type: string
              description: For people. It can change.
            type:
              type: string
            param:
              type:
                - string
                - 'null'
              description: The request field at fault, when one is.
            code:
              type: string
              description: Branch on this. See [Errors and limits](/errors).
  responses:
    Unauthorized:
      description: '`missing_api_key` or `invalid_api_key`.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              message: Invalid API key.
              type: invalid_request_error
              code: invalid_api_key
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Abstract API key. Get it with `abstract login`, pass it as
        `$(abstract token)`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.