For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dashboard
User GuideDeveloper GuidesAPI Reference
User GuideDeveloper GuidesAPI Reference
    • Overview
  • Runtype API
      • GETList conversations
      • POSTCreate a conversation
      • GETGet conversation with messages
      • PUTUpdate a conversation
      • DELDelete a conversation
Dashboard
LogoLogo
Runtype APIConversations

Create a conversation

POST
/v1/conversations
POST
/v1/conversations
$curl -X POST https://api.runtype.com/v1/conversations \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "metadata": {
> "topic": "general"
> },
> "modelId": "gpt-4",
> "systemPrompt": "You are a helpful assistant.",
> "title": "New Chat"
>}'
1{
2 "createdAt": "string",
3 "id": "string",
4 "messages": [
5 {}
6 ],
7 "metadata": {},
8 "modelId": "string",
9 "ownerId": "string",
10 "source": "app",
11 "systemPrompt": "string",
12 "title": "string",
13 "updatedAt": "string"
14}
Was this page helpful?
Previous

Get conversation with messages

Next
Built with

Authentication

AuthorizationBearer
API key or Clerk session token

Request

This endpoint expects an object.
metadatamap from strings to anyOptionalDefaults to {}
modelIdstringOptional<=255 characters
ownerIdstringOptional1-255 characters
systemPromptstringOptional
titlestringOptional<=500 charactersDefaults to New Chat

Response

Conversation created
createdAtstring
idstring
messageslist of maps from strings to any
metadatamap from strings to any
modelIdstring or null
ownerIdstring or null
sourceenum
Allowed values:
systemPromptstring or null
titlestring
updatedAtstring

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error