Skip to Content
aiMermaid
API

Errors

Every error code of the aiMermaid API, what it means in plain words, and what to do about it.

When a call fails, the API answers with a JSON problem. It always has code, title, status and docs (a link to the explanation). Most errors also have detail (what exactly went wrong) and fix (what to change). retryable: true means the same call may work later.

In a batch, at names the operation that failed, and errors lists any further problems.

The anchors on this page (for example #error-plan_limit) are the same as in Swagger.

Access and keys

unauthorized (401)

The API key is missing, wrong, expired or revoked. Send Authorization: Bearer amk_live_… with an active key. Create a new key on the API page if needed.

insufficient_scope (403)

The key may not do this, for example a Read-only key tried to change a project. Use a key with the All scope.

api_not_approved (403)

API access is not approved for this account yet. Ask for access in Settings, API access, and wait for the decision.

pro_required (403)

The API needs the PRO plan. Your keys are paused, not deleted, and work again with PRO.

You have not accepted the current Terms. Sign in to the editor and accept them.

target_gone (403)

The key was limited to one folder or one project, and that folder or project was deleted for good. Revoke the key and create a new one.

not_found (404)

There is no such project, folder or item, or it is outside what this key may reach. Check the id. GET /v1/capabilities shows what the key may reach (key.reach).

method_not_allowed (405)

This address does not take this method (for example PUT where only GET works). Check the reference.

The request itself

invalid_json (400)

The body is not valid JSON. Check quotes, commas and brackets.

invalid_request (400)

The request does not have the expected shape. Read detail and compare with the reference page of the call.

unknown_operation (400)

An op in the batch does not exist. Check the spelling. GET /v1/capabilities lists every operation.

unknown_id (400)

An id or as name in the batch does not exist on this level. Read the brief again for the right ids.

unknown_field (400)

A field is not part of this operation or call. Remove it, or check its spelling.

missing_field (400)

A required field is missing. detail names it.

invalid_field (400)

A field has a value that is not allowed (wrong type, too long, out of range). detail says which and why.

payload_too_large (413)

The request or the result is too big. For a ZIP bundle over 50 MB, export format=json and download the files one by one from the brief. See export a ZIP or SVG.

Batches and levels

batch_failed (422)

The batch was not applied. Nothing was saved. at and errors say which operations failed. Fix them and send the whole batch again. Use dry_run=true to check first.

version_conflict (409)

The project changed since you read it (your expect_version is old). Read the project again, then send your change again.

no_level (422)

You asked for the level below a step that has none. Add one with add_sub_process, or pick another step.

level_exists (422)

That step already has a level below it. Add steps into it with "in": "<step>".

depth_limit (422)

The project would have more nested levels than your plan allows. See Free and PRO.

nothing_to_draw (422)

The level you asked to export as SVG has no steps. Pick another level, or add steps first.

self_connection (422)

An arrow cannot go from a block to the same block. Pick a different target.

different_levels (422)

The items are on different levels, so they cannot be connected, grouped or placed next to each other. Use items of the same level.

duplicate_name (422)

The same as name is used twice in one batch. Give each new item its own name.

invalid_mermaid (422)

The text is not a Mermaid flowchart aiMermaid can read. aiMermaid reads flowcharts only.

unsafe_content (422)

A note, label or text file breaks a content rule (hidden characters, instructions to an AI, scripts, long encoded blocks). reasons names the rule. Remove the flagged parts. Details: content rules.

engine_unavailable (503)

The layout engine could not run. Try again in a moment.

Files

unsupported_file_type (415)

This file type is not accepted. The answer lists accepted. See supported file types.

invalid_file (422)

The file content does not match its name ending, for example a .png that is not a PNG. reason, expected and detected say more. Send the real file.

upload_not_ready (409)

The upload is not finished. Call .../complete before you attach the file.

upload_expired (410)

The 15-minute upload window closed. Start the upload again.

unknown_upload (422)

There is no such upload in this project. Check the upload_id and the project id.

already_attached (422)

This upload is already attached.

attachment_missing (422)

An attached file is missing from storage, so the ZIP cannot be complete. missing lists the files. Remove them with remove_attachment or upload them again.

Limits

plan_limit (403)

A plan limit would be passed. limit says which one (for files: file_size, project_files, project_bytes or account_storage), with max, used and size. Free some room, or stay under the limit. See Free and PRO.

rate_limited (429)

Too many requests in a short time. Wait for the time in the Retry-After header, then try again.

quota_exceeded (429)

The daily quota is used up. It resets at midnight UTC. The API page of your account shows your usage.

server_error (500)

Something went wrong on our side. Try again later. If it keeps happening, tell us.

On this page