EdgazeDocsEdgaze Docs
BuilderBilling & RunsAPI ReferenceMCPLegal & TrustChangelog
DocumentationAPI Reference
Home
Getting started
API ReferenceAuthenticationQuickstart
Workflows
GETList WorkflowsGETGet WorkflowGETList Workflow VersionsPOSTAccept Workflow Update
Runs
POSTCreate RunGETList RunsGETGet RunPOSTCancel RunGETList Run Events
Guides
WebhooksErrors & Edge CasesBilling & Spend CapsStreaming & Real-timeOpenAPI specification

Platform status

Checking platform status
All documentation
API Reference

REST endpoints, authentication, and webhooks for running workflows from your backend.

Overview
Getting started
API ReferenceAuthenticationQuickstart
Workflows
GETList WorkflowsGETGet WorkflowGETList Workflow VersionsPOSTAccept Workflow Update
Runs
POSTCreate RunGETList RunsGETGet RunPOSTCancel RunGETList Run Events
Guides
WebhooksErrors & Edge CasesBilling & Spend CapsStreaming & Real-timeOpenAPI specification
Developer console

Platform status

Checking platform status
Runs

Create Run

Start an asynchronous workflow run. Returns 202 Accepted with a run id and polling URLs.

curl --fail-with-body --silent --show-error -X POST 'https://api.edgaze.ai/v1/runs' \
  -H "Authorization: Bearer $EDGAZE_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"workflow":"550e8400-e29b-41d4-a716-446655440000","inputs":{"input_node_id":"replace with a value matching inputSchema"},"idempotencyKey":"replace-with-one-stable-request-id"}'
Audience

Developers building with the Edgaze API.

POSThttps://api.edgaze.ai/v1/runs

Overview#

This is the primary execution endpoint. It accepts a workflow id and an inputs object, validates required inputs, entitlement, and spend caps synchronously, then returns 202 Accepted with a run id and URLs for polling.

Runs are asynchronous. A successful response means the request was accepted, not that the run finished. Always follow statusUrl until the run reaches a terminal state, then read outputs from the same response or from GET /runs/{id}/events for step-level progress.

Build inputs from the selected workflow's current inputSchema; there is no universal field such as topic. Every key must match either one published nodeId or its exact input name. Unknown keys are rejected so spelling mistakes cannot be silently ignored. Send an Idempotency-Key header and reuse it when retrying the same logical POST so a network retry does not create another billable run.

You may use a field's nodeId or name alias. Do not send both with different values: conflicting aliases return 400 invalid_inputs. Sending both is accepted only when their values are identical. When two published fields share a name, that name is ambiguous and you must use their node IDs.

POST immediately after resolving inputSchema from GET /workflows/{id}. Store run.id and poll every 1-3 seconds. Handle 402 spend_cap_reached and 429 rate_limited at request time; handle wallet failures by polling for status failed.

Authorization#

Requires run:execute.

run:execute

Parameters#

Headers

Authorizationstringheaderrequired

Bearer token with run:execute scope.

Example: Bearer edgaze_sk_live_…

Idempotency-Keystringheader

Currently optional for backward compatibility, but strongly recommended for every request. Preferred location; maximum 255 characters. If the body field is also present, both values must match.

Example: order_8f31_run_1

Request body

workflowstringbodyrequired

Workflow UUID.

Example: 550e8400-e29b-41d4-a716-446655440000

inputsobjectbody

Strict map of exact input names (or nodeIds) to values matching inputSchema. Unknown keys and conflicting aliases are rejected. May be empty only when the workflow has no required inputs.

Example: {"topic": "AI agents", "tone": "Technical"}

versionstringbody

Optional immutable workflow version UUID. The caller must be entitled to this version.

Example: 8f57e8f7-7b74-4fe2-a425-722a135d93aa

idempotencyKeystringbody

Compatibility body location for the idempotency key. Prefer the Idempotency-Key header.

Version resolution#

POST /runs pins each run to one immutable workflow version. The same workflow id can therefore execute different graphs for different callers, and the resolution rules are as follows:

  • Explicit pin. When you set version in the request body to an immutable version id you are entitled to, the run executes that exact graph. Owners can select any version in the workflow's history; buyers can select the version their purchase pin already covers.
  • Pinned access. When you omit version and your access is pinned to a version, the run executes that version. A creator publishing a newer version does not silently upgrade you.
  • Current version. When you omit version and your access is not pinned, the run executes the workflow's current active version.

Cache pinnedVersionId, activeVersionId, and updateAvailable from GET /workflows/{id} to reason about drift. When updateAvailable flips to true, review the new version before the next run: input shapes and output shapes can change between versions.

Sending an unknown or forbidden version returns 403 forbidden. The public API never reveals whether an unknown version id belongs to another workflow.

Idempotency#

Use the Idempotency-Key HTTP header. The compatibility field idempotencyKey in the JSON body is also accepted. If both are present they must be identical after surrounding whitespace is removed; otherwise the request returns 400 invalid_request. Header names are case-insensitive under HTTP, while key values are case-sensitive.

The public v1 API keeps this key optional for backward compatibility. New integrations should treat it as required for every POST /runs: without a key, an ambiguous network retry can create and charge a second run. Edgaze's own first-party run clients are rejected when they omit their attempt key.

Keys may contain any non-empty string up to 255 characters. Uniqueness is scoped to the Edgaze account behind the API key, not to one API key or workflow.

The request fingerprint covers the workflow, normalized inputs, and requested version. Reusing a key with the same request returns 202 and the original run URLs without creating or charging another run. Reusing it with a different request returns 409 idempotency_conflict. A failed or cancelled run is still the original result for that key. To intentionally retry execution as a new run, use a new key.

Funding and acceptance behavior#

The table below describes behavior visible to an API client.

ConditionAPI resultChargeSafe retry
Valid request202 acceptedFinal charge is reported with the runReuse the same key for the same logical request
API-key spend cap exceeded402 spend_cap_reachedNo chargeRaise the cap or wait for its window to reset
Insufficient wallet or eligible bundle202, followed by status: failedNo chargeAdd funds, then use a new key for a new run
Invalid published inputs400 invalid_inputsNo chargeCorrect the input, then use a new key
Run reaches its compute limit202, followed by a failed statusThe run response and wallet history applyUse a new key only when another execution is intended
Payment card issueNot handled by POST /runsRuns use existing wallet or bundle fundingResolve the separate wallet top-up checkout

File inputs#

POST /runs accepts JSON, not multipart form data. For an input whose schema type is file, send a JSON-safe WorkflowMedia object under that input's nodeId:

{
  "__workflowMedia": true,
  "kind": "image",
  "url": "https://example.com/input.png",
  "mimeType": "image/png",
  "filename": "input.png"
}

Use an HTTPS URL your workflow can retrieve, or replace url with a raw base64 field. Never put an API key or authorization token in the media URL.

Response#

Only POST /runs is rate-limited (60 req/min per key). Invalid JSON returns 400 invalid_json. Missing workflow returns 400 missing_workflow. Missing, unknown, conflicting, or incorrectly typed workflow inputs return 400 invalid_inputs. Reusing an idempotency key with a different workflow, normalized inputs, or requested version returns 409 idempotency_conflict.

Example payloads are in the request/response panel above.

Edge cases#

Async wallet failures202

POST returns 202 before wallet funding is verified. If balance is insufficient, the run fails asynchronously. Poll GET /runs/{id} and check for status failed.

Spend cap is synchronous402spend_cap_reached

Spend cap checks happen before the run row is created. A cap breach returns 402 immediately with no run ID.

Rate limit ordering429rate_limited

Rate limiting is enforced before run execution. A 429 never creates a partial run.

Same billing as the product UI

API runs use identical entitlement, wallet, bundle, and BYOK billing paths as runs started from the web app.

Safe retries

Send idempotencyKey and reuse the same value when retrying one logical request. Use a new value only for a genuinely new run.

Strict input keys400invalid_inputs

Unknown keys, ambiguous name aliases, and different values supplied for the same field by name and nodeId return 400 invalid_inputs before billing or run creation.

Was this useful?

Your response helps us improve the documentation.

← Accept Workflow UpdateList Runs →
On this page
OverviewAuthorizationParametersVersion resolutionIdempotencyFunding and acceptance behaviorFile inputsResponseEdge cases
© 2026 Edge Platforms, Inc. All rights reserved.