Developer API
Programmatic access to your Blueprint projects with scoped API keys. Only endpoints that are implemented and tested are listed as available.
Authentication#
Create a key in the Developer Console → API keys. Choose the scopes it needs; the full key is shown once and cannot be retrieved later. Blueprint stores only a SHA-256 hash of the key plus its first 12 characters, so you can recognise it in the list.
curl https://<blueprint-host>/api/credits/balance \
-H "Authorization: Bearer bp_…"- Keys act as the account that created them and see exactly what that account can see — row-level security applies to keys the same way it applies to sessions.
- Keys cannot create or manage other keys, change settings, verify payments or delete the account. Those actions require a signed-in session.
- Revoking a key takes effect immediately.
last usedis updated on every authenticated request. - API keys never carry admin rights, even when created by an admin.
Scopes#
A key can only call endpoints whose scope it holds. Calls without the scope fail with 403 INSUFFICIENT_SCOPE. Browser sessions implicitly hold every scope.
| Scope | Grants |
|---|---|
projects:read | Read projects, files and versions |
projects:write | Create and modify projects, generate, manage env vars |
generate | Run AI generation and architecture planning (spends credits) |
builds:write | Create builds and previews |
builds:read | Read build status and logs |
contracts:read | Read contracts, artifacts and scan results |
contracts:write | Generate, compile, test and scan contracts |
deployments:write | Prepare and record deployments (never signs) |
analytics:read | Read application analytics |
credits:read | Read credit balance and ledger |
Responses and errors#
Every endpoint returns JSON in one of two shapes:
{ "data": { … } }{ "error": { "code": "INSUFFICIENT_SCOPE", "message": "API key lacks scope projects:write", "details": null } }| Status | Code | When |
|---|---|---|
| 400 | BAD_REQUEST | Body is not JSON or fails validation; details holds the field errors. |
| 401 | UNAUTHENTICATED / INVALID_API_KEY | No session, or the key is unknown or revoked. |
| 402 | INSUFFICIENT_CREDITS | Not enough credits; details has bucket, needed, available. |
| 403 | FORBIDDEN / INSUFFICIENT_SCOPE / SESSION_REQUIRED | Not your resource, missing scope, or a session-only action. |
| 404 | NOT_FOUND | The resource does not exist or is not visible to you. |
| 429 | RATE_LIMITED | Too many requests in the current window. Retry after the window in the message. |
| 503 | AI_UNAVAILABLE / PAYMENTS_DISABLED | A dependency is not configured or the daily AI budget is used up. |
| 500 | INTERNAL | Unexpected failure. Details are logged server-side, never returned. |
Rate limits#
Limits are fixed windows per account (or per IP for anonymous calls) and per endpoint family — for example AI generation, payment verification and key creation each have their own budget. Exceeding one returns 429 RATE_LIMITED; other endpoints keep working.
Endpoint catalogue#
The catalogue below is rendered from Blueprint's verified endpoint registry. An endpoint is listed as available only after it was called with a real API key and returned the documented response; the examples are responses that were actually observed. Everything else in the developer API surface (component generation, contract compilation and testing, deployment preparation, analytics) is shown as planned until it passes the same check.
Endpoint catalogue
19 endpoints are verified and available; 20 more are planned or awaiting verification. An endpoint is only marked available after it was called with a real API key and returned the shape shown. Replace $HOST with this deployment's origin.
Projects
GET/api/projectsprojects:readavailable
List your projects (newest first). ?archived=1 includes archived ones. Each row includes file_count and version_count.
curl $HOST/api/projects -H "Authorization: Bearer bp_…"{ "data": [ { "id": "a151e5b4-…", "name": "API verification project copy", "network": "elysium-testnet", "visibility": "private", "status": "draft", "file_count": 0, "version_count": 0, … } ] }POST/api/projects/createprojects:writeavailable
Create a project. Body: name?, prompt?, description?, category?, network?, templateSlug?, visibility?. Does not run generation.
curl -X POST $HOST/api/projects/create -H "Authorization: Bearer bp_…" \
-H "content-type: application/json" \
-d '{"name":"API verification project","prompt":"Build a DAO voting dashboard","network":"elysium-testnet"}'{ "data": { "id": "d22813ab-c25e-4b2d-97c9-7c4f1b94077f", "name": "API verification project", "slug": "api-verification-project", "prompt": "Build a DAO voting dashboard", "framework": "React + Vite", "network": "elysium-testnet", "visibility": "private", "status": "draft", "deployment_status": "Draft", … } }GET/api/projects/:idprojects:readavailable
Retrieve one project you can see (own, public or demo). own says whether you may edit it.
curl $HOST/api/projects/d22813ab-c25e-4b2d-97c9-7c4f1b94077f -H "Authorization: Bearer bp_…"{ "data": { "id": "d22813ab-…", "name": "API verification project", "license": "All rights reserved", "current_version_id": null, "own": true, … } }PATCH/api/projects/:idprojects:writeavailable
Update metadata: name, description, category, network, visibility, remixAllowed, license.
curl -X PATCH $HOST/api/projects/d22813ab-… -H "Authorization: Bearer bp_…" \
-H "content-type: application/json" \
-d '{"description":"Created by the registry verification script"}'{ "data": { "id": "d22813ab-…", "description": "Created by the registry verification script", … } }DELETE/api/projects/:idprojects:writeavailable
Permanently delete a project you own, with its files and versions.
curl -X DELETE $HOST/api/projects/a151e5b4-… -H "Authorization: Bearer bp_…"{ "data": { "deleted": true } }POST/api/projects/:id/actionsprojects:writeavailable
{ "action": "duplicate" | "archive" | "unarchive" }. Duplicate returns the new project.
curl -X POST $HOST/api/projects/d22813ab-…/actions -H "Authorization: Bearer bp_…" \
-H "content-type: application/json" -d '{"action":"duplicate"}'{ "data": { "id": "a151e5b4-170a-4d53-aabb-ebc220501882", "name": "API verification project copy", "slug": "api-verification-project-copy", … } }GET/api/projects/:id/filesprojects:readplanned
Read a project's source files.
Not available through the Developer API yet.
GET/api/projects/:id/versionsprojects:readplanned
List version snapshots.
Not available through the Developer API yet.
POST/api/projects/:id/restoreprojects:writeplanned
Restore a previous version as a new version.
Not available through the Developer API yet.
GET/api/projects/:id/exportprojects:readplanned
Download the project as a zip (source, contracts, ABIs, env template, docs).
Not available through the Developer API yet.
Generation
GET/api/architect/plan?projectId=:idprojects:readavailable
Latest Blueprint Architect plan for a project, its history, and the credit cost of a new plan.
curl "$HOST/api/architect/plan?projectId=d22813ab-…" -H "Authorization: Bearer bp_…"{ "data": { "project": { "id": "d22813ab-…", "name": "API verification project", "network": "elysium-testnet", "own": true }, "latest": null, "history": [], "cost": 2 } }POST/api/architect/plangenerateplanned
Create an architecture plan from a prompt (spends 2 generation credits). Implemented; not yet verified with an API key because it spends credits and calls the model.
Not available through the Developer API yet.
POST/api/projects/:id/generategenerateplanned
Generate a full application from a prompt or approved plan.
Not available through the Developer API yet.
POST/api/projects/:id/modifygenerateplanned
Apply an AI modification to an existing project; returns the proposed diff.
Not available through the Developer API yet.
POST/api/projects/:id/componentsgenerateplanned
Generate a single component into a project.
Not available through the Developer API yet.
Builds
POST/api/builds/createbuilds:writeplanned
Build a project (preview or production) in the deterministic bundler.
Not available through the Developer API yet.
GET/api/builds/:id/statusbuilds:readplanned
Build status, duration, size and errors.
Not available through the Developer API yet.
GET/api/builds/:id/logsbuilds:readplanned
Build log lines.
Not available through the Developer API yet.
POST/api/previews/createbuilds:writeplanned
Create a sandboxed preview environment from a build.
Not available through the Developer API yet.
Contracts
POST/api/contracts/generatecontracts:writeplanned
Generate Solidity from a description (with tests and permission analysis).
Not available through the Developer API yet.
POST/api/contracts/compilecontracts:writeplanned
Compile a contract; returns ABI, bytecode and compiler errors.
Not available through the Developer API yet.
POST/api/contracts/testcontracts:writeplanned
Run the contract's Foundry test suite.
Not available through the Developer API yet.
POST/api/contracts/scancontracts:writeplanned
Run static security analysis (Slither) and permission analysis.
Not available through the Developer API yet.
Deployments
POST/api/deployments/preparedeployments:writeplanned
Prepare unsigned deployment data and a fee estimate. Never signs or broadcasts.
Not available through the Developer API yet.
POST/api/deployments/verifydeployments:writeplanned
Record a user-signed deployment transaction and track it to confirmation.
Not available through the Developer API yet.
Hosting
GET/api/hosting/summaryprojects:readavailable
Your hosted apps and projects that have a build.
curl $HOST/api/hosting/summary -H "Authorization: Bearer bp_…"{ "data": { "apps": [], "withBuild": [] } }GET/api/hosting/:projectIdprojects:readavailable
Hosting state for one project: app, versions, usage, availability checks.
curl $HOST/api/hosting/d22813ab-… -H "Authorization: Bearer bp_…"{ "data": { "project": { "id": "d22813ab-…", "name": "API verification project", "network": "elysium-testnet" }, "app": null, "versions": [], "usage": null, "checks": [], "customDomains": "unsupported", … } }POST/api/hosting/publishprojects:writeplanned
Build and publish a hosted version (spends 1 hosting credit). Implemented; not yet verified with an API key.
Not available through the Developer API yet.
Analytics
GET/api/applicationsanalytics:readavailable
Your applications with 30-day request counts.
curl $HOST/api/applications -H "Authorization: Bearer bp_…"{ "data": [ { "project_id": "d22813ab-…", "app_id": null, "name": "API verification project", "slug": null, "status": null, "network": "elysium-testnet", "is_demo": false, "requests30": 0 } ] }GET/api/applications/:id/analyticsanalytics:readplanned
Historical usage for one application. Implemented; not yet verified against an app with collected data.
Not available through the Developer API yet.
Credits & payments
GET/api/credits/balancecredits:readavailable
Generation and hosting credit balance, the free-tier allowance and the credit price list.
curl $HOST/api/credits/balance -H "Authorization: Bearer bp_…"{ "data": { "generation": 250, "hosting": 100, "freeTier": { "generation": 250, "hosting": 100 }, "costs": { "architectPlan": 2, "generateApp": 12, "modifyApp": 5, "fixBuild": 3, "contractGenerate": 5, "contractFix": 3, "explain": 1, "analyticsAsk": 1, "docs": 2, "hostingPublish": 1 } } }GET/api/credits/ledgercredits:readavailable
Credit transactions (newest first, ?limit=&before= paging), a daily consumption series (?days= 7–180), spend by reason and lifetime totals.
curl "$HOST/api/credits/ledger?limit=2&days=7" -H "Authorization: Bearer bp_…"{ "data": { "items": [ { "kind": "grant", "bucket": "generation", "amount": 250, "reason": "Free tier", "created_at": "2026-12-02T18:13:14.364Z", … } ], "hasMore": false, "nextBefore": null, "series": [ { "day": "2026-11-26", "generation": 0, "hosting": 0 }, … ], "byReason": [], "totals": { "granted": 350, "spent": 0, … } } }GET/api/payments/statuscredits:readavailable
Whether $BLUEPRINT payments are enabled, the configured contract and treasury (null until set), pack prices, holder thresholds and your eligibility.
curl $HOST/api/payments/status -H "Authorization: Bearer bp_…"{ "data": { "enabled": false, "tokenConfigured": false, "tokenAddress": null, "treasuryAddress": null, "network": { "key": "elysium", "chainId": 99901, … }, "reason": "Token contract not configured — $BLUEPRINT is not launched.", "packs": [ { "id": "starter", "generation": 500, "hosting": 100, "price": null }, … ], "eligibility": { "tier": "free", … } } }GET/api/payments/historycredits:readavailable
Your verified $BLUEPRINT payments.
curl $HOST/api/payments/history -H "Authorization: Bearer bp_…"{ "data": [] }POST/api/payments/verifysession onlyavailable
Verify an on-chain $BLUEPRINT transfer and credit a pack ({ txHash, network, packId }). Returns 503 PAYMENTS_DISABLED until the token contract and treasury are configured; requires a wallet session.
curl -X POST $HOST/api/payments/verify -H "Authorization: Bearer bp_…" \
-H "content-type: application/json" -d '{"txHash":"0x00","network":"elysium","packId":"starter"}'{ "error": { "code": "PAYMENTS_DISABLED", "message": "Payments disabled until the verified token contract and treasury are configured." } }Environment
GET/api/env/:projectIdprojects:readavailable
A project's environment variables: names, PUBLIC_ values, and only the last 4 characters of private values.
curl $HOST/api/env/d22813ab-… -H "Authorization: Bearer bp_…"{ "data": [ { "name": "PUBLIC_RPC_URL", "isPublic": true, "value": "https://testnet-rpc.elysium.kinetiq.xyz", "tail": null, "length": 39, … } ] }PUT/api/env/:projectIdprojects:writeavailable
Create or replace a variable { name, value }. Names starting with PUBLIC_ are inlined into builds; all others are encrypted and write-only.
curl -X PUT $HOST/api/env/d22813ab-… -H "Authorization: Bearer bp_…" \
-H "content-type: application/json" \
-d '{"name":"PUBLIC_RPC_URL","value":"https://testnet-rpc.elysium.kinetiq.xyz"}'{ "data": { "id": "2f31217b-…", "name": "PUBLIC_RPC_URL", "isPublic": true, "value": "https://testnet-rpc.elysium.kinetiq.xyz", "tail": null, "length": 39, "updatedAt": "2026-12-02T18:27:45.037Z", … } }DELETE/api/env/:projectId?name=NAMEprojects:writeavailable
Delete a variable by name.
curl -X DELETE "$HOST/api/env/d22813ab-…?name=PUBLIC_RPC_URL" -H "Authorization: Bearer bp_…"{ "data": { "deleted": true } }Search
GET/api/search?q=available
Grouped search across docs, templates, published marketplace apps and your contracts.
curl "$HOST/api/search?q=deploy" -H "Authorization: Bearer bp_…"{ "data": [ { "group": "Documentation", "items": [ { "label": "Deployments", "href": "/docs/deployments", "hint": "Docs" }, { "label": "Deployments › The deployment wizard", "href": "/docs/deployments#wizard", "hint": "Docs" }, … ] } ] }Observed errors
{ "error": { "code": "INVALID_API_KEY", "message": "API key is invalid or revoked" } }{ "error": { "code": "INSUFFICIENT_SCOPE", "message": "API key lacks scope analytics:read" } }{ "error": { "code": "SESSION_REQUIRED", "message": "Manage API keys from a signed-in session" } }