---
title: "Run Assistant"
method: POST
path: "/studio/v1/assistants/{assistant_id}/run"
---

# Run Assistant

`POST /studio/v1/assistants/{assistant_id}/run`

## Path parameters

- `assistant_id` string, required

## Request body

- RunAssistantRequest
  - `input` Message[], required
    - `role` 'assistant' | 'user', required — The role of an individual message. - `user`: Input provided by the user. Any instructions given here that conflict with instructions given in the `system` prompt take precedence over the `system` prompt instructions. - `assistant`: Response generated by the model. - `system`: Initial instructions provided to the system to provide general guidance on the tone and voice of the generated message. An initial system message is optional but recommended to provide guidance on the tone of the chat. For example, "You are a helpful chatbot with a background in earth sciences and a charming French accent."
    - `content` string, required
  - `verbose` boolean
  - `output_type` object
  - `include` string[]
  - `structured_rag_enabled` boolean
  - `dynamic_planning_enabled` boolean
  - `response_language` 'arabic' | 'dutch' | 'english' | 'french' | 'german' | 'hebrew' | 'italian' | 'portuguese' | 'spanish' | 'unset'
  - `system_prompt` string

## Response `200`

Successful Response

- MaestroRunResult
  - `id` string, uuid, required — A unique ID for the request (not the message). Repeated identical requests get different IDs. However, for a streaming response, the ID will be the same for all responses in the stream.
  - `status` 'completed' | 'failed' | 'in_progress' | 'requires_action', required
  - `result` unknown
  - `data_sources` object
  - `requirements_result` object
  - `created_at` string, date-time
  - `error` MaestroRunError
    - `message` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/ai21/apis/ai21-studio-api.md) · [All operations](https://skmtc.net/ai21/apis/ai21-studio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ai21/ai21-studio-api/versions/4105747cd57d/schema)
