Swagger Petstore - OpenAPI 3.0
POST/conversations/{conversation_id}/items

Create conversation items

Adds one or more items to a conversation, such as messages, tool calls, or outputs. You may add up to 20 items in a single request. Use the include parameter to request additional nested data in the response.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 1 body field
conversation_idstringrequired
The unique identifier of the conversation to add items to.
includearray<string>optional
Additional fields to include in the response, such as search results, code outputs, image URLs, or reasoning content. Specify as an array of field names.

Items to add to the conversation. The items array is required.

itemsarray<InputMessage>required
The items to add to the conversation. You may add up to 20 items at a time.

2 status codes
200Returns a paginated list of conversation items including the newly created ones, with metadata about the list.
objectstringrequired
The type of object returned, must be `list`.
Allowed:list
dataarray<ConversationItem>required
A list of conversation items.
has_morebooleanrequired
Whether there are more items available.
first_idstringrequired
The ID of the first item in the list.
last_idstringrequired
The ID of the last item in the list.
429Returned when the request rate limit is exceeded.
errorobjectrequired

Error handling

A 429 is returned when the request rate limit is exceeded. The items array is required and must contain between 1 and 20 items — an empty array or more than 20 items is rejected. conversation_id must identify an existing conversation.