Developer help
Public API
A single JSON endpoint for using FlashBoards accounts, boards, model discovery, and generation from your own server with an API key.
Quickstart
Create a key, make a read-only request, then discover the operations available to you.
Get a key
Create and revoke keys in Settings → Developer. The full key is shown once. Keep it on a server: this API is headless, sends no CORS headers, and a key in browser code is a key you have given away.
Open FlashBoards panelCall an operation
POST the operation name and its input. Operations that take no arguments can be called with the name alone.
- Method
- GET / POST
- Endpoint
- https://flashboards.yaroflasher.com/api/v1/operations
- Auth
- Authorization: Bearer fb_sk_…
curl -X POST https://flashboards.yaroflasher.com/api/v1/operations \
-H "Authorization: Bearer ${FLASHBOARDS_API_KEY}" \
-H "Content-Type: application/json" \
-d '{"operation":"get_account"}'Discover what is available
GET the same URL for the current operations, each with a title, a description, and a JSON Schema for its input. Discovery is authenticated like any other call.
- The published schemas are advisory, not complete. Cross-field rules and count limits are enforced when the request is parsed, not described in the schema — a request that satisfies the schema can still be rejected.
- Unknown input keys are removed rather than refused, so the schemas do not forbid extra properties.
Read the response
Every accepted call answers 200 with { ok, operation, result }. ok is a transport-level flag: it mirrors whether the operation reported itself as failed.
ok: truedoes not always mean the work succeeded.generate_on_boardreports rejected and indeterminate outcomes as ordinary results — always readresult.statusfor it.- Business failures stay 200. Only transport problems use other codes: 401 for a bad key, 415 for a wrong content type, 400 for a malformed or oversized body, 429 when the rate limit is hit, 503 when the service is briefly unavailable, and 500 for an unexpected internal failure.
- The rate limit applies per account. A 429 carries Retry-After.
Spending money safely
Paid operations have two rules that matter more than the rest.
generate_imageandgenerate_videorequiregenerationAttemptId. Reusing the same value is what makes a retry safe — retrying with a NEW value starts a second paid attempt.- If a start returns
SUBMISSION_INDETERMINATE(withok: false), orgenerate_on_boardreturnsindeterminate_after_claim(withok: true), the attempt may already have been charged. Do not retry. The attempt is recorded on our side for reconciliation. - Generation uses the quoted price and your available balance or subscription access. Where a model accepts maxCostUsd, you can set your own per-call budget.
- Call
estimate_generation_costfirst when you want the price before committing.
Full reference
Explore operation names, examples, board requirements, and limits when you need them.
Browse operations and advanced topics
Operations
Authenticated GET to the endpoint returns the current list and input schemas.
- get_account
- list_shared_boards
- get_shared_board_snapshot
- create_media_operation
- get_media_operation
- cancel_media_operation
- retry_media_operation
- list_generation_models
- estimate_generation_cost
- generate_image
- generate_video
- get_generation
- list_recoverable_generations
- search_references
- search_references_by_image
- get_reference_preview
- prepare_board_generation
- generate_on_board
- list_board_sessions
- get_board_snapshot
- export_board_image
- add_media_to_board
- describe_board_action
- execute_board_action
- publish_board
- unpublish_board
- update_board_access
Customize reusable local-board behavior
Read the shared flashboards-sdk guide at /skills/flashboards-sdk/SKILL.md. Use execute_board_action with action: "extensionsRequest", args equal to the discovered ExtensionOperation, and the current outer expectedBoardId. Format-2 panels are optional views; format-1 toolbars use a separate flow.
- Use live describe sections for schemas and availability. This requires an eligible open local-board browser owner and human Settings consent for writes. Inspect the full result and board after mutations; never automatically replay unknown or applied/pending outcomes.
Edit several text notes on one board
Call execute_board_action with action: "updateTextNotes" after reading the current active local board with "queryBoardItems". Supply that read's boardId and revision as expectedRevision, plus 1–100 unique explicit {id,changes} entries. Each changes object uses the same fields as updateTextNote; null clears optional title and style overrides.
- The full batch request is limited to 64 KiB UTF-8 JSON. Every target and patch is checked before one Undo step is made. The receipt returns exact changedItemIds and unchangedItemIds, beforeRevision, revision, and save:pending for changed content; pending does not confirm durable storage. An all-no-op batch returns save:unchanged. A refusal changes nothing and should be followed by a fresh query before retrying.
Search reference images by prompt
search_references searches the private reference catalog without an open board or browser session. API/MCP reference search and previews are available to all active authenticated accounts. The editor UI and its browser routes remain admin/tester-only. Results contain ranked display metadata and short-lived opaque handles, not source URLs or originals.
{"operation":"search_references","input":{"query":"brutalist concrete museum at dusk","limit":12}}- Request envelope: query 1–1,024 characters and limit 1–100, default 20. The current catalog's advertised query/result ceilings can be lower and are enforced. A returned nextCursor may be sent back with the same query; no other pagination behavior is promised.
- Search and preview allowances are aggregate per account across Website, API and MCP. A transport switch does not create another catalog quota.
Search references using image bytes
search_references_by_image accepts the same prepared-image base64 format used by the Website. It does not accept paths or remote URLs.
{"operation":"search_references_by_image","input":{"imageBase64":"iVBORw0KGgo...","limit":12,"colorMatch":false}}- JPEG, PNG or WebP only; canonical base64; at most 327,680 decoded bytes, 16,384 pixels per edge and 40 megapixels. MIME signature and dimensions are validated before search.
- Request envelope: limit 1–50, default 20. The current catalog's advertised byte/result ceilings can be lower and are enforced. colorMatch works only when that catalog advertises the capability. Continue image results only by resending the same bytes and returned cursor.
Download one reference preview
Pass a selected result's previewHandle to get_reference_preview. The API result adds authenticated base64 bytes to the preview metadata; decode result.base64 using result.mimeType. MCP returns the same metadata plus a native image content block. When HTTPS delivery is configured, metadata also includes a signed previewUrl and previewUrlExpiresAt (Unix milliseconds).
{"operation":"get_reference_preview","input":{"previewHandle":"OPAQUE_HANDLE_FROM_SEARCH"}}- API previews are fetched on demand as JPEG, PNG or WebP. MCP also supports explicitly advertised alternate AVIF previews; the API answers
alternatePreviewAvifHandlewithREFERENCE_UNSUPPORTED. Search never eagerly downloads every result. - Handles are short-lived and bound to the exact verified browser session, API key, or OAuth client consent that created them. A stale, altered, revoked or differently bound handle must be replaced by a fresh search.
- The preview URL is a separate 24-hour bearer sharing grant: anyone with it can read that preview without cookies, even after the source handle expires or the issuing connection is revoked. It cannot renew itself or grant originals. Delivery still requires the current catalog and shares the issuer's per-account preview quota.
- Embed previewUrl only where the chat supports image URLs; a link cannot force inline rendering. Native bytes remain available if the optional URL is omitted (previewUrlOmittedReason: unavailable). Never treat these links as permanent storage or publish private source URLs.
- Safe failures use
REFERENCE_ACCESS_DENIED,REFERENCE_RATE_LIMITED,REFERENCE_STALE,REFERENCE_UNSUPPORTEDorREFERENCE_UNAVAILABLE; private URLs and upstream error details are not returned.
Export a board image
Use export_board_image with a live updated FlashBoards tab. First read get_board_snapshot, then pass expectedBoardId and sessionId. scope defaults to selection; pass itemIds for an explicit selection or scope: board for all items. The board is not modified.
{"operation":"export_board_image","input":{"expectedBoardId":"BOARD_ID","sessionId":"SESSION_ID","itemIds":["IMAGE_ID","TEXT_ID","ARROW_ID"],"scale":2,"background":"#ffffff","region":{"x":0,"y":0,"width":1200,"height":800}}}- scale: 0.1–4 pixels per board unit; padding: 0–1024 board units; background: transparent or #RRGGBB.
- region: {x, y, width, height} uses board coordinates. Use the same region, scale and background for Figma comparison.
- Supports static PNG/JPEG/WebP images, text, drawings and arrows. Missing assets, unavailable custom fonts and unsupported media fail explicitly.
- Limits: 256 items, 8192 pixels per edge, 16 megapixels, 8 MiB PNG. The REST result contains bounds, itemIds, scale, pixel dimensions, mimeType and base64. Decode result.base64 to save a PNG. MCP returns the same metadata plus a native image content block.
Use a local reference image
generate_image can accept one explicitly approved local image in referenceImages. This is part of the same generation call: it does not require a board, an open tab, or a separate upload operation.
{
"operation": "generate_image",
"input": {
"prompt": "Describe the requested edit",
"model": "nano-banana-2",
"resolution": "1k",
"generationAttemptId": "attempt-local-reference-1",
"referenceImages": [
{
"filename": "reference.png",
"dataUrl": "data:image/png;base64,..."
}
]
}
}- The attachment must be a supported image MIME type encoded as a bounded base64 data URL. Send the image bytes only after the user has approved that attachment; do not send a local filesystem path.
- MCP host note: on ChatGPT MCP hosts that support file inputs, pass the host-provided imageFile to generate_image, or imageFile/videoFile/referenceVideos to compatible Seedance generate_video models. When forwarding is unavailable in an MCP App host, the MCP-only show_media_upload_picker lets the user select and explicitly upload a bounded file; use its opaque receipt in referenceVideoReceipts or referenceImageReceipts for generate_video, or pass one image receipt in referenceImageReceipts to a compatible generate_image model. describe_media accepts one host file instead of mediaDataUrl. These direct paths need no open board; validate_chat_media checks a file without uploading or starting a paid action.
- FlashBoards stores the input temporarily and passes its short-lived signed URL into the generation. The upload handle is not a separate public resource and is not returned in the generation result.
imageUrlsremains supported. Forgenerate_video, Seedance accepts onereferenceImagesattachment or onereferencePreviewHandle, alongside model-supportedimageUrls. The caller must be able to provide the actual image bytes; a local path alone is insufficient. MiniMax H3 Max Reference to Video takes your own image results asreferenceGenerationIdsand catalog previews asreferencePreviewHandles(read on the server; signed result links do not work inreferenceImageUrls), andestimate_generation_costprices them the same way. H3 Max takes one of your image results asfirstFrameUrl. Other MiniMax attached images use the board path:add_media_to_board(dataUrl or referencePreviewHandle), thenprepare_board_generationwith the returneditemIdand discovered model slot, thengenerate_on_boardafter normal consent.- For multi-reference edit models (GPT Image 2.5, Seedream, Grok Imagine Image 2),
generate_imagetakes your own completed images asreferenceGenerationIdsand search previews asreferencePreviewHandles; the server reads them, so signed links are not needed. Other models: add the preview to a board and use the model's native board slot.add_media_to_boardaccepts an encoded MP4 data URL up to 10 MiB; the client must have its bytes. Preview handles grant the preview rendition only, never the catalog original.
Recover a generation after losing its ID
Call list_recoverable_generations to find your recent recoverable generations and receive a fresh generationId for each. Then call get_generation with that ID for one status/result check.
- The list covers the last 48 hours and never starts, refreshes, or charges a generation.
- Only generations supported by the current Public API model catalog are returned. The response never exposes provider task IDs or internal database IDs.
Working with a board
The board operations act on a FlashBoards tab that is open and signed in. With no live tab they return an error saying so; list_board_sessions reports an empty list.
Need the entire guide in one file? Read the Markdown reference.