Create Thread
POST
/api/threads
const url = 'http://localhost:8000/api/threads';const options = { method: 'POST', headers: { cookie: 'factory_session=<factory_session>', 'Content-Type': 'application/json' }, body: '{"project_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","prompt":"example","mode":"low","environment":"daytona","size":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8000/api/threads \ --header 'Content-Type: application/json' \ --cookie factory_session=<factory_session> \ --data '{ "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "prompt": "example", "mode": "low", "environment": "daytona", "size": "example" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Response Create Thread Api Threads Post
object
key
additional properties
any
Example generated
{}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}