> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archetypeai.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Direct Query API (POST /api/lens/query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT is the base URL https://platform.u1.archetypeai.app with no version path; every endpoint path begins with /api. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# Delete Project

> Delete an empty project by ID

Requires [version 2.0.0](https://docs.archetypeai.app/release-notes/2.0.x.md#v2-0-0) or later of the Archetype platform.

## Overview

This endpoint deletes a project by its `prj_` ID.

> [!NOTE]
>
> Only an empty project can be deleted. While the project still holds blueprints, evals,
> optimizations, packages, or agent runs, this endpoint returns HTTP status `409`. Delete what it
> holds first.

## Request

**project\_id** `string` *required*

Project `prj_` ID.

## Response

Returns `204 No Content` with an empty body on success.

```bash cURL theme={"system"}
curl -X DELETE "$ATAI_API_URL/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e" \
  -H "Authorization: Bearer $ATAI_API_KEY"
```

```python Python theme={"system"}
import os
import requests

base_url = os.environ["ATAI_API_URL"]
api_key = os.environ["ATAI_API_KEY"]

response = requests.delete(
    f"{base_url}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e",
    headers={"Authorization": f"Bearer {api_key}"},
)

if response.status_code == 204:
    print("Project deleted")
elif response.status_code == 409:
    print("Project is not empty: delete what it holds first")
else:
    print(f"Error: {response.json()['errors']}")
```

```javascript JavaScript theme={"system"}
const response = await fetch(
  `${process.env.ATAI_API_URL}/api/projects/prj_01jcd4m8t2vq6xn3r7k5hbzw9e`,
  {
    method: 'DELETE',
    headers: {
      'Authorization': `Bearer ${process.env.ATAI_API_KEY}`
    }
  }
);

if (response.status === 204) {
  console.log('Project deleted');
} else {
  const body = await response.json();
  console.error('Error:', body.errors);
}
```

```json 204 - Project deleted theme={"system"}
```

```json 403 - The caller is read-only theme={"system"}
{
  "errors": [
    {
      "code": "<error_code>",
      "message": "The caller is read-only.",
      "suggestion": null,
      "error_uid": "err-xxxxxxxx"
    }
  ]
}
```

```json 404 - Project not found theme={"system"}
{
  "errors": [
    {
      "code": "<error_code>",
      "message": "Project not found.",
      "suggestion": null,
      "error_uid": "err-xxxxxxxx"
    }
  ]
}
```

```json 409 - The project is not empty theme={"system"}
{
  "errors": [
    {
      "code": "<error_code>",
      "message": "The project is not empty.",
      "suggestion": null,
      "error_uid": "err-xxxxxxxx"
    }
  ]
}
```

## Important Notes

> [!NOTE]
>
> * Deleting a project is permanent. There is no way to restore it.
> * `403` means the caller has the read-only `viewer` role.
> * `404` means the project does not exist or is not visible to you.
> * Success returns `204` with no body. Check the status code rather than parsing a response.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.