---
title: "Run a bounded editing assistant turn"
method: POST
path: "/editor-agent/assistant"
tags: ["Editor Agent"]
---

# Run a bounded editing assistant turn

`POST /editor-agent/assistant`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/editor-agent/assistant`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

## Request body

- EditorAssistantInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `context` string
  - `history` EditorAssistantMessage[], nullable
    - `content` string, required
    - `role` 'user' | 'assistant', required
  - `project_id` string, required
  - `prompt` string, required
  - `session_id` string, required
  - `style_id` string
  - `style_version` integer
  - `workspace_id` string, required

## Response `200`

OK

- EditorAssistantOutputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `input_tokens` integer, required
  - `model` string, required
  - `output_tokens` integer, required
  - `pending_request_id` string
  - `reply` string, required
  - `steps` EditorAssistantStep[], nullable, required
    - `operation` string, required
    - `result` unknown, required

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `502`: Bad Gateway
- `503`: Service Unavailable

---

[API](https://skmtc.dev/openpo/apis/openpost-api.md) · [All operations](https://skmtc.dev/openpo/apis/openpost-api/llms.txt) · [OpenAPI document](https://skmtc.dev/openpo/apis/openpost-api/revisions/67d3964458a7?raw)
