Assistants
Assistant and conversation endpoints
Assistants object
Attributes
object
Stringid
Stringslug
Stringname
Stringowner_type
Enumorganization_id
StringNullabledefault_model
ObjectNullableavailable_models
Objectcreated_at
Dateupdated_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
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalcurl -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
StringThe unique identifier for the assistant
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
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalassistant_id
UnionOptionalcurl -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
Stringtitle
StringOptionalcurl -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
StringThe unique identifier for the assistant_conversation
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
StringThe unique identifier for the assistant_conversation
Request Body
title
StringOptionalcurl -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
StringThe unique identifier for the assistant_conversation
Query Parameters
limit
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalcurl -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
StringThe unique identifier for the assistant_conversation
Request Body
message
Objectparent_message_id
StringOptionalmodel_id
StringOptionalcurl -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
StringThe unique identifier for the assistant_conversation
assistant_message_id
StringThe unique identifier for the assistant_message
curl -X GET "https://api.metorial.com/conversations/ass_Rm4Mnheq2bfEPhBhP7SY/messages/ass_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."