curl --request POST \
--url https://openapi.beeos.ai/api/v1/instances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"variantId": "<string>",
"agentFramework": "<string>",
"providerId": "<string>",
"providerConfig": {},
"modelPrimary": "<string>",
"models": [
"<string>"
],
"systemPrompt": "<string>",
"mcpServers": {},
"bridgeId": "<string>",
"config": {},
"clusterId": "<string>",
"preferredRegion": "<string>"
}
'import requests
url = "https://openapi.beeos.ai/api/v1/instances"
payload = {
"name": "<string>",
"variantId": "<string>",
"agentFramework": "<string>",
"providerId": "<string>",
"providerConfig": {},
"modelPrimary": "<string>",
"models": ["<string>"],
"systemPrompt": "<string>",
"mcpServers": {},
"bridgeId": "<string>",
"config": {},
"clusterId": "<string>",
"preferredRegion": "<string>"
}
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({
name: '<string>',
variantId: '<string>',
agentFramework: '<string>',
providerId: '<string>',
providerConfig: {},
modelPrimary: '<string>',
models: ['<string>'],
systemPrompt: '<string>',
mcpServers: {},
bridgeId: '<string>',
config: {},
clusterId: '<string>',
preferredRegion: '<string>'
})
};
fetch('https://openapi.beeos.ai/api/v1/instances', 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://openapi.beeos.ai/api/v1/instances",
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([
'name' => '<string>',
'variantId' => '<string>',
'agentFramework' => '<string>',
'providerId' => '<string>',
'providerConfig' => [
],
'modelPrimary' => '<string>',
'models' => [
'<string>'
],
'systemPrompt' => '<string>',
'mcpServers' => [
],
'bridgeId' => '<string>',
'config' => [
],
'clusterId' => '<string>',
'preferredRegion' => '<string>'
]),
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://openapi.beeos.ai/api/v1/instances"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"variantId\": \"<string>\",\n \"agentFramework\": \"<string>\",\n \"providerId\": \"<string>\",\n \"providerConfig\": {},\n \"modelPrimary\": \"<string>\",\n \"models\": [\n \"<string>\"\n ],\n \"systemPrompt\": \"<string>\",\n \"mcpServers\": {},\n \"bridgeId\": \"<string>\",\n \"config\": {},\n \"clusterId\": \"<string>\",\n \"preferredRegion\": \"<string>\"\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://openapi.beeos.ai/api/v1/instances")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"variantId\": \"<string>\",\n \"agentFramework\": \"<string>\",\n \"providerId\": \"<string>\",\n \"providerConfig\": {},\n \"modelPrimary\": \"<string>\",\n \"models\": [\n \"<string>\"\n ],\n \"systemPrompt\": \"<string>\",\n \"mcpServers\": {},\n \"bridgeId\": \"<string>\",\n \"config\": {},\n \"clusterId\": \"<string>\",\n \"preferredRegion\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.beeos.ai/api/v1/instances")
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 \"name\": \"<string>\",\n \"variantId\": \"<string>\",\n \"agentFramework\": \"<string>\",\n \"providerId\": \"<string>\",\n \"providerConfig\": {},\n \"modelPrimary\": \"<string>\",\n \"models\": [\n \"<string>\"\n ],\n \"systemPrompt\": \"<string>\",\n \"mcpServers\": {},\n \"bridgeId\": \"<string>\",\n \"config\": {},\n \"clusterId\": \"<string>\",\n \"preferredRegion\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"ownerId": "<string>",
"agentFramework": "<string>",
"providerId": "<string>",
"externalId": "<string>",
"osType": "<string>",
"hostingType": "<string>",
"cloudProvider": "<string>",
"name": "<string>",
"modelPrimary": "<string>",
"models": [
"<string>"
],
"status": "<string>",
"desiredStatus": "<string>",
"endpoint": "<string>",
"bridgeId": "<string>",
"identityId": "<string>",
"totalRunSeconds": 123,
"connectivity": "<string>",
"providerConfig": {},
"connectivityReason": "device_disconnected",
"haltReason": "<string>",
"publicIp": "<string>",
"clusterId": "<string>",
"region": "<string>",
"imageId": "<string>",
"imageRef": "<string>",
"isTrial": true,
"expiresAt": "2023-11-07T05:31:56Z",
"errorMessage": "<string>",
"systemPrompt": "<string>",
"mcpServers": {},
"startedAt": "2023-11-07T05:31:56Z",
"stoppedAt": "2023-11-07T05:31:56Z",
"statusEnteredAt": "2023-11-07T05:31:56Z",
"connectivityUpdatedAt": "2023-11-07T05:31:56Z",
"msConnectionStatus": "unknown",
"msConnectionUpdatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"screenshotUrl": "<string>",
"screenshotUpdatedAt": "2023-11-07T05:31:56Z",
"capabilities": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}Deploy a new instance (catalog-driven via `variantId` or explicit).
curl --request POST \
--url https://openapi.beeos.ai/api/v1/instances \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"variantId": "<string>",
"agentFramework": "<string>",
"providerId": "<string>",
"providerConfig": {},
"modelPrimary": "<string>",
"models": [
"<string>"
],
"systemPrompt": "<string>",
"mcpServers": {},
"bridgeId": "<string>",
"config": {},
"clusterId": "<string>",
"preferredRegion": "<string>"
}
'import requests
url = "https://openapi.beeos.ai/api/v1/instances"
payload = {
"name": "<string>",
"variantId": "<string>",
"agentFramework": "<string>",
"providerId": "<string>",
"providerConfig": {},
"modelPrimary": "<string>",
"models": ["<string>"],
"systemPrompt": "<string>",
"mcpServers": {},
"bridgeId": "<string>",
"config": {},
"clusterId": "<string>",
"preferredRegion": "<string>"
}
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({
name: '<string>',
variantId: '<string>',
agentFramework: '<string>',
providerId: '<string>',
providerConfig: {},
modelPrimary: '<string>',
models: ['<string>'],
systemPrompt: '<string>',
mcpServers: {},
bridgeId: '<string>',
config: {},
clusterId: '<string>',
preferredRegion: '<string>'
})
};
fetch('https://openapi.beeos.ai/api/v1/instances', 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://openapi.beeos.ai/api/v1/instances",
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([
'name' => '<string>',
'variantId' => '<string>',
'agentFramework' => '<string>',
'providerId' => '<string>',
'providerConfig' => [
],
'modelPrimary' => '<string>',
'models' => [
'<string>'
],
'systemPrompt' => '<string>',
'mcpServers' => [
],
'bridgeId' => '<string>',
'config' => [
],
'clusterId' => '<string>',
'preferredRegion' => '<string>'
]),
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://openapi.beeos.ai/api/v1/instances"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"variantId\": \"<string>\",\n \"agentFramework\": \"<string>\",\n \"providerId\": \"<string>\",\n \"providerConfig\": {},\n \"modelPrimary\": \"<string>\",\n \"models\": [\n \"<string>\"\n ],\n \"systemPrompt\": \"<string>\",\n \"mcpServers\": {},\n \"bridgeId\": \"<string>\",\n \"config\": {},\n \"clusterId\": \"<string>\",\n \"preferredRegion\": \"<string>\"\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://openapi.beeos.ai/api/v1/instances")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"variantId\": \"<string>\",\n \"agentFramework\": \"<string>\",\n \"providerId\": \"<string>\",\n \"providerConfig\": {},\n \"modelPrimary\": \"<string>\",\n \"models\": [\n \"<string>\"\n ],\n \"systemPrompt\": \"<string>\",\n \"mcpServers\": {},\n \"bridgeId\": \"<string>\",\n \"config\": {},\n \"clusterId\": \"<string>\",\n \"preferredRegion\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://openapi.beeos.ai/api/v1/instances")
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 \"name\": \"<string>\",\n \"variantId\": \"<string>\",\n \"agentFramework\": \"<string>\",\n \"providerId\": \"<string>\",\n \"providerConfig\": {},\n \"modelPrimary\": \"<string>\",\n \"models\": [\n \"<string>\"\n ],\n \"systemPrompt\": \"<string>\",\n \"mcpServers\": {},\n \"bridgeId\": \"<string>\",\n \"config\": {},\n \"clusterId\": \"<string>\",\n \"preferredRegion\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "<string>",
"ownerId": "<string>",
"agentFramework": "<string>",
"providerId": "<string>",
"externalId": "<string>",
"osType": "<string>",
"hostingType": "<string>",
"cloudProvider": "<string>",
"name": "<string>",
"modelPrimary": "<string>",
"models": [
"<string>"
],
"status": "<string>",
"desiredStatus": "<string>",
"endpoint": "<string>",
"bridgeId": "<string>",
"identityId": "<string>",
"totalRunSeconds": 123,
"connectivity": "<string>",
"providerConfig": {},
"connectivityReason": "device_disconnected",
"haltReason": "<string>",
"publicIp": "<string>",
"clusterId": "<string>",
"region": "<string>",
"imageId": "<string>",
"imageRef": "<string>",
"isTrial": true,
"expiresAt": "2023-11-07T05:31:56Z",
"errorMessage": "<string>",
"systemPrompt": "<string>",
"mcpServers": {},
"startedAt": "2023-11-07T05:31:56Z",
"stoppedAt": "2023-11-07T05:31:56Z",
"statusEnteredAt": "2023-11-07T05:31:56Z",
"connectivityUpdatedAt": "2023-11-07T05:31:56Z",
"msConnectionStatus": "unknown",
"msConnectionUpdatedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"screenshotUrl": "<string>",
"screenshotUpdatedAt": "2023-11-07T05:31:56Z",
"capabilities": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}{
"success": false,
"error": {
"code": "agent_not_found",
"message": "<string>",
"type": "api_error",
"request_id": "<string>",
"param": "<string>",
"metadata": {}
}
}Authorizations
Pass a user JWT or a oag_ User API Key on the
Authorization: Bearer <token> header. Both are validated by
openapi-gateway against the Auth service.
Both credential types are user-scoped: every key (and every JWT) is bound to exactly one owner, and every route grants the caller full access to that owner's own resources. Cross-tenant access is denied by owner-ACL inside the handlers — there is no per-route scope vocabulary on this API.
Removed in v1.1.0: the legacy
agents:*/tasks:*/files:*/instances:*scope set has been dropped together with the403 insufficient_scopeerror. Existingoag_keys automatically gain full owner-level access and do not need to be re-issued. SDK calls that previously passedscopestocreateAPIKeyshould drop the argument. See the changelog at the bottom of this spec for the full migration note.
Body
Either supply a catalog variantId (authoritative — lifts
agentFramework / providerId / region / scheduling hints from the
variant) or provide an explicit agentFramework (+ optional
providerId). Client-supplied scheduling fields (ownershipPreference /
maxPricePerHour / resourceTypeHint) are not accepted here; the
catalog variant is the source of truth.
1281286464Free-form provider-specific configuration merged with the catalog config (catalog wins on key conflicts).
1281288192128Alternate name for providerConfig; same semantics. Used by the
variant-driven path to layer user extras (apiKeys / apiBaseUrls)
on top of the catalog config.
12864