API Quick Reference
Base URL: https://api.bankr.bot
Authentication: Include your API key in the X-API-Key header with every request.
X-API-Key: bk_YOUR_KEYEndpoints
Section titled “Endpoints”| Method | Path | Description |
|---|---|---|
POST | /agent/prompt | Submit a natural language prompt |
GET | /agent/job/:jobId | Poll job status |
DELETE | /agent/job/:jobId | Cancel a job |
GET | /agent/user | Get user info and wallet addresses |
POST | /agent/sign | Sign messages (personal_sign, typed data, transactions) |
POST | /agent/submit | Submit raw transactions without AI processing |
Quick Examples
Section titled “Quick Examples”Submit a Prompt
Section titled “Submit a Prompt”curl -X POST https://api.bankr.bot/agent/prompt \ -H "X-API-Key: bk_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt": "What is my balance on Base?"}'Returns a jobId that you can poll for results.
Poll a Job
Section titled “Poll a Job”curl https://api.bankr.bot/agent/job/JOB_ID \ -H "X-API-Key: bk_YOUR_KEY"Returns the current status and result of the job.
Cancel a Job
Section titled “Cancel a Job”curl -X DELETE https://api.bankr.bot/agent/job/JOB_ID \ -H "X-API-Key: bk_YOUR_KEY"Cancels a pending or processing job.
Get User Info
Section titled “Get User Info”curl https://api.bankr.bot/agent/user \ -H "X-API-Key: bk_YOUR_KEY"Returns your user profile and all associated wallet addresses.
Sign a Message
Section titled “Sign a Message”curl -X POST https://api.bankr.bot/agent/sign \ -H "X-API-Key: bk_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"type": "personal_sign", "message": "Hello!"}'Supports personal_sign, typed data signing, and transaction signing.
Submit a Raw Transaction
Section titled “Submit a Raw Transaction”curl -X POST https://api.bankr.bot/agent/submit \ -H "X-API-Key: bk_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"transaction": {"to": "0x...", "data": "0x...", "value": "0x0", "chainId": 8453}, "waitForConfirmation": true}'Submits a pre-built transaction directly to the chain without AI processing. Set waitForConfirmation to true to wait for the transaction to be confirmed before the response returns.
SDK Equivalents
Section titled “SDK Equivalents”If you are using the official TypeScript SDK (@bankr/sdk), these are the corresponding methods:
| API Endpoint | SDK Method |
|---|---|
POST /agent/prompt | client.prompt() |
POST /agent/prompt + GET /agent/job | client.promptAndWait() |
GET /agent/job/:jobId | client.pollJob() |
The SDK handles polling automatically with promptAndWait(), which submits a prompt and waits for the job to reach a terminal state before returning.
Job States
Section titled “Job States”Every job follows this lifecycle:
pending → processing → completed / failed / cancelled- pending — The job has been created and is waiting to be picked up.
- processing — The agent is actively working on the job.
- completed — The job finished successfully. The result is available in the response.
- failed — The job encountered an error. Check the error field for details.
- cancelled — The job was cancelled via
DELETE /agent/job/:jobId.
Detailed Endpoint Documentation
Section titled “Detailed Endpoint Documentation”For full request/response schemas, error codes, and advanced usage, see the individual endpoint pages:
- Submit a Prompt —
POST /agent/prompt - Poll Job Status —
GET /agent/job/:jobId - Cancel a Job —
DELETE /agent/job/:jobId - Get User Info —
GET /agent/user - Sign Messages —
POST /agent/sign - Submit Transactions —
POST /agent/submit