Conversations

Create a conversation

Start a new conversation with your clone. Returns a conversation ID and the clone's initial greeting.

Endpoint: POST /v3/conversation

Request body:

Field
Type
Required
Description

user_email

string

No

Email of the user starting the chat

If user_email is provided, the conversation is linked to that user. Otherwise, it's created as an anonymous conversation.

Example request:

curl -X POST https://api.delphi.ai/v3/conversation \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"user_email": "[email protected]"}'

Example response:

{
  "conversation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "created_at": "2025-06-15T10:30:00.000Z",
  "initial_message": "Hey! How can I help you today?"
}

Stream a response

Send a message and receive the clone's response as a real-time stream (Server-Sent Events).

Endpoint: POST /v3/stream

Request body:

Field
Type
Required
Description

conversation_id

string

Yes

UUID of the conversation

message

string

Yes

The user's message

file_urls

string[]

No

URLs of user-uploaded files for context

slug

string

No

Your clone's slug

Example request:

Response format: text/event-stream

The response is a stream of Server-Sent Events. Each event contains a chunk of the clone's response. The stream ends with a [DONE] event.

List conversations

Retrieve all conversations for a specific user.

Endpoint: GET /v3/conversation/list

Query parameters:

Parameter
Type
Required
Description

email

string

Yes

The user's email address

Example request:

Example response:

Conversations are sorted by newest first. Only active (non-deleted) conversations are returned.

Get conversation history

Retrieve the full message history for a conversation.Endpoint: GET /v3/conversation/{conversation_id}/historyPath parameters:

Parameter

Type

Description

conversation_id

string

UUID of the conversation

Query parameters:

Parameter

Type

Required

Default

Description

include_citations

boolean

No

false

Include source citations

Example request:

Example response:

Citation fields (when include_citations=true):

Field
Type
Description

url

string

Source URL

text

string

Relevant excerpt

type

string

Source type: WEB, PDF, TWITTER

title

string

Source title (nullable)

page_num

number

PDF page number (nullable)

timestamp

number

Video/audio timestamp (nullable)

tweet_id

string

Tweet ID (nullable)

citation_url

string

Direct citation link (nullable)

Messages are returned in chronological order (oldest first).

Update conversation title

Set or update the title of a conversation.

Endpoint: PUT /v3/conversation/{conversation_id}/title

Path parameters:

Parameter
Type
Description

conversation_id

string

UUID of the conversation

Request body:

Field
Type
Required
Description

title

string

Yes

New title (1–500 characters)

Example request:

Example response:

Delete a conversation

Soft-delete a conversation. It will no longer appear in list results.

Endpoint: DELETE /v3/conversation/{conversation_id}

Path parameters:

Parameter
Type
Description

conversation_id

string

UUID of the conversation

Example request:

Example response:

This is a soft delete — the conversation is hidden, not permanently removed.

Last updated