apicheats.dev Cheat sheet Raw .md
POST

Try POST /v1/sessions — Claude API

Claude playground

Create Session

Credentials

Kept in this tab only. Requests go through apicheats.dev's same-origin proxy straight to api.anthropic.com; the proxy stores and logs nothing about them.

Headers

Body application/json

8 body fields
  • agent · required · string — Agent identifier. Accepts the `agent` ID string, which pins the latest version for the session, or an `agent` object with both id and version specified.
  • environment_id · required · string — ID of the `environment` defining the container configuration for this session.
  • title · optional · string — Human-readable session title.
  • metadata · optional · object — Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
  • resources · optional · object[] — Resources (e.g. repositories, files) to mount into the session's container.
  • vault_ids · optional · string[] — Vault IDs for stored credentials the agent can use during the session.
  • initial_events · optional · object[] — Initial events to send to the `session` at creation, processed in order. Supports `user.message` and `user.define_outcome` events. Maximum 50 events.
  • budget · optional · object — Enforced spend ceiling for the session. Omit to create an uncapped session. Every model the session can run — the agent's model and each callable agent's model — must have a public list price, or the request is rejected with reason `model_not_budgetable`.