---
title: "Create Chat Completion External"
method: POST
path: "/assistants/chat/completions"
---

# Create Chat Completion External

`POST /assistants/chat/completions`

## Request

- Base URL: `https://api.retrodiffusion.ai/v2`
- URL: `https://api.retrodiffusion.ai/v2/assistants/chat/completions`
- Auth: none declared. Required headers: `X-RD-Token`

Create a chat completion using an assistant (external API with token authentication).
Only accessible by admin users.

## Headers

- `X-RD-Token` string, required

## Request body

- ChatCompletionRequest
  - `assistant_id` string, required
  - `messages` ChatMessage[], required
    - `role` string, required
    - `content` union
      - string
      - union[]
        - union
          - TextContent
            - `type` string
            - `text` string, required
          - ImageContent
            - `type` string
            - `image_url` ImageUrl, required
              - …
    - `tool_calls` ToolCall[]
      - `id` string, required
      - `type` string
      - `function` ToolCallFunction, required
        - `name` string, required
        - `arguments` string, required
    - `tool_call_id` string
  - `conversation_id` string
  - `model` string
  - `system_prompt_override` string
  - `tools` object[]
  - `tool_choice` string
  - `disable_reasoning` boolean
  - `reasoning_effort` string

## Response `200`

Successful Response

- ChatCompletionResponse
  - `id` string, required
  - `choices` object[], required
  - `created` integer, required
  - `model` string, required
  - `object` string
  - `usage` object
  - `conversation_id` string

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `405`: Method not allowed.
- `422`: Validation Error
- `500`: Internal Server Error

---

[API](https://skmtc.dev/retrodiffusion/apis/retrodiffusion-api.md) · [All operations](https://skmtc.dev/retrodiffusion/apis/retrodiffusion-api/llms.txt) · [OpenAPI document](https://skmtc.dev/retrodiffusion/apis/retrodiffusion-api/revisions/9c76250e8e2d?raw)
