F Fin / Overview v1 Guides OpenAPI
API v1

Build on an agent that holds
the user's funds.

Fin runs an agent for each of your users: it reads their portfolio, answers questions, and executes what they approve. Your backend calls it with your partner key and the user's own token, and nothing moves money until that user has approved the exact terms.

Quickstart

  1. AuthenticateSend your key as X-Api-Key and the user's token as Authorization. Neither works alone.
  2. Provision the accountOne idempotent POST /v1/users. It is the only call an unprovisioned identity may make.
  3. Open a conversation and start a runA run is accepted with 202 and works in the background.
  4. Follow the journalStream the conversation, and answer any approval.opened the run parks.
# 1. provision (idempotent)
curl -X POST $FIN/v1/users \
  -H "X-Api-Key: $KEY" -H "Authorization: Bearer $TOKEN" \
  -H 'content-type: application/json' -d '{}'

# 2. open a conversation
curl -X POST $FIN/v1/users/$USER/sessions ... \
  -d '{"title":"Portfolio check"}'

# 3. ask for something
curl -X POST $FIN/v1/users/$USER/sessions/$SESSION/runs ... \
  -d '{"text":"What is my USDC balance?"}'

# 4. follow it live
curl -N $FIN/v1/users/$USER/sessions/$SESSION/stream ... \
  -H 'accept: text/event-stream'

Before you build

Browse by resource

Guides