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

# Open Source API v1

> Base URL, authentication, endpoint families, and the first self-hosted API request.

The Open Source API is served by the same deployment as the browser application. With the default Docker installation, use:

```text theme={null}
http://localhost:5001/api/v1
```

## Authentication

All `/api/v1/*` routes except `/api/v1/auth/*` require HTTP Basic authentication when the admin account is configured. Send the same username and password as the web UI.

```bash theme={null}
export PRESENTON_URL=http://localhost:5001
export PRESENTON_USERNAME=admin
export PRESENTON_PASSWORD=YOUR_PASSWORD
```

Keep credentials in environment variables or a secret manager rather than embedding them in source code.

## Endpoint families

| Family        | What it does                                            |
| ------------- | ------------------------------------------------------- |
| Files         | Upload source documents before generation               |
| Images        | Upload, list, and remove reusable images                |
| Presentations | Generate, list, inspect, edit, derive, and delete decks |
| Async status  | Track long-running presentation jobs                    |
| Slides        | Apply targeted slide edits                              |
| Themes        | List default and available themes                       |
| Webhooks      | Subscribe or unsubscribe callback destinations          |

The endpoint navigation on this page contains the complete schemas for this release.

## First request

```bash theme={null}
curl --request POST \
  --url "$PRESENTON_URL/api/v1/ppt/presentation/generate" \
  --user "$PRESENTON_USERNAME:$PRESENTON_PASSWORD" \
  --header 'Content-Type: application/json' \
  --data '{
    "content": "Create a presentation explaining retrieval-augmented generation",
    "tone": "educational",
    "verbosity": "standard",
    "n_slides": 8,
    "language": "English",
    "template": "general",
    "export_as": "pptx"
  }'
```

A successful response includes `presentation_id`, `path`, and `edit_path`. Prepend the Presenton server root when a returned URL path is relative.

## Synchronous or asynchronous

Use synchronous generation for small interactive requests where the client can keep the connection open. Use asynchronous generation for larger documents, longer decks, background jobs, or provider calls with variable latency; track the returned job through the status endpoint or a webhook.

## Documents and output

Upload source documents before generation, then pass the returned paths in the `files` array. The generate endpoint supports `pptx` and `pdf` output and can also accept a slide-by-slide Markdown structure.

<CardGroup cols={2}>
  <Card title="Complete API tutorial" icon="terminal" href="/open-source/v0.9.0-beta/tutorials/generate-with-api">
    Generate from a prompt, upload a source document, and understand the result.
  </Card>

  <Card title="API and MCP concepts" icon="plug" href="/open-source/v0.9.0-beta/features/api-and-mcp">
    Choose between REST, asynchronous jobs, webhooks, and MCP.
  </Card>
</CardGroup>

<Warning>
  Cloud API v3 examples are not interchangeable with Open Source API v1 examples. Keep self-hosted requests pointed at the Presenton instance you operate.
</Warning>
