Skills
Run a skill by ID
Trigger an execution of a specific skill by its ID with optional variables and inputs.
POST
/
v1
/
skills
/
run
Run a Skill by ID
curl --request POST \
--url https://api.valendata.com/v1/skills/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"skill_id": "skl_b281b8165a23",
"parameters": {
"page": "/bestsellers",
"max_results": 50
}
}
'import requests
url = "https://api.valendata.com/v1/skills/run"
payload = {
"skill_id": "skl_b281b8165a23",
"parameters": {
"page": "/bestsellers",
"max_results": 50
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
skill_id: 'skl_b281b8165a23',
parameters: {page: '/bestsellers', max_results: 50}
})
};
fetch('https://api.valendata.com/v1/skills/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valendata.com/v1/skills/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'skill_id' => 'skl_b281b8165a23',
'parameters' => [
'page' => '/bestsellers',
'max_results' => 50
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.valendata.com/v1/skills/run"
payload := strings.NewReader("{\n \"skill_id\": \"skl_b281b8165a23\",\n \"parameters\": {\n \"page\": \"/bestsellers\",\n \"max_results\": 50\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.valendata.com/v1/skills/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"skill_id\": \"skl_b281b8165a23\",\n \"parameters\": {\n \"page\": \"/bestsellers\",\n \"max_results\": 50\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valendata.com/v1/skills/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"skill_id\": \"skl_b281b8165a23\",\n \"parameters\": {\n \"page\": \"/bestsellers\",\n \"max_results\": 50\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"data": [
{
"name": "Widget Pro",
"price": 129,
"in_stock": true
},
{
"name": "Widget Lite",
"price": 49,
"in_stock": false
}
],
"count": 2,
"execution_time_ms": 18400,
"error": null
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}Authorizations
API key with the vd_sk_ prefix. Create keys from Settings, API Keys in the dashboard.
Body
application/json
The unique identifier of the published Skill to execute. Skill IDs follow the format skl_...
Example:
"skl_b281b8165a23"
Key-value map of parameter values to pass to the Skill. Parameter names must match those defined in the Skill's configuration.
Example:
{ "page": "/bestsellers", "max_results": 50 }
Response
Skill executed successfully
Terminal state of the run.
Available options:
completed, failed Structured JSON output produced by the Skill, validated against the Skill's output schema. Null if the run failed.
Number of items in data.
Total wall-clock execution time in milliseconds.
Error message if the run failed, otherwise null.
⌘I
Run a Skill by ID
curl --request POST \
--url https://api.valendata.com/v1/skills/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"skill_id": "skl_b281b8165a23",
"parameters": {
"page": "/bestsellers",
"max_results": 50
}
}
'import requests
url = "https://api.valendata.com/v1/skills/run"
payload = {
"skill_id": "skl_b281b8165a23",
"parameters": {
"page": "/bestsellers",
"max_results": 50
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
skill_id: 'skl_b281b8165a23',
parameters: {page: '/bestsellers', max_results: 50}
})
};
fetch('https://api.valendata.com/v1/skills/run', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.valendata.com/v1/skills/run",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'skill_id' => 'skl_b281b8165a23',
'parameters' => [
'page' => '/bestsellers',
'max_results' => 50
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.valendata.com/v1/skills/run"
payload := strings.NewReader("{\n \"skill_id\": \"skl_b281b8165a23\",\n \"parameters\": {\n \"page\": \"/bestsellers\",\n \"max_results\": 50\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.valendata.com/v1/skills/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"skill_id\": \"skl_b281b8165a23\",\n \"parameters\": {\n \"page\": \"/bestsellers\",\n \"max_results\": 50\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.valendata.com/v1/skills/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"skill_id\": \"skl_b281b8165a23\",\n \"parameters\": {\n \"page\": \"/bestsellers\",\n \"max_results\": 50\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "completed",
"data": [
{
"name": "Widget Pro",
"price": 129,
"in_stock": true
},
{
"name": "Widget Lite",
"price": 49,
"in_stock": false
}
],
"count": 2,
"execution_time_ms": 18400,
"error": null
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}{
"detail": "Invalid or expired API key"
}
