---
title: "Create an app run"
method: POST
path: "/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs"
tags: ["Apps"]
---

# Create an app run

`POST /api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs`

## Request

- Base URL: `https://dust.tt`
- URL: `https://dust.tt/api/v1/w/{wId}/spaces/{spaceId}/apps/{aId}/runs`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/dust-tt/apis/dust-api-documentation/docs/api/v1/w/:wId/spaces/:spaceId/apps/:aId/runs/post.ts> (a function with typed inputs; its response is checked against the schema)

Create and execute a run for an app in the space specified by {spaceId}.

## Path parameters

- `wId` string, required
- `spaceId` string, required
- `aId` string, required

## Request body

- object
  - `specification_hash` string, required: Hash of the app specification. Ensures API compatibility across app iterations.
  - `config` object, required: Configuration for the app run
    - `model` object: Model configuration
      - `provider_id` string: ID of the model provider
      - `model_id` string: ID of the model
      - `use_cache` boolean: Whether to use caching
      - `use_stream` boolean: Whether to use streaming
  - `inputs` object[], required: Array of input objects for the app
  - `stream` boolean: If true, the response will be streamed
  - `blocking` boolean: If true, the request will block until the run is complete
  - `block_filter` string[]: Array of block names to filter the response

## Response `200`

App run created and executed successfully

- object
  - `run` Run
    - `run_id` string: The ID of the run
    - `app_id` string: The ID of the app
    - `status` object
      - `run` string: The status of the run
      - `build` string: The status of the build
    - `results` object: The results of the run
    - `specification_hash` string: The hash of the app specification
    - `traces` array[]
      - object[]
        - `timestamp` number: The timestamp of the trace
        - `trace` object: The trace

## Other responses

- `400`: Bad Request. Missing or invalid parameters.
- `401`: Unauthorized. Invalid or missing authentication token.
- `404`: Workspace or app not found.
- `500`: Internal Server Error.

---

[API](https://skmtc.dev/dust-tt/apis/dust-api-documentation.md) - [All operations](https://skmtc.dev/dust-tt/apis/dust-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/dust-tt/apis/dust-api-documentation/revisions/abb1c0993938?raw)
