Skip to content
Get an API key

API reference

Add items to a conversation.

POST
/conversations/{conversation_id}/items
curl --request POST \
--url https://api.helping.io/v1/conversations/example/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "items": [ { "id": "example" } ] }'

Up to 20 per call. Added items become part of the conversation’s context: the next response on it sees them.

The answer is the items you just added, not the whole conversation.

conversation_id
required
string

The opaque conv_... id of the conversation

include
Array<string>
Allowed values: reasoning.encrypted_content message.output_text.logprobs message.input_image.image_url file_search_call.results web_search_call.results web_search_call.action.sources computer_call_output.output.image_url code_interpreter_call.outputs

Extras to return that are omitted by default.

The items to add.

Media typeapplication/json

Add items to a conversation.

object
items
required

The items to add, up to 20 per call.

Array
Any of:
One of:

An input item, discriminated by type.

object
One of:

A message item, discriminated by role.

object
content
required
One of:
string
id
string | null
status
string | null
role
required
string
Allowed values: user
type
required
string
Allowed values: message

The items that were added.

Media typeapplication/json

A page of a conversation’s items.

first_id and last_id are always present, as empty strings on an empty page. A client paginating with after uses last_id, and has_more is what tells it whether to ask again.

object
data
required

The items, in the order you asked for.

Array
One of:

One item of output, discriminated by type.

object
content
required
Array
One of:

Text you are sending to the model.

object
text
required
string
type
required
string
Allowed values: input_text
id
required
string
phase
Any of:

Whether an assistant message is the answer or commentary alongside it.

final_answer marks the message meant as the reply; commentary marks narration produced on the way there.

string
Allowed values: commentary final_answer
role
required

Who a message came from.

string
Allowed values: user assistant system developer
status
required

How far along an output item is.

in_progress while the item is still being produced, completed when it is final, and incomplete when the response stopped before the item was finished.

string
Allowed values: in_progress completed incomplete
type
required
string
Allowed values: message
first_id
required

The id of the first item on this page.

string
has_more
required

Whether more items exist after this page.

boolean
helpingio:unreadable

Items on this page that are stored but could not be read. The other items are returned in data. Omitted when every item was read.

Array<object>

An item that is stored but could not be read.

object
code
required

Always item_unreadable.

string
id
required

The item’s id. Retrieving it returns the same error.

string
message
required

What went wrong.

string
last_id
required

The id of the last item on this page; pass it as after for the next page.

string
object
required

Always list.

string
Example
{
"data": [
{
"content": [
{
"type": "input_text"
}
],
"phase": "commentary",
"role": "user",
"status": "in_progress",
"type": "message"
}
]
}

More than 20 items, or an item this API cannot store (the error envelope)

Missing or invalid API key (the error envelope)

The key is not entitled to what the request asked for (the error envelope)

No such conversation, or one this key cannot reach.

The Idempotency-Key was already used and its result cannot be returned for this request, or its first request is still being processed (the error envelope)

This organization has exhausted its allowance; retry after the Retry-After header.

The request could not be completed; quote the x-request-id response header when reporting it.

The request could not be served this instant; retry after the Retry-After header.