curl --request POST \
--url https://api.wondeya.com/v1/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"data": "<string>",
"key": "<string>",
"topics": [
"<array>"
],
"agentId": {}
}
'import requests
url = "https://api.wondeya.com/v1/assets"
payload = {
"fileName": "<string>",
"data": "<string>",
"key": "<string>",
"topics": ["<array>"],
"agentId": {}
}
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({
fileName: '<string>',
data: '<string>',
key: '<string>',
topics: ['<array>'],
agentId: {}
})
};
fetch('https://api.wondeya.com/v1/assets', 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.wondeya.com/v1/assets",
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([
'fileName' => '<string>',
'data' => '<string>',
'key' => '<string>',
'topics' => [
'<array>'
],
'agentId' => [
]
]),
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.wondeya.com/v1/assets"
payload := strings.NewReader("{\n \"fileName\": \"<string>\",\n \"data\": \"<string>\",\n \"key\": \"<string>\",\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\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.wondeya.com/v1/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"<string>\",\n \"data\": \"<string>\",\n \"key\": \"<string>\",\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/assets")
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 \"fileName\": \"<string>\",\n \"data\": \"<string>\",\n \"key\": \"<string>\",\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"key": "<string>",
"kind": "<string>",
"mimeType": "<string>",
"byteSize": 123,
"orientation": "<string>",
"topics": [
"<string>"
],
"description": "<string>",
"alt": {
"es": "<string>",
"en": "<string>"
},
"status": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"width": 123,
"height": 123,
"error": "<string>"
}Upload an image
Registers an image the agent may show. The bytes decide the format; it is described automatically with vision (what it SHOWS) so it is findable.
curl --request POST \
--url https://api.wondeya.com/v1/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fileName": "<string>",
"data": "<string>",
"key": "<string>",
"topics": [
"<array>"
],
"agentId": {}
}
'import requests
url = "https://api.wondeya.com/v1/assets"
payload = {
"fileName": "<string>",
"data": "<string>",
"key": "<string>",
"topics": ["<array>"],
"agentId": {}
}
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({
fileName: '<string>',
data: '<string>',
key: '<string>',
topics: ['<array>'],
agentId: {}
})
};
fetch('https://api.wondeya.com/v1/assets', 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.wondeya.com/v1/assets",
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([
'fileName' => '<string>',
'data' => '<string>',
'key' => '<string>',
'topics' => [
'<array>'
],
'agentId' => [
]
]),
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.wondeya.com/v1/assets"
payload := strings.NewReader("{\n \"fileName\": \"<string>\",\n \"data\": \"<string>\",\n \"key\": \"<string>\",\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\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.wondeya.com/v1/assets")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fileName\": \"<string>\",\n \"data\": \"<string>\",\n \"key\": \"<string>\",\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.wondeya.com/v1/assets")
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 \"fileName\": \"<string>\",\n \"data\": \"<string>\",\n \"key\": \"<string>\",\n \"topics\": [\n \"<array>\"\n ],\n \"agentId\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": {},
"key": "<string>",
"kind": "<string>",
"mimeType": "<string>",
"byteSize": 123,
"orientation": "<string>",
"topics": [
"<string>"
],
"description": "<string>",
"alt": {
"es": "<string>",
"en": "<string>"
},
"status": "<string>",
"url": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"width": 123,
"height": 123,
"error": "<string>"
}Authorizations
A workspace API key: wdy_live_… / wdy_test_…. Created at POST /workspaces/{tenantId}/keys and shown exactly once.
Body
Original file name, e.g. "loaf.jpg". A label and the key seed, never a path.
1 - 200The image file, base64-encoded. Raw base64 only (no data: prefix). The bytes decide the format (PNG/JPEG/WebP/GIF/AVIF).
Stable kebab-case id the agent emits. Defaults to a slug.
488The agent this belongs to; null/absent = the workspace pool.
Response
null = the workspace pool.
The stable key the agent emits to show it.
What the image SHOWS; the planner reads this.
Show child attributes
Show child attributes
pending, ready, failed, …
A signed, short-lived URL. Never store it.