{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Raccoon AI","colors":{"primary":"#6064f0","light":"#6064f0","dark":"#6064f0"},"logo":{"light":"https://mintcdn.com/raccoonai/6qveMvQV51xorDrx/logo/light.png?fit=max\u0026auto=format\u0026n=6qveMvQV51xorDrx\u0026q=85\u0026s=8802ca0ad19e5d93df81b39bfc07d1d5","dark":"https://mintcdn.com/raccoonai/6qveMvQV51xorDrx/logo/dark.png?fit=max\u0026auto=format\u0026n=6qveMvQV51xorDrx\u0026q=85\u0026s=4f1e0249b3c020f251aadd9d0395683a","href":"https://raccoonai.tech"},"favicon":"/favicon.svg","api":{"playground":{}},"appearance":{"default":"dark"},"background":{"color":{"light":"#fafafa","dark":"#101011"}},"navbar":{"links":[{"label":"Contact Sales","href":"https://raccoonai.tech/contact"}],"primary":{"type":"button","label":"Go to App","href":"https://raccoonai.tech/app"}},"footer":{"socials":{"website":"https://raccoonai.tech","x":"https://x.com/raccoonaihq","discord":"https://discord.gg/zyyhttSfC4","linkedin":"https://www.linkedin.com/company/raccoonai","github":"https://github.com/raccoonaihq"}},"seo":{"indexing":"all"},"fonts":{"heading":{"family":"Geist Sans","weight":600,"source":"https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-SemiBold.woff2","format":"woff2"},"body":{"family":"Geist Sans","weight":400,"source":"https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Regular.woff2","format":"woff2"}},"icons":{"library":"lucide"},"integrations":{"posthog":{"apiKey":"phc_Cd17hnBuo74fHTljGokYdEbk4WO1VSDwMCIXbtOt1cv"}},"contextual":{"options":[{"title":"Open in Raccoon AI","description":"Ask questions or get to building","icon":"/favicon.svg","href":"https://raccoonai.tech/app?q=Read these URLs thoroughly: https://docs.raccoonai.tech/llms-full.txt, https://docs.raccoonai.tech/asyncapi.yaml, https://docs.raccoonai.tech/openapi.yaml. Briefly and visually explain the Raccoon AI API to me, then ask follow up questions on what I want to do.\u0026mode=code"},"copy","view","chatgpt","claude"]},"navigation":{"global":{"anchors":[{"anchor":"Community","icon":"users","href":"https://discord.gg/zyyhttSfC4"},{"anchor":"Support","icon":"life-buoy","href":"mailto:team@raccoonai.tech"},{"anchor":"API Status","icon":"activity","href":"https://status.raccoonai.tech"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"raccoonai","hasAudioNarration":false,"actualSubdomain":"raccoonai","customDomains":["docs.raccoonai.tech"],"gitSource":{"type":"github","owner":"raccoonaihq","repo":"raccoonai-docs","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{},"buildId":"6ae921cce1a78f25d5e0473b:success","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"Sessions","count":6},{"language":"default","tag":"Overview","count":2},{"language":"default","tag":"Media","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".nav-logo{width:7rem!important;height:auto!important;margin-top:-10px!important}h3{margin-top:1.5rem!important;margin-bottom:0.5rem!important}h3+p{margin-top:0!important}[data-testid=\"api-playground-modal\"]:has(path[d*=\"M9.5 10.75\"]),[data-testid=\"api-playground-modal\"]:has(path[d*=\"M7.263\"]){padding:1rem!important}"}],"page":{"pagePath":"api-reference/sessions/start-a-new-sessionturn","slug":"/api-reference/sessions/start-a-new-sessionturn","pageMetadata":{"title":"Start a new session/turn","description":"Starts a new turn in a session. If the session doesn't exist, it's created automatically.\n\nTo continue an existing session, pass the same `session_id` from a previous turn.\nTo start a fresh session, generate a new UUID for `session_id`.\n\nAfter calling this endpoint, connect to the WebSocket at `/ws/sessions/{sessionId}`\nto receive real-time execution updates.\n","deprecated":null,"version":null,"openapi":"openapi.yaml post /sessions/new","href":"/api-reference/sessions/start-a-new-sessionturn","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Starts a new turn in a session. If the session doesn’t exist, it’s created automatically.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To continue an existing session, pass the same \", _jsx(_components.code, {\n children: \"session_id\"\n }), \" from a previous turn.\\nTo start a fresh session, generate a new UUID for \", _jsx(_components.code, {\n children: \"session_id\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"After calling this endpoint, connect to the WebSocket at \", _jsx(_components.code, {\n children: \"/ws/sessions/{sessionId}\"\n }), \"\\nto receive real-time execution updates.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Start a new session/turn","description":"Starts a new turn in a session. If the session doesn't exist, it's created automatically.\n\nTo continue an existing session, pass the same `session_id` from a previous turn.\nTo start a fresh session, generate a new UUID for `session_id`.\n\nAfter calling this endpoint, connect to the WebSocket at `/ws/sessions/{sessionId}`\nto receive real-time execution updates.\n","deprecated":null,"version":null,"openapi":"openapi.yaml post /sessions/new","href":"/api-reference/sessions/start-a-new-sessionturn","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Sessions"],"summary":"Start a new session/turn","description":"Starts a new turn in a session. If the session doesn't exist, it's created automatically.\n\nTo continue an existing session, pass the same `session_id` from a previous turn.\nTo start a fresh session, generate a new UUID for `session_id`.\n\nAfter calling this endpoint, connect to the WebSocket at `/ws/sessions/{sessionId}`\nto receive real-time execution updates.\n","operationId":"createTurn","requestBody":"49d511a4-f009-4b7f-9d71-f4dbab7fe7c2","responses":{"200":"5d998105-a870-461e-95db-a4239b10d993","400":"ddcd17c0-891e-4067-b9d7-3d9dbdf95097","401":"82a0fabc-14c6-4def-95c8-7758922bd465","429":"53618124-c556-48f6-acd1-3b95584df674"},"method":"post","type":"path","servers":["92c008f3-0158-4616-95a8-d31a1ac1027a"],"security":["3c9cda25-5be8-45db-a16f-010d58c8e121"],"path":"/sessions/new","baseUrlOptions":["https://api.raccoonai.tech"],"title":"Start a new session/turn","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["session_id","task","mode"],"properties":{"session_id":{"type":"string","format":"uuid","description":"Session ID. Use the same ID to continue an existing session, or generate a new UUID for a fresh session.","isRequired":true,"uniqueKey":"session_id","typeLabel":"string\u003cuuid>"},"task":{"type":"string","description":"Natural language description of what you want the agent to do","isRequired":true,"uniqueKey":"task","typeLabel":"string"},"mode":{"type":"string","enum":["auto","plan","deepsearch","slides","code"],"description":"Execution mode:\n- `auto`: General-purpose mode for any task\n- `plan`: Creates a detailed plan before execution\n- `deepsearch`: Optimized for web research and data analysis\n- `slides`: Generates presentation slides\n- `code`: Optimized for coding tasks\n","isRequired":true,"uniqueKey":"mode","typeLabel":"enum\u003cstring>"},"files":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Storage key from upload","uniqueKey":"files.items.[INDEX].key","typeLabel":"string"},"name":{"type":"string","uniqueKey":"files.items.[INDEX].name","typeLabel":"string"},"type":{"type":"string","description":"MIME type","uniqueKey":"files.items.[INDEX].type","typeLabel":"string"},"size":{"type":"integer","uniqueKey":"files.items.[INDEX].size","typeLabel":"integer"}},"uniqueKey":"files.items.[INDEX]","typeLabel":"object"},"description":"Files from the upload endpoint","uniqueKey":"files","typeLabel":"object[]"},"ace_version":{"type":"string","enum":["fast","think"],"description":"SDK version (optional)","uniqueKey":"ace_version","typeLabel":"enum\u003cstring>"},"base_prompt":{"type":"string","description":"Base prompt or system instructions (optional)","uniqueKey":"base_prompt","typeLabel":"string"},"references":{"type":"array","items":{"type":"object","uniqueKey":"references.items.[INDEX]","typeLabel":"object"},"description":"Reference objects for additional context (optional)","uniqueKey":"references","typeLabel":"object[]"},"history":{"type":"array","items":{"type":"object","uniqueKey":"history.items.[INDEX]","typeLabel":"object"},"description":"Conversation history for continuation (optional)","uniqueKey":"history","typeLabel":"object[]"},"continuation":{"type":"string","description":"Continuation data as JSON string (optional)","uniqueKey":"continuation","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"session_id":"3c90c3cc-0d44-4b50-8888-8dd25736052a","task":"\u003cstring>","files":[{"key":"\u003cstring>","name":"\u003cstring>","type":"\u003cstring>","size":123}],"base_prompt":"\u003cstring>","references":[{}],"history":[{}],"continuation":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"5d998105-a870-461e-95db-a4239b10d993":{"description":"Turn created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string","description":"Session ID (same as the `session_id` you provided). Use for WebSocket connection.","uniqueKey":"session_id","typeLabel":"string"},"user_message_id":{"type":"string","description":"ID of the user's message","uniqueKey":"user_message_id","typeLabel":"string"},"agent_message_id":{"type":"string","description":"ID of the agent's response message. Use as `message_id` for WebSocket connection.","uniqueKey":"agent_message_id","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"session_id":"\u003cstring>","user_message_id":"\u003cstring>","agent_message_id":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"ddcd17c0-891e-4067-b9d7-3d9dbdf95097":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","message":"\u003cstring>","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"82a0fabc-14c6-4def-95c8-7758922bd465":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","message":"\u003cstring>","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"53618124-c556-48f6-acd1-3b95584df674":{"description":"Rate limit exceeded","headers":{"X-Rate-Limit-Max-Concurrent":{"description":"Maximum concurrent turns allowed","schema":{"type":"integer"}},"X-Rate-Limit-Current-Concurrent":{"description":"Current concurrent turns","schema":{"type":"integer"}},"X-Rate-Limit-Retry-After":{"description":"Seconds until retry","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","uniqueKey":"error","typeLabel":"string"},"message":{"type":"string","uniqueKey":"message","typeLabel":"string"},"details":{"type":"object","uniqueKey":"details","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"\u003cstring>","message":"\u003cstring>","details":{}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"3c9cda25-5be8-45db-a16f-010d58c8e121":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key from Raccoon AI","scopes":[]}}},"servers":{"92c008f3-0158-4616-95a8-d31a1ac1027a":{"url":"https://api.raccoonai.tech","description":"Production API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"API key from Raccoon AI","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API key from Raccoon AI","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"raccoonai","siteName":"Raccoon AI","title":"Start a new session/turn - Raccoon AI","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2025-12-30T17:12:57.383Z","originalFileLocation":"api-reference/sessions/start-a-new-sessionturn.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Starts a new turn in a session. If the session doesn\u0026#x27;t exist, it\u0026#x27;s created automatically. To continue an existing session, pass the same session_id from a previous turn. To start a fresh session, generate a new UUID for session_id. After calling this endpoint, connect to the WebSocket at /ws/sessions/{sessionId} to receive real-time execution updates.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Raccoon AI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Start a new session/turn - Raccoon AI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Starts a new turn in a session. If the session doesn\u0026#x27;t exist, it\u0026#x27;s created automatically. To continue an existing session, pass the same session_id from a previous turn. To start a fresh session, generate a new UUID for session_id. After calling this endpoint, connect to the WebSocket at /ws/sessions/{sessionId} to receive real-time execution updates.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Raccoon AI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://raccoonai.mintlify.site/_mintlify/api/og/v2?division=Sessions\u0026amp;title=Start+a+new+session%2Fturn\u0026amp;description=Starts+a+new+turn+in+a+session.+If+the+session+doesn%27t+exist%2C+it%27s+created+automatically.%0A%0ATo+continue+an+existing+session%2C+pass+the+same+%60session_id%60+from+a+pr\u0026amp;theme=d57e0520ef8de06f0110cfd5\u0026amp;signature=f4225385fd0aafbfe01440ff277e51ca5e18d6e1716f06a0f7e9a76ef18e4817\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Start a new session/turn - Raccoon AI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Starts a new turn in a session. If the session doesn\u0026#x27;t exist, it\u0026#x27;s created automatically. To continue an existing session, pass the same session_id from a previous turn. To start a fresh session, generate a new UUID for session_id. After calling this endpoint, connect to the WebSocket at /ws/sessions/{sessionId} to receive real-time execution updates.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://raccoonai.mintlify.site/_mintlify/api/og/v2?division=Sessions\u0026amp;title=Start+a+new+session%2Fturn\u0026amp;description=Starts+a+new+turn+in+a+session.+If+the+session+doesn%27t+exist%2C+it%27s+created+automatically.%0A%0ATo+continue+an+existing+session%2C+pass+the+same+%60session_id%60+from+a+pr\u0026amp;theme=d57e0520ef8de06f0110cfd5\u0026amp;signature=f4225385fd0aafbfe01440ff277e51ca5e18d6e1716f06a0f7e9a76ef18e4817\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/raccoonai/s1y47Ufva5eBuJPW/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Raccoon AI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6064f0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/sessions/start-a-new-sessionturn.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.raccoonai.tech/#organization\",\"name\":\"Raccoon AI\",\"url\":\"https://docs.raccoonai.tech\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/raccoonai/6qveMvQV51xorDrx/logo/light.png?fit=max\u0026auto=format\u0026n=6qveMvQV51xorDrx\u0026q=85\u0026s=8802ca0ad19e5d93df81b39bfc07d1d5\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.raccoonai.tech#website\",\"name\":\"Raccoon AI\",\"url\":\"https://docs.raccoonai.tech\",\"publisher\":{\"@id\":\"https://docs.raccoonai.tech/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn#webpage\",\"url\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn\",\"name\":\"Start a new session/turn\",\"description\":\"Starts a new turn in a session. If the session doesn't exist, it's created automatically. To continue an existing session, pass the same session_id from a previous turn. To start a fresh session, generate a new UUID for session_id. After calling this endpoint, connect to the WebSocket at /ws/sessions/{sessionId} to receive real-time execution updates.\",\"dateModified\":\"2025-12-30T17:12:57.383Z\",\"isPartOf\":{\"@id\":\"https://docs.raccoonai.tech#website\"},\"breadcrumb\":{\"@id\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Raccoon AI\",\"item\":\"https://docs.raccoonai.tech\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Start a new session/turn\",\"item\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn#apireference\",\"headline\":\"Start a new session/turn\",\"name\":\"Start a new session/turn\",\"description\":\"Starts a new turn in a session. If the session doesn't exist, it's created automatically. To continue an existing session, pass the same session_id from a previous turn. To start a fresh session, generate a new UUID for session_id. After calling this endpoint, connect to the WebSocket at /ws/sessions/{sessionId} to receive real-time execution updates.\",\"url\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn\",\"mainEntityOfPage\":{\"@id\":\"https://docs.raccoonai.tech/api-reference/sessions/start-a-new-sessionturn#webpage\"},\"dateModified\":\"2025-12-30T17:12:57.383Z\",\"publisher\":{\"@id\":\"https://docs.raccoonai.tech/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.raccoonai.tech#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Raccoon AI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Raccoon AI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/sessions/start-a-new-sessionturn.md","siteName":"Raccoon AI","nav":{"global":{"anchors":[{"anchor":"Community","icon":"users","href":"https://discord.gg/zyyhttSfC4"},{"anchor":"Support","icon":"life-buoy","href":"mailto:team@raccoonai.tech"},{"anchor":"API Status","icon":"activity","href":"https://status.raccoonai.tech"}]},"groups":[{"group":"Overview","pages":[{"title":"Raccoon AI Agents API","sidebarTitle":"Overview","icon":"house","href":"/api-reference/overview"},{"title":"Authentication","icon":"lock","description":"How to authenticate with the Raccoon AI Agents API","href":"/api-reference/authentication"}]},{"group":"Sessions","pages":[{"title":"Start a new session/turn","deprecated":null,"version":null,"openapi":"openapi.yaml post /sessions/new","href":"/api-reference/sessions/start-a-new-sessionturn"},{"title":"Stream a session","asyncapi":"asyncapi.yaml session","description":null,"href":"/api-reference/streaming"},{"title":"List sessions","deprecated":null,"version":null,"openapi":"openapi.yaml get /sessions","href":"/api-reference/sessions/list-sessions"},{"title":"Get session history","deprecated":null,"version":null,"openapi":"openapi.yaml get /sessions/{sessionId}","href":"/api-reference/sessions/get-session-history"},{"title":"Update session title","deprecated":null,"version":null,"openapi":"openapi.yaml put /sessions/{sessionId}/title","href":"/api-reference/sessions/update-session-title"},{"title":"Delete a session","deprecated":null,"version":null,"openapi":"openapi.yaml delete /sessions/{sessionId}","href":"/api-reference/sessions/delete-a-session"}]},{"group":"Media","pages":[{"title":"Upload a file","deprecated":null,"version":null,"openapi":"openapi.yaml put /media/upload","href":"/api-reference/media/upload-a-file"}]}]},"basePath":"","title":"Start a new session/turn - Raccoon AI","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-CybtLBIt.js","utils-BMLj2fvV.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-B6In562Y.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Dr8Mfhp9.js","snippetPresets-2rmQvMVl.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-C4GwDT3_.js","ApiExamples-WMqJYdZj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CJ-MlPHu.js","shallow-dY3TMRCk.js","getApiPlaygroundDisplay-v-1B2bKm.js","CodeSnippet-BDhiTB7U.js","CodeSnippets-D9hnzQcS.js","getPastedJson-Th2V45jI.js","icon-BQXch1W9.js","MethodPill-BCqUneP3.js","DuplicateIcon-Q_-bhurZ.js","createIcon-DUjLHRqp.js","DynamicMarkdown-B-f2cqXQ.js","SectionHeading-Da5NsV4v.js","axios-vUo_bRtp.js","Markdown-D13FWkIM.js","clsx-D3Isdib3.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-C-XZBk9h.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink--qIqmmVG.js"]}