---
title: "Create Assistant"
method: POST
path: "/api/assistants/"
tags: ["assistants"]
---

# Create Assistant

`POST /api/assistants/`

Create a new assistant.

## Request body

- AssistantWithConfigCreate — Assistant create model with config -- used for creating a new assistant with config.
  - `model` 'gpt-4o'
  - `instructions` string, nullable
  - `knowledge_base_id` string, uuid, nullable, required
  - `context_limit` integer, nullable — The maximum number of context chunks to include in a run.
  - `tools` union[], nullable
    - union
      - AlphaV0Tool
        - `name` 'alpha_v0'
        - `project_id` integer, required
        - `access_key` string, required
      - NoOpTool
        - `name` 'noop'
  - `name` string, required — The name of the assistant
  - `description` string, required — The description of the assistant
  - `url_slug` string, nullable — Optional URL suffix - unique identifier for the assistant's endpoint
  - `suggested_questions` string[] — A list of suggested questions that can be asked to the assistant

## Response `201`

Successful Response

- Assistant — Assistant model.
  - `name` string, required — The name of the assistant
  - `description` string, required — The description of the assistant
  - `url_slug` string, nullable — Optional URL suffix - unique identifier for the assistant's endpoint
  - `suggested_questions` string[] — A list of suggested questions that can be asked to the assistant
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `deleted_at` string, date-time, nullable, required

## Other responses

- `422` — Validation Error

## Changes

- **2025-01-02** `60c8c820f2cb` — 1 info
  - added the new optional request property `tools`
- **2024-12-13** `a5e85dccbbe3` — 1 info
  - added the new optional request property `context_limit`
- **2024-12-05** `df1d1cc9e050` — 1 info
  - the `` request property const value `gpt-4o` was removed
- **2024-12-03** `c3d745f0888a` — 1 info
  - request property `knowledge_base_id` list-of-types was widened by adding types `null` to media type `application/json`
- **2024-11-01** `36e7c2cdfead` — 1 breaking, 4 warning, 4 info
  - removed the required property `knowledge_base_id` from the response with the `201` status
  - removed the request property `tools`
  - removed the optional property `instructions` from the response with the `201` status
  - removed the optional property `model` from the response with the `201` status
  - …5 more

[Full history](https://skmtc.dev/cleanlab/apis/agility/changes/api/assistants/post.md)

---

[API](https://skmtc.dev/cleanlab/apis/agility.md) · [All operations](https://skmtc.dev/cleanlab/apis/agility/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cleanlab/agility/revisions/92f517edd77d/schema)
