メインコンテンツへスキップ
POST
/
v1
/
sessions
Create a new session
curl --request POST \
  --url https://api.devin.ai/v1/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "idempotent": false,
  "knowledge_ids": [
    "<string>"
  ],
  "max_acu_limit": 1,
  "playbook_id": "<string>",
  "secret_ids": [
    "<string>"
  ],
  "snapshot_id": "<string>",
  "tags": [
    "<string>"
  ],
  "title": "<string>",
  "unlisted": false
}
'
{
  "session_id": "<string>",
  "url": "<string>",
  "is_new_session": true
}

Authorizations

Authorization
string
header
required

Personal API Key (apk_user_) or Service API Key (apk_)

Body

application/json
prompt
string
required
idempotent
boolean
default:false
knowledge_ids
string[] | null

List of knowledge IDs to use. If None, use all knowledge. If empty list, use no knowledge.

max_acu_limit
integer | null

Maximum ACU limit, must be positive

必須範囲: x > 0
playbook_id
string | null
secret_ids
string[] | null

List of secret IDs to use. If None, use all secrets. If empty list, use no secrets.

snapshot_id
string | null
tags
string[] | null

List of tags to add to the session.

title
string | null

Custom title for the session. If None, a title will be generated automatically.

unlisted
boolean
default:false

Response

Successful Response

Response body returned when a session is successfully created.

session_id
string
required
url
string
required
is_new_session
boolean | null