EdgazeDocsEdgaze Docs
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

Preferred idempotency 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.
  • Purchase pin. When you omit version and hold a purchase row whose workflow_version_id is non-null, the run executes that pinned version. A creator publishing a newer version does not silently upgrade you.
  • Follow active. When you omit version and your purchase pin is null (or you have no purchase row), the run executes the workflow's current active_version_id. Callers who fall in this path float with each publish.

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.

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. Records have no time-based expiry in the current implementation; a key remains reserved while its run record exists.

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.

Canonical funding and acceptance behavior#

This table is the source of truth for REST run creation. Other billing pages link here instead of redefining the POST /runs timing.

ConditionHTTP responseRun record and initial response statusFailure timing and signalBuyer charge / creator earningsSafe retry
Valid hosted, BYOK, paid marketplace, or free run202Created; response status is acceptedExecution continues asynchronouslyCharged and creator earnings recorded only on success; BYOK uses its documented margin and orchestration pricingSame idempotency key replays the original run
API-key spend cap exceeded402 spend_cap_reachedNo run recordSynchronous, before wallet or bundle reservationNo charge; no creator earningsRetry after raising the cap or after its window resets
Account-level spend capNot implemented for POST /runsN/AOnly an API-key cap is enforcedN/AN/A
Eligible workflow bundle202Created; acceptedBundle reservation occurs during asynchronous preparationOne bundle run is consumed only on success; creator earnings recorded on successSame key replays; a new key creates a new run
Bundle depleted, expired, wrong version, or lost reservation race202Created; acceptedPreparation falls through atomically to walletWallet is charged only on successSame key replays the outcome
Wallet insufficient, including a balance race202Created; accepted, then failedAsynchronous run.completed with failed outcome and reason Insufficient funds to cover this runNo charge; no creator earningsSame key returns the failed run; use a new key after funding
Demo or builder testNot started through this public endpointN/AUse the product's demo or builder surfaceNever charged; no creator earningsFollow the surface-specific retry behavior
Input or compute envelope rejected before execution400 invalid_inputs for schema errors; envelope rejection may fail during preparationSchema errors create no run; a preparation-time rejection has a run recordSynchronous for published input validation; otherwise asynchronousNo charge; no creator earningsCorrect the input, then use a new key
Compute limit reached during execution202Created; accepted, then terminal failureAsynchronous terminal run eventCreator margin is released; already consumed compute may remain chargedSame key replays; use a new key only if another execution is intended
Payment authorization failureNot applicable at run timeRun creation never authorizes a cardRuns spend existing wallet or bundle funds; top-up authorization is a separate checkoutNo run-time card chargeResolve checkout separately

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 before a run or billing reservation is created. 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 resolutionIdempotencyCanonical funding and acceptance behaviorFile inputsResponseEdge cases
© 2026 Edge Platforms, Inc. All rights reserved.