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

# Create Project

> Create a new project

## Overview

Creates a new project. A project is the container that holds chapters, prompts, and exports.

## Request

### Headers

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be `application/json`
</ParamField>

### Body

<ParamField body="name" type="string" required>
  Project name (1-30 characters)
</ParamField>

<ParamField body="description" type="string">
  Optional project description (max 1000 characters)
</ParamField>

<ParamField body="settings" type="object">
  Optional project settings (reserved for future use)
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique project identifier (format: `prj_[A-Za-z0-9]{21}`)
</ResponseField>

<ResponseField name="name" type="string">
  Project name
</ResponseField>

<ResponseField name="description" type="string | null">
  Project description
</ResponseField>

<ResponseField name="settings" type="object | null">
  Project settings
</ResponseField>

<ResponseField name="active_export_id" type="string | null">
  ID of the currently active export, if any
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp when the project was created
</ResponseField>

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.babou.ai/api/v1/projects \
    -H "Authorization: Bearer $BABOU_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Pricing Page Refresh",
      "description": "Launch campaign for the new Team tier"
    }'
  ```

  ```typescript TypeScript theme={null}
  async function createProject(name: string, description?: string) {
    const response = await fetch('https://api.babou.ai/api/v1/projects', {
      method: 'POST',
      headers: {
        'Authorization': `Bearer ${process.env.BABOU_API_KEY}`,
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({ name, description })
    });

    return await response.json();
  }

  const project = await createProject(
    'Pricing Page Refresh',
    'Launch campaign for the new Team tier'
  );
  console.log('Created project:', project.id);
  ```

  ```python Python theme={null}
  import os
  import requests

  def create_project(name, description=None):
      response = requests.post(
          'https://api.babou.ai/api/v1/projects',
          headers={
              'Authorization': f'Bearer {os.environ["BABOU_API_KEY"]}',
              'Content-Type': 'application/json'
          },
          json={'name': name, 'description': description}
      )
      return response.json()

  project = create_project(
      'Pricing Page Refresh',
      'Launch campaign for the new Team tier'
  )
  print(f'Created project: {project["id"]}')
  ```
</CodeGroup>

## Response Example

```json theme={null}
{
  "id": "prj_abc123xyz",
  "name": "Pricing Page Refresh",
  "description": "Launch campaign for the new Team tier",
  "settings": null,
  "active_export_id": null,
  "created_at": "2025-12-02T10:00:00Z"
}
```

## Error Responses

<ResponseField name="VALIDATION_ERROR" type="400">
  Invalid request parameters

  ```json theme={null}
  {
    "error": "Validation failed",
    "code": "VALIDATION_ERROR",
    "hint": "Name must be between 1 and 30 characters"
  }
  ```
</ResponseField>

<ResponseField name="UNAUTHORIZED" type="401">
  Invalid or missing API key

  ```json theme={null}
  {
    "error": "Unauthorized - Invalid API key",
    "code": "UNAUTHORIZED"
  }
  ```
</ResponseField>

## Next Steps

<CardGroup cols={2}>
  <Card title="Add Chapters" icon="plus" href="/api-reference/chapters/create">
    Add chapters to your project
  </Card>

  <Card title="List Projects" icon="list" href="/api-reference/projects/list">
    View all your projects
  </Card>
</CardGroup>
