Assistants

Assistant and conversation endpoints

Assistants object

Attributes

object

String

id

String

slug

String

name

String

owner_type

Enum

organization_id

StringNullable

default_model

ObjectNullable

available_models

Object

created_at

Date

updated_at

Date
{
"object": "assistant",
"owner_type": "metorial",
"default_model": {
"object": "assistant.model",
"provider": {
"object": "assistant.model_provider"
}
},
"available_models": [
{
"object": "assistant.model",
"provider": {
"object": "assistant.model_provider"
}
},
{
"object": "assistant.model",
"provider": {
"object": "assistant.model_provider"
}
}
]
}

List assistants

List assistants available in an instance.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional
GEThttp://api.metorial.com/assistants
curl -X GET "https://api.metorial.com/assistants" \
-H "Authorization: Bearer metorial_sk_..."

Get assistant

Get an assistant available in an instance.

URL Parameters

assistant_id

String

The unique identifier for the assistant

GEThttp://api.metorial.com/assistants/:assistant_id
curl -X GET "https://api.metorial.com/assistants/ass_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

List assistant conversations

List assistant conversations in an instance.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

assistant_id

UnionOptional
GEThttp://api.metorial.com/conversations
curl -X GET "https://api.metorial.com/conversations" \
-H "Authorization: Bearer metorial_sk_..."

Create assistant conversation

Create a new assistant conversation in an instance.

Request Body

assistant_id

String

title

StringOptional
POSThttp://api.metorial.com/conversations
curl -X POST "https://api.metorial.com/conversations" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"assistant_id": "example_assistant_id",
"title": "example_title"
}'

Get assistant conversation

Get a specific assistant conversation.

URL Parameters

assistant_conversation_id

String

The unique identifier for the assistant_conversation

GEThttp://api.metorial.com/conversations/:assistant_conversation_id
curl -X GET "https://api.metorial.com/conversations/ass_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Update assistant conversation

Update a specific assistant conversation.

URL Parameters

assistant_conversation_id

String

The unique identifier for the assistant_conversation

Request Body

title

StringOptional
PATCHhttp://api.metorial.com/conversations/:assistant_conversation_id
curl -X PATCH "https://api.metorial.com/conversations/ass_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"title": "example_title"
}'

List assistant messages

List messages in a specific assistant conversation.

URL Parameters

assistant_conversation_id

String

The unique identifier for the assistant_conversation

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional
GEThttp://api.metorial.com/conversations/:assistant_conversation_id/messages
curl -X GET "https://api.metorial.com/conversations/ass_Rm4Mnheq2bfEPhBhP7SY/messages" \
-H "Authorization: Bearer metorial_sk_..."

Create assistant message

Create a user message and assistant request in a specific conversation.

URL Parameters

assistant_conversation_id

String

The unique identifier for the assistant_conversation

Request Body

message

Object

parent_message_id

StringOptional

model_id

StringOptional
POSThttp://api.metorial.com/conversations/:assistant_conversation_id/messages
curl -X POST "https://api.metorial.com/conversations/ass_Rm4Mnheq2bfEPhBhP7SY/messages" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"message": {
"parts": [
{
"type": "example_type",
"text": "example_text"
}
]
},
"parent_message_id": "example_parent_message_id",
"model_id": "example_model_id"
}'

Get assistant message

Get a specific assistant message.

URL Parameters

assistant_conversation_id

String

The unique identifier for the assistant_conversation

assistant_message_id

String

The unique identifier for the assistant_message

GEThttp://api.metorial.com/conversations/:assistant_conversation_id/messages/:assistant_message_id
curl -X GET "https://api.metorial.com/conversations/ass_Rm4Mnheq2bfEPhBhP7SY/messages/ass_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."