跳转到主要内容
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": "Review the pull request at https://github.com/example/repo/pull/123",
  "idempotent": true
}'
{
  "session_id": "devin-xxx",
  "url": "https://app.devin.ai/sessions/xxx",
  "is_new_session": true
}

Authorizations

Authorization
string
header
required

Body

application/json
prompt
string
required
snapshot_id
string | null
unlisted
boolean | null
idempotent
boolean | null
max_acu_limit
integer | null
secret_ids
string[] | null
knowledge_ids
string[] | null
tags
string[] | null
title
string | null

Response

session_id
string
required
url
string
required
is_new_session
boolean