Sections

In-paper assistant

Used by the website. These routes don't accept an API key.

POST/assistant/{paper_id}/chat

Chat

Website sign-in only
Parameters
NameInTypeDescription
paper_id *pathinteger
Request body (JSON)
FieldTypeDescription
conversation_idstring | null
historyChatTurn[]
content *string
role *"user" | "assistant"
message *string
project_idinteger | null

Response: any

curl
curl -X POST 'https://api.papervantage.com/assistant/1/chat' \
  -H "Authorization: Bearer $COGNITO_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"message":"<message>"}'

GET/assistant/actions

List Pending Actions

Website sign-in only
Parameters
NameInTypeDescription
project_idqueryinteger | null

Response: any

curl
curl 'https://api.papervantage.com/assistant/actions' \
  -H "Authorization: Bearer $COGNITO_ACCESS_TOKEN"

POST/assistant/actions/{action_id}/cancel

Cancel Action

Website sign-in only
Parameters
NameInTypeDescription
action_id *pathinteger

Response: any

curl
curl -X POST 'https://api.papervantage.com/assistant/actions/1/cancel' \
  -H "Authorization: Bearer $COGNITO_ACCESS_TOKEN"

POST/assistant/actions/{action_id}/confirm

The member's click: the only way a pending action runs. A chat reply can't do it

Website sign-in only
Parameters
NameInTypeDescription
action_id *pathinteger

Response: any

curl
curl -X POST 'https://api.papervantage.com/assistant/actions/1/confirm' \
  -H "Authorization: Bearer $COGNITO_ACCESS_TOKEN"

GET/assistant/budget

Get Budget

Website sign-in only
Response: BudgetResponse
FieldTypeDescription
byokByokBudget | null
daily_turn_limit *integer
limit_usd *number
model_label *string
provider *string
provider_name *string
resets_at *string | null
turns_today *integer
used_usd *number
enabled *boolean
is_member *boolean
limit_gbp *number
resets_at *string | null
used_gbp *number
workspace_enabledboolean
curl
curl 'https://api.papervantage.com/assistant/budget' \
  -H "Authorization: Bearer $COGNITO_ACCESS_TOKEN"

Next: Account sign-in and API keys