Skip to main content
POST
/
chat
/
new
Start a new turn
curl --request POST \
  --url https://api.raccoonai.tech/chat/new \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "task": "<string>",
  "mode": "auto",
  "files": [
    {
      "key": "<string>",
      "name": "<string>",
      "type": "<string>",
      "size": 123
    }
  ],
  "ace_version": "fast"
}
'
{
  "task_id": "<string>",
  "workflow_id": "<string>",
  "status": "queued",
  "message": "<string>",
  "queue_position": 123,
  "user_message_id": "<string>",
  "assistant_message_id": "<string>"
}

Authorizations

Authorization
string
header
required

API key from Raccoon AI

Body

application/json
chat_id
string<uuid>
required

Session ID. Use the same ID to continue an existing session, or generate a new UUID for a fresh session.

task
string
required

Natural language description of what you want the agent to do

mode
enum<string>
required

Execution mode:

  • auto: General-purpose mode for any task
  • plan: Creates a detailed plan before execution
  • deepsearch: Optimized for web research and data analysis
  • slides: Generates presentation slides
  • code: Optimized for coding tasks
  • web: Builds web applications with live preview
Available options:
auto,
plan,
deepsearch,
slides,
code,
web
files
object[]

Files from the upload endpoint

ace_version
enum<string>

SDK version (optional)

Available options:
fast,
think

Response

Task created successfully

task_id
string

Session ID (same as the chat_id you provided). Use for WebSocket connection.

workflow_id
string

Internal workflow identifier

status
enum<string>

Initial turn status

Available options:
queued,
running
message
string

Human-readable status message

queue_position
integer

Position in queue (0 if starting immediately)

user_message_id
string

ID of the user's turn message

assistant_message_id
string

ID of the agent's response message. Use for abort endpoint.