Skip to main content
POST
/
sessions
Create Session
curl --request POST \
  --url https://api.example.com/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "Add rate limiting to the auth endpoints using a sliding window approach with Redis, 10 requests per minute per IP.",
  "model": "claude-opus-4-6",
  "system": "You are a helpful coding assistant."
}
'
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "title": "Add rate limiting to auth endpoints",
  "model": {
    "id": "claude-opus-4-6"
  },
  "created_at": "2026-03-06T16:00:00Z",
  "updated_at": "2026-03-06T16:00:00Z"
}

Authorizations

Authorization
string
header
required

JWT bearer token issued by fabro-web. See the Authentication guide for details.

Body

application/json

Request body for starting a new session.

content
string
required

The initial user message to start the session.

Example:

"Add rate limiting to the auth endpoints using a sliding window approach with Redis, 10 requests per minute per IP."

model
string

LLM model to use. If omitted, the server default is used.

Example:

"claude-opus-4-6"

system
string

System prompt for the session.

Example:

"You are a helpful coding assistant."

Response

201 - application/json

Session created

Response returned after successfully creating a session.

id
string<uuid>
required

Unique identifier for the newly created session.

Example:

"a1b2c3d4-e5f6-7890-abcd-ef1234567890"

title
string
required

Server-generated title for the session.

Example:

"Add rate limiting to auth endpoints"

model
object
required

Reference to a model by its identifier.

created_at
string<date-time>
required

Timestamp when the session was created.

Example:

"2026-03-06T16:00:00Z"

updated_at
string<date-time>
required

Timestamp when the session was last updated (equal to created_at at creation time).

Example:

"2026-03-06T16:00:00Z"