Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kortix-ai/suna/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Creates a new thread along with a project and sandbox environment. This endpoint automatically provisions a sandbox with VNC access for development work.In non-local environments, this endpoint enforces thread and project limits based on your account’s plan.
Request
The name for the project. Defaults to “New Project” if not provided.
Authentication
Requires a valid JWT token. The endpoint usesverify_and_get_user_id_from_jwt to authenticate the request.
cURL
Python SDK
JavaScript SDK
Response
The unique identifier for the created thread
The unique identifier for the created project
Response Example
Implementation Details
When a thread is created, the following happens automatically:- Limit Checks - Validates thread and project limits against your account plan (skipped in local environments)
- Project Creation - Creates a new project with the specified name
- Thread Creation - Creates a thread named “New Chat” within the project
- Sandbox Provisioning - Automatically creates a sandbox environment with:
- VNC access on port 6080
- Web preview on port 8080
- Unique authentication token
- Resource Linking - Links the sandbox as a resource to the project
- Cache Updates - Updates counters and metadata caches
Error Responses
Source Reference
Implementation:/workspace/source/backend/core/threads/api.py:524