> For the complete documentation index, see [llms.txt](https://docs.delphi.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.delphi.ai/api-immortal-only.md).

# API (Immortal Only)

Build custom integrations with your Delphi using the REST API.

The Delphi API lets you integrate your Digital Mind directly into your own app, platform, or workflow. You have control to the full experience — create conversations, stream responses, manage tags, and track usage through simple HTTP requests.

<a href="https://help.delphi.co" class="button primary">Visit the Help Center</a>

**Base URL:** `https://api.delphi.ai`

**Current version:** v4. v3 is the older version; the endpoint pages below document v3.

## Getting started

{% stepper %}
{% step %}

### Create an API key

API access is available on the **Immortal** plan. Create keys yourself under **Developer Platform → API keys**, and choose the scopes the key needs.

> **Important:** Store your key securely. It is only shown once and cannot be retrieved later.
> {% endstep %}

{% step %}

### Authenticate

Include your API key in the `x-api-key` header on every request:

```bash
curl https://api.delphi.ai/v4/content \
  -H "x-api-key: YOUR_API_KEY"
```

{% endstep %}

{% step %}

### Start a conversation

```bash
curl -X POST https://api.delphi.ai/v3/conversation \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"user_email": "user@example.com"}'
```

This returns a `conversation_id` and the Delphi's initial greeting.
{% endstep %}
{% endstepper %}

## Authentication

All endpoints require an API key passed in the `x-api-key` header. The key is scoped to a single Delphi — you can only interact with conversations and users belonging to that Delphi.

| Header      | Value        |
| ----------- | ------------ |
| `x-api-key` | Your API key |

### Scopes

Each key only has the permissions you give it. There are 21 scopes, for example `contacts:read` and `content:write`. A request that needs a scope the key doesn't have is rejected.

## Rate limits

* **500 requests per day** on the standard tier
* **10,000 requests per day** on the automation tier
* If you exceed the limit, you'll receive a `429 Too Many Requests` response

## SDK and CLI

* **TypeScript SDK:** `npm install @delphiai/sdk`. TypeScript is the only official SDK.
* **CLI:** `npm install -g @delphiai/cli`, then `delphi login`.
* **Upload content:** `POST /v4/content`
* **Notify the owner:** `POST /v4/notify-owner`

There's no public MCP server.

[Webhooks](/webhooks.md) and [Hosted Actions](/hosted-actions.md) don't need API access and work on every paid plan.

## Available endpoints

* [**Audience**](/api-immortal-only/audience.md) - Store and manage contextual information about users in your audience.
* [**Conversations**](/api-immortal-only/conversations.md) — Create conversations, stream responses, view history, and manage conversation lifecycle.
* [**Clone**](/api-immortal-only/clone.md) - Retrieve your Delphi's public profile information.
* [**Questions**](/api-immortal-only/questions.md) — Retrieve suggested questions configured for your Delphi.
* [**Tags**](/api-immortal-only/tags.md) — Create tags and organize your audience.
* [**Usage**](/api-immortal-only/usage.md) — Track consumption metrics and access tiers for your users.
* [**Voice**](/api-immortal-only/voice.md) — Stream voice responses as real-time PCM audio.
* [**Search**](/api-immortal-only/search.md) — Search your Delphi's digital mind for relevant chunks or content.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.delphi.ai/api-immortal-only.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
