Skip to main content
Calling POST /v1/skills/run is the primary way to execute a Skill programmatically. You supply the Skill’s ID (or use the slug-based variant) along with any parameter values your automation needs, and Valendata spins up a real Chromium session, runs the task, and returns structured JSON output in a single synchronous response.

Endpoints

Two variants are available. Pick whichever matches how you identify the Skill:
  • The ID-based endpoint takes skill_id in the request body.
  • The slug-based endpoint takes the Skill’s slug in the URL path.

Authentication

Pass your API key in the Authorization header as a Bearer token. Create and manage API keys from Settings → API Keys inside app.valendata.com.
Keep your API key secret. Do not expose it in client-side code, public repositories, or log output. Rotate a compromised key immediately from the dashboard.

Request Body

string
required
The unique identifier of the published Skill to execute. Skill IDs follow the format skl_.... Find a Skill’s ID on its detail page in the dashboard or via GET /api/skills.Required for POST /v1/skills/run. Omit when using the slug-based endpoint.
object
A key-value map of parameter values to pass to the Skill. Parameter names must match those defined in the Skill’s configuration. Omit this field entirely if the Skill takes no parameters.

Example Request

Response

A successful run returns HTTP 200 with the following fields.
string
The terminal state of the run. Either "completed" when the Skill finishes successfully, or "failed" when the Skill encounters an unrecoverable error (see error for details).
array
Structured JSON output produced by the Skill, validated against the Skill’s defined output schema. Each element is an object whose shape matches the schema you configured when building the Skill. This field is null when status is "failed".
integer
The number of items in data.
integer
Total wall-clock execution time for the run, in milliseconds.
string | null
Error message if the run failed, otherwise null.

Example Response

Error Handling

Error responses use a detail field, for example: { "detail": "Your workspace has 3 credits remaining; this run requires at least 5." }

Credit Usage

Each run deducts credits based on three components:

LLM Tokens

Every reasoning step the AI agent takes consumes tokens. More complex pages and longer task descriptions use more tokens.

Browser Session Time

Credits accrue for every minute of active Chromium session. Faster-loading pages and tighter task scopes keep costs lower.

Web Searches

If your Skill requires the agent to perform a web search as part of its task, each search costs a small number of credits.
To predict run costs before scaling, run a Skill manually from the dashboard once and check the Run Details panel for a credit breakdown. Credits never expire, so topping up your balance in advance carries no risk.