TRUFLATION / DEVELOPER PREVIEW

Build with Truman

Call your saved agents, run research and work with your results through one API. Requests use your approved access and shared Truman credit balance.

Staging preview. Access must be approved for your account. Existing keys do not gain new permissions automatically.

Connect with MCP

Use your Truman API key with an MCP client that supports Streamable HTTP and custom authorization headers. No local Truman server is required. The same approved agents, permissions, research limits and credit balance apply.

https://staging.truflation.com/truman/v1/mcp

For direct transport access, including all MCP protocol headers, use:

https://truman-external-api-staging-staging.up.railway.app/truman/v1/mcp

Claude Code

Set TRUMAN_API_KEY privately in your local environment, then register the server:

claude mcp add --transport http --scope local truman \
  https://staging.truflation.com/truman/v1/mcp \
  --header "Authorization: Bearer $TRUMAN_API_KEY"

claude mcp list

The client stores its connection configuration locally. Protect that configuration as a credential; never commit it or paste the key into chat. Revoke the key from Account → Truman API when finished.

Try it

The server exposes 15 tools and 72 reviewed workflow actions. Start with truman_workflows for current permissions and prices, then truman_actions and truman_action_schema. Research returns an operation ID; status/result reads do not submit another paid job. Keep the same session for follow-ups and corrections, and reuse the same idempotency key only when retrying the same intended submission.

Downloads return a verified hash, MIME type and authenticated API link. Files up to 256 KiB also include their bytes as base64. Larger files use the same API key in the download header, never in the URL. MCP uploads support up to 256 KiB; use the HTTP API for larger transfers.

This preview uses API keys, not browser-based OAuth. Disconnecting the MCP client does not cancel durable research. Wallet payments, signup-free access and trading-runbook integration are separate follow-ups.

Call your saved agent

1. Approve access and create a key

Sign in to staging and open Account → Truman API. Review the client access offered to your account, approve it, then create a key under that approved access. For this example, choose access that includes saved agents, research and workspace creation. If none is offered, ask your team to enable a staging access template for your account.

Copy the key once and keep it in an environment variable on your server or local machine. Never put it in browser code, a URL, source control or a chat message. Rotate and revoke keys from the same account page.

# Use the origin hosting this page. On the website staging domain:
export TRUMAN_BASE="https://staging.truflation.com/truman/v1"
# Read your key without adding it to shell history (bash/zsh).
read -s TRUMAN_API_KEY
export TRUMAN_API_KEY

2. Check access and list agents

curl --fail-with-body "$TRUMAN_BASE/workflows" \
  -H "Authorization: Bearer $TRUMAN_API_KEY"
curl --fail-with-body "$TRUMAN_BASE/agents?limit=20" \
  -H "Authorization: Bearer $TRUMAN_API_KEY"

Choose an active agent from items; use its agent_id. Lists return next_cursor when another page exists. Create or edit your agent in the website first. The API currently lists and invokes saved agents; it does not create agent profiles.

3. Create a conversation for that agent

export AGENT_ID="replace-with-an-agent-id"
curl --fail-with-body -X POST "$TRUMAN_BASE/agents/$AGENT_ID/sessions" \
  -H "Authorization: Bearer $TRUMAN_API_KEY" \
  -H "Idempotency-Key: my-agent-chat-001"

This request has no body. Use the returned session_id below. Creating a new agent conversation requires access to all work owned by your personal account; grants limited to selected resources can use approved existing conversations.

4. Ask a question

export SESSION_ID="replace-with-the-session-id"
curl --fail-with-body -X POST "$TRUMAN_BASE/sessions/$SESSION_ID/research" \
  -H "Authorization: Bearer $TRUMAN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: my-agent-question-001" \
  -d "{\"agent_id\":\"$AGENT_ID\",\"objective\":\"Introduce yourself and explain how you can help with inflation research.\",\"effort\":\"medium\"}"

202 Accepted returns an operation_id, status_url and result_url. These URLs are relative to the origin, not to TRUMAN_BASE. Follow Location and Retry-After; an accepted job is not a finished answer. Research consumes credits even for a simple greeting.

5. Read progress, then the result

export OPERATION_ID="replace-with-the-operation-id"
curl --fail-with-body "$TRUMAN_BASE/sessions/$SESSION_ID/research/$OPERATION_ID" \
  -H "Authorization: Bearer $TRUMAN_API_KEY"
curl --fail-with-body "$TRUMAN_BASE/operations/$OPERATION_ID/result" \
  -H "Authorization: Bearer $TRUMAN_API_KEY"
curl --fail-with-body "$TRUMAN_BASE/operations/$OPERATION_ID/usage" \
  -H "Authorization: Bearer $TRUMAN_API_KEY"

Read the result after status is completed or partial. Partial means the result has limits; retain those limits in your UI. Result delivery waits for credit settlement. Agent conversation history and the settled answer are projected into the website conversation.

Follow-ups, streaming and recovery

Follow-up: submit another question to the same session with the same agent_id and a new idempotency key. The agent uses bounded conversation history. An agent cannot be substituted into another agent’s conversation.

Clarifications: a waiting_user status includes a suspension with its checkpoint revision and pending interaction. POST the checkpoint_revision, interaction_id and answers to /sessions/{session_id}/research/{operation_id}/resume. Obtain the answer schema from /workflows. Partial answers and an empty answers array are supported; never manufacture a user answer or approval.

curl -N "$TRUMAN_BASE/sessions/$SESSION_ID/research/$OPERATION_ID/stream" \
  -H "Authorization: Bearer $TRUMAN_API_KEY" \
  -H "Accept: text/event-stream"

The status stream is bounded and reconnectable. Resume with Last-Event-ID. For provisional answer streaming, submit stream_answer: true and use /live/stream when offered by workflow discovery. Provisional text is not a settled final result.

Retries: retain the same idempotency key and identical request after a timeout, 429 or retryable 503. Honor Retry-After. Use a new key for new work. Never retry by changing the key after an uncertain submission.

Stop: POST /operations/{operation_id}/cancel. Cancellation is a request; a provider call already in flight may finish and used credits can still be charged. Poll the operation for its final state.

Errors return error.code, error.message, error.retryable and a request_id. Keep the request ID when reporting a problem. 401 means invalid or expired credentials; 403 means insufficient approved access; 404 can also hide an inaccessible resource; 409 indicates a state or idempotency conflict; 422 means invalid input. Do not retry these unchanged unless the underlying condition has changed.

Discover what your key can do

Use caseStart herePermission boundary
Saved agentsGET /agentsagents:read; invoking also needs agents:invoke, research and workspace scopes.
ResearchGET /workflows and GET /research/optionsInspect the returned workflow scopes and limits. Effort names are API values; medium corresponds to Balanced.
Direct toolsGET /capabilities, then GET /capabilities/{capability_ref}Use only the capability’s returned schema, required scopes and quoted policy. Tool names from the chat are not automatically public contracts.
Files and artifactsGET /sessions/{session_id}/resources; artifact jobs and upload routes belowPin input versions explicitly. Export downloads require the same bearer access; they are not public links.
Skills, memory and connected accountsGET /skills, GET /memories, GET /connectionsSelect them explicitly in the research request. A saved agent’s configuration does not automatically grant an API key access to every app, file or memory.
Schedules and sharingInspect workflow discovery and the route schemaSeparate permissions apply. Publishing and email delivery require explicit choices; staging limits remain in effect.

For saved-agent research, connected-account use must satisfy both the API consent and the agent’s own account permissions. Paused or archived agents cannot run new research. A profile edit does not change an operation already admitted.

Larger file uploads

The website gateway has Vercel’s 4.5 MB request limit. For uploads over 4 MB, use the direct staging API base below for the upload flow, with the same API key. Backend file-type, size, ownership and credit checks still apply. Download responses are streamed.

export TRUMAN_BASE="https://truman-external-api-staging-staging.up.railway.app/truman/v1"

Route reference

This list is generated from the running API. Explore and try requests in the Swagger UI reference, or download the Interactive API referenceOpenAPI schema for request and response fields. A route’s presence does not mean your key has permission to use it.

MethodPathOperation
GET/truman/v1/sourcesSources
GET/truman/v1/discoveryBrowse
POST/truman/v1/discovery/searchSearch
GET/truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/commentsGet
PUT/truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/commentsPut
GET/truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/stateGet
PUT/truman/v1/sessions/{session_id}/artifacts/{artifact_id}/blocks/{block_id}/statePut
GET/truman/v1/memoriesPage
POST/truman/v1/memoriesCreate
GET/truman/v1/memories/{memory_id}Read
PUT/truman/v1/memories/{memory_id}Edit
POST/truman/v1/memories/{memory_id}/deleteDelete
GET/truman/v1/skillsPage
POST/truman/v1/skillsCreate
GET/truman/v1/skills/{skill_id}Read
PUT/truman/v1/skills/{skill_id}Replace
GET/truman/v1/skills/{skill_id}/documentRead
POST/truman/v1/skills/{skill_id}/deleteRemove
GET/truman/v1/connectionsPage
GET/truman/v1/agentsAgents
GET/truman/v1/agents/{agent_id}Agent
GET/truman/v1/agents/{agent_id}/sessionsSessions
POST/truman/v1/agents/{agent_id}/sessionsCreate Session
GET/truman/v1/sessions/{session_id}/reports/{artifact_id}/versionsVersions
POST/truman/v1/sessions/{session_id}/documents/queryDocuments
POST/truman/v1/sessionsCreate Session
GET/truman/v1/sessionsSessions
POST/truman/v1/sessions/{session_id}/uploadsCreate Upload
GET/truman/v1/uploads/{upload_id}Upload Status
PUT/truman/v1/uploads/{upload_id}/contentUpload Content
POST/truman/v1/uploads/{upload_id}/cancelCancel Upload
DELETE/truman/v1/sessions/{session_id}/files/{artifact_id}Remove Attachment
GET/truman/v1/sessions/{session_id}/resourcesResources
GET/truman/v1/sessions/{session_id}/resources/{kind}/{artifact_id}Resource
GET/truman/v1/sessions/{session_id}/resources/{kind}/{artifact_id}/contentContent
GET/truman/v1/sessions/{session_id}/artifacts/{artifact_id}/structureStructure
POST/truman/v1/sessions/{session_id}/datasets/{artifact_id}/rowsRows
GET/truman/v1/sessions/{session_id}/datasets/{artifact_id}/exportDataset Export
POST/truman/v1/sessions/{session_id}/files/{artifact_id}/passagesPassages
POST/truman/v1/sessions/{session_id}/artifact-jobsSubmit
GET/truman/v1/artifact-jobs/{job_id}Status
POST/truman/v1/artifact-jobs/{job_id}/cancelCancel
GET/truman/v1/artifact-jobs/{job_id}/contentContent
GET/truman/v1/sessions/{session_id}/artifacts/{artifact_id}/sharesShares
POST/truman/v1/sessions/{session_id}/artifacts/{artifact_id}/shares/{share_id}/revokeRevoke
GET/truman/v1/sessions/{session_id}/runsResearch Runs
GET/truman/v1/sessions/{session_id}/runs/{run_id}Research Status
GET/truman/v1/sessions/{session_id}/runs/{run_id}/eventsResearch Events
GET/truman/v1/sessions/{session_id}/runs/{run_id}/auditsResearch Audits
GET/truman/v1/research/optionsResearch Options
POST/truman/v1/sessions/{session_id}/researchSubmit Research
GET/truman/v1/sessions/{session_id}/research/{operation_id}Research Operation
GET/truman/v1/sessions/{session_id}/research/{operation_id}/analystsResearch Analysts
GET/truman/v1/sessions/{session_id}/research/{operation_id}/streamResearch Stream
GET/truman/v1/sessions/{session_id}/research/{operation_id}/live/streamResearch Live
POST/truman/v1/sessions/{session_id}/research/{operation_id}/resumeResume Research
POST/truman/v1/sessions/{session_id}/research/{operation_id}/steerSteer Research
GET/truman/v1/usage/exportUsage Export
GET/truman/v1/alertsAlerts
DELETE/truman/v1/operations/{operation_id}/resultDelete Result
GET/truman/v1/operations/{operation_id}/resultResult
POST/truman/v1/schedulesCreate
GET/truman/v1/schedulesList Schedules
GET/truman/v1/schedules/{schedule_id}Get
PUT/truman/v1/schedules/{schedule_id}Edit
POST/truman/v1/schedules/{schedule_id}/controlControl
POST/truman/v1/schedules/{schedule_id}/openedOpened
GET/truman/v1/email-deliveries/accessAccess
POST/truman/v1/email-deliveries/previewPreview
POST/truman/v1/email-deliveriesCreate
GET/truman/v1/email-deliveries/{delivery_id}Get
POST/truman/v1/email-deliveries/{delivery_id}/cancelCancel
GET/truman/v1/account/scheduled-deliveries/{execution_id}Scheduled Delivery
GET/truman/v1/account/creditsCredits
GET/truman/v1/accountAccount
GET/truman/v1/account/reportsReports
GET/truman/v1/account/reports/{report_id}Report
GET/truman/v1/account/reports/{report_id}/pdfPdf
GET/truman/v1/workflowsWorkflows
GET/truman/v1/capabilitiesCapabilities
GET/truman/v1/capabilities/{capability_ref}Describe
POST/truman/v1/operationsSubmit
GET/truman/v1/operationsHistory
POST/truman/v1/programsProgram
GET/truman/v1/operations/{operation_id}Status
POST/truman/v1/operations/{operation_id}/cancelCancel
GET/truman/v1/operations/{operation_id}/usageUsage