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: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "id": "c3f1a9e2-7b4d-4f3a-9d2e-8a1b2c3d4e5f",
3 "title": "Project Kickoff Discussion",
4 "modelId": "gpt-4-turbo",
5 "systemPrompt": "You are a helpful assistant for project management discussions.",
6 "ownerId": "user_987654321",
7 "metadata": {},
8 "messages": [
9 {}
10 ],
11 "source": "app",
12 "createdAt": "2024-06-01T09:15:00Z",
13 "updatedAt": "2024-06-01T09:15:00Z"
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.
titlestringOptional<=500 charactersDefaults to New Chat
modelIdstringOptional<=255 characters
systemPromptstringOptional
ownerIdstringOptional1-255 characters
metadatamap from strings to anyOptionalDefaults to {}

Response

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

Errors

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