Need help? Check our complete API reference for detailed endpoint documentation.
Need help? Check our complete API reference for detailed endpoint documentation.
Quickstart - Conversations & Messages
1) Create a conversation for a user
id (e.g., conv_01234567890abcdef). Use this as conversation_id for messages.
2) Upload existing messages
You can post messages tohttps://api.mielto.com/api/v1/messages.
Include either Authorization: Bearer {apikey} or x-api-key: {apikey} and a body with messages in the content field:
conversation_id works:
- Required in practice: although optional in some schemas, provide
conversation_idwhen creating messages. - Flow:
- API receives
conversation_idin the create payload - The handler assigns this
conversation_idto each created message
- API receives
conversation_id groups messages, supports deduplication, enforces sender consistency within a conversation, and is used when embedding conversation content into collections.
3) Call the completions endpoint with a user_id
You can use the OpenAI SDKs by setting the base URL tohttps://api.mielto.com/api/v1, passing your API key from the Mielto dashboard, and including the x-user-id header with your internal user ID.