curl --request POST \
--url https://api.profy.cn/v1/agents/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expert_identifier": "<string>",
"message": "<string>",
"session_id": "<string>",
"model": "<string>",
"attachment_file_ids": [
"<string>"
],
"tool_confirmations": [
{
"tool_call_id": "<string>",
"tool_name": "<string>",
"decision": "<string>",
"modified_parameters": {},
"result": "<unknown>",
"rejection_reason": "<string>",
"is_error": true
}
],
"enabled_plugins": [
"<string>"
],
"skill_names": [
"<string>"
],
"enable_memory": false,
"permission_mode": "plan",
"working_directory": "<string>",
"selected_image_model": "<string>",
"selected_video_model": "<string>",
"selected_speech_model": "<string>",
"selected_music_model": "<string>",
"image_parameters": {},
"video_parameters": {}
}
'import requests
url = "https://api.profy.cn/v1/agents/run"
payload = {
"expert_identifier": "<string>",
"message": "<string>",
"session_id": "<string>",
"model": "<string>",
"attachment_file_ids": ["<string>"],
"tool_confirmations": [
{
"tool_call_id": "<string>",
"tool_name": "<string>",
"decision": "<string>",
"modified_parameters": {},
"result": "<unknown>",
"rejection_reason": "<string>",
"is_error": True
}
],
"enabled_plugins": ["<string>"],
"skill_names": ["<string>"],
"enable_memory": False,
"permission_mode": "plan",
"working_directory": "<string>",
"selected_image_model": "<string>",
"selected_video_model": "<string>",
"selected_speech_model": "<string>",
"selected_music_model": "<string>",
"image_parameters": {},
"video_parameters": {}
}
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({
expert_identifier: '<string>',
message: '<string>',
session_id: '<string>',
model: '<string>',
attachment_file_ids: ['<string>'],
tool_confirmations: [
{
tool_call_id: '<string>',
tool_name: '<string>',
decision: '<string>',
modified_parameters: {},
result: '<unknown>',
rejection_reason: '<string>',
is_error: true
}
],
enabled_plugins: ['<string>'],
skill_names: ['<string>'],
enable_memory: false,
permission_mode: 'plan',
working_directory: '<string>',
selected_image_model: '<string>',
selected_video_model: '<string>',
selected_speech_model: '<string>',
selected_music_model: '<string>',
image_parameters: {},
video_parameters: {}
})
};
fetch('https://api.profy.cn/v1/agents/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.profy.cn/v1/agents/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([
'expert_identifier' => '<string>',
'message' => '<string>',
'session_id' => '<string>',
'model' => '<string>',
'attachment_file_ids' => [
'<string>'
],
'tool_confirmations' => [
[
'tool_call_id' => '<string>',
'tool_name' => '<string>',
'decision' => '<string>',
'modified_parameters' => [
],
'result' => '<unknown>',
'rejection_reason' => '<string>',
'is_error' => true
]
],
'enabled_plugins' => [
'<string>'
],
'skill_names' => [
'<string>'
],
'enable_memory' => false,
'permission_mode' => 'plan',
'working_directory' => '<string>',
'selected_image_model' => '<string>',
'selected_video_model' => '<string>',
'selected_speech_model' => '<string>',
'selected_music_model' => '<string>',
'image_parameters' => [
],
'video_parameters' => [
]
]),
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.profy.cn/v1/agents/run"
payload := strings.NewReader("{\n \"expert_identifier\": \"<string>\",\n \"message\": \"<string>\",\n \"session_id\": \"<string>\",\n \"model\": \"<string>\",\n \"attachment_file_ids\": [\n \"<string>\"\n ],\n \"tool_confirmations\": [\n {\n \"tool_call_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"decision\": \"<string>\",\n \"modified_parameters\": {},\n \"result\": \"<unknown>\",\n \"rejection_reason\": \"<string>\",\n \"is_error\": true\n }\n ],\n \"enabled_plugins\": [\n \"<string>\"\n ],\n \"skill_names\": [\n \"<string>\"\n ],\n \"enable_memory\": false,\n \"permission_mode\": \"plan\",\n \"working_directory\": \"<string>\",\n \"selected_image_model\": \"<string>\",\n \"selected_video_model\": \"<string>\",\n \"selected_speech_model\": \"<string>\",\n \"selected_music_model\": \"<string>\",\n \"image_parameters\": {},\n \"video_parameters\": {}\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.profy.cn/v1/agents/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expert_identifier\": \"<string>\",\n \"message\": \"<string>\",\n \"session_id\": \"<string>\",\n \"model\": \"<string>\",\n \"attachment_file_ids\": [\n \"<string>\"\n ],\n \"tool_confirmations\": [\n {\n \"tool_call_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"decision\": \"<string>\",\n \"modified_parameters\": {},\n \"result\": \"<unknown>\",\n \"rejection_reason\": \"<string>\",\n \"is_error\": true\n }\n ],\n \"enabled_plugins\": [\n \"<string>\"\n ],\n \"skill_names\": [\n \"<string>\"\n ],\n \"enable_memory\": false,\n \"permission_mode\": \"plan\",\n \"working_directory\": \"<string>\",\n \"selected_image_model\": \"<string>\",\n \"selected_video_model\": \"<string>\",\n \"selected_speech_model\": \"<string>\",\n \"selected_music_model\": \"<string>\",\n \"image_parameters\": {},\n \"video_parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.profy.cn/v1/agents/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 \"expert_identifier\": \"<string>\",\n \"message\": \"<string>\",\n \"session_id\": \"<string>\",\n \"model\": \"<string>\",\n \"attachment_file_ids\": [\n \"<string>\"\n ],\n \"tool_confirmations\": [\n {\n \"tool_call_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"decision\": \"<string>\",\n \"modified_parameters\": {},\n \"result\": \"<unknown>\",\n \"rejection_reason\": \"<string>\",\n \"is_error\": true\n }\n ],\n \"enabled_plugins\": [\n \"<string>\"\n ],\n \"skill_names\": [\n \"<string>\"\n ],\n \"enable_memory\": false,\n \"permission_mode\": \"plan\",\n \"working_directory\": \"<string>\",\n \"selected_image_model\": \"<string>\",\n \"selected_video_model\": \"<string>\",\n \"selected_speech_model\": \"<string>\",\n \"selected_music_model\": \"<string>\",\n \"image_parameters\": {},\n \"video_parameters\": {}\n}"
response = http.request(request)
puts response.read_body"<string>"Invoke Expert (SSE Stream)
Invoke a Profy Expert agent. Returns a Server-Sent Events stream with dot-notation event names (run.created, output.text.delta, tool_call.created, run.completed, etc.).
curl --request POST \
--url https://api.profy.cn/v1/agents/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expert_identifier": "<string>",
"message": "<string>",
"session_id": "<string>",
"model": "<string>",
"attachment_file_ids": [
"<string>"
],
"tool_confirmations": [
{
"tool_call_id": "<string>",
"tool_name": "<string>",
"decision": "<string>",
"modified_parameters": {},
"result": "<unknown>",
"rejection_reason": "<string>",
"is_error": true
}
],
"enabled_plugins": [
"<string>"
],
"skill_names": [
"<string>"
],
"enable_memory": false,
"permission_mode": "plan",
"working_directory": "<string>",
"selected_image_model": "<string>",
"selected_video_model": "<string>",
"selected_speech_model": "<string>",
"selected_music_model": "<string>",
"image_parameters": {},
"video_parameters": {}
}
'import requests
url = "https://api.profy.cn/v1/agents/run"
payload = {
"expert_identifier": "<string>",
"message": "<string>",
"session_id": "<string>",
"model": "<string>",
"attachment_file_ids": ["<string>"],
"tool_confirmations": [
{
"tool_call_id": "<string>",
"tool_name": "<string>",
"decision": "<string>",
"modified_parameters": {},
"result": "<unknown>",
"rejection_reason": "<string>",
"is_error": True
}
],
"enabled_plugins": ["<string>"],
"skill_names": ["<string>"],
"enable_memory": False,
"permission_mode": "plan",
"working_directory": "<string>",
"selected_image_model": "<string>",
"selected_video_model": "<string>",
"selected_speech_model": "<string>",
"selected_music_model": "<string>",
"image_parameters": {},
"video_parameters": {}
}
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({
expert_identifier: '<string>',
message: '<string>',
session_id: '<string>',
model: '<string>',
attachment_file_ids: ['<string>'],
tool_confirmations: [
{
tool_call_id: '<string>',
tool_name: '<string>',
decision: '<string>',
modified_parameters: {},
result: '<unknown>',
rejection_reason: '<string>',
is_error: true
}
],
enabled_plugins: ['<string>'],
skill_names: ['<string>'],
enable_memory: false,
permission_mode: 'plan',
working_directory: '<string>',
selected_image_model: '<string>',
selected_video_model: '<string>',
selected_speech_model: '<string>',
selected_music_model: '<string>',
image_parameters: {},
video_parameters: {}
})
};
fetch('https://api.profy.cn/v1/agents/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.profy.cn/v1/agents/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([
'expert_identifier' => '<string>',
'message' => '<string>',
'session_id' => '<string>',
'model' => '<string>',
'attachment_file_ids' => [
'<string>'
],
'tool_confirmations' => [
[
'tool_call_id' => '<string>',
'tool_name' => '<string>',
'decision' => '<string>',
'modified_parameters' => [
],
'result' => '<unknown>',
'rejection_reason' => '<string>',
'is_error' => true
]
],
'enabled_plugins' => [
'<string>'
],
'skill_names' => [
'<string>'
],
'enable_memory' => false,
'permission_mode' => 'plan',
'working_directory' => '<string>',
'selected_image_model' => '<string>',
'selected_video_model' => '<string>',
'selected_speech_model' => '<string>',
'selected_music_model' => '<string>',
'image_parameters' => [
],
'video_parameters' => [
]
]),
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.profy.cn/v1/agents/run"
payload := strings.NewReader("{\n \"expert_identifier\": \"<string>\",\n \"message\": \"<string>\",\n \"session_id\": \"<string>\",\n \"model\": \"<string>\",\n \"attachment_file_ids\": [\n \"<string>\"\n ],\n \"tool_confirmations\": [\n {\n \"tool_call_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"decision\": \"<string>\",\n \"modified_parameters\": {},\n \"result\": \"<unknown>\",\n \"rejection_reason\": \"<string>\",\n \"is_error\": true\n }\n ],\n \"enabled_plugins\": [\n \"<string>\"\n ],\n \"skill_names\": [\n \"<string>\"\n ],\n \"enable_memory\": false,\n \"permission_mode\": \"plan\",\n \"working_directory\": \"<string>\",\n \"selected_image_model\": \"<string>\",\n \"selected_video_model\": \"<string>\",\n \"selected_speech_model\": \"<string>\",\n \"selected_music_model\": \"<string>\",\n \"image_parameters\": {},\n \"video_parameters\": {}\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.profy.cn/v1/agents/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expert_identifier\": \"<string>\",\n \"message\": \"<string>\",\n \"session_id\": \"<string>\",\n \"model\": \"<string>\",\n \"attachment_file_ids\": [\n \"<string>\"\n ],\n \"tool_confirmations\": [\n {\n \"tool_call_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"decision\": \"<string>\",\n \"modified_parameters\": {},\n \"result\": \"<unknown>\",\n \"rejection_reason\": \"<string>\",\n \"is_error\": true\n }\n ],\n \"enabled_plugins\": [\n \"<string>\"\n ],\n \"skill_names\": [\n \"<string>\"\n ],\n \"enable_memory\": false,\n \"permission_mode\": \"plan\",\n \"working_directory\": \"<string>\",\n \"selected_image_model\": \"<string>\",\n \"selected_video_model\": \"<string>\",\n \"selected_speech_model\": \"<string>\",\n \"selected_music_model\": \"<string>\",\n \"image_parameters\": {},\n \"video_parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.profy.cn/v1/agents/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 \"expert_identifier\": \"<string>\",\n \"message\": \"<string>\",\n \"session_id\": \"<string>\",\n \"model\": \"<string>\",\n \"attachment_file_ids\": [\n \"<string>\"\n ],\n \"tool_confirmations\": [\n {\n \"tool_call_id\": \"<string>\",\n \"tool_name\": \"<string>\",\n \"decision\": \"<string>\",\n \"modified_parameters\": {},\n \"result\": \"<unknown>\",\n \"rejection_reason\": \"<string>\",\n \"is_error\": true\n }\n ],\n \"enabled_plugins\": [\n \"<string>\"\n ],\n \"skill_names\": [\n \"<string>\"\n ],\n \"enable_memory\": false,\n \"permission_mode\": \"plan\",\n \"working_directory\": \"<string>\",\n \"selected_image_model\": \"<string>\",\n \"selected_video_model\": \"<string>\",\n \"selected_speech_model\": \"<string>\",\n \"selected_music_model\": \"<string>\",\n \"image_parameters\": {},\n \"video_parameters\": {}\n}"
response = http.request(request)
puts response.read_body"<string>"Authorizations
OAuth2 access token issued via POST /oauth/token
Headers
Integrator terminal-user id for state isolation. Billing still charges the API key owner.
Body
Expert identifier (e.g. 'my-expert')
User message to send to the Expert
Existing session ID to continue a conversation (optional)
Override model selection (optional)
File ids from POST /v1/files. Each file is materialized in the Expert's sandbox at /home/user/uploads/. Ids only — the platform never fetches a caller-supplied URL.
20HITL resume answers. When non-empty, message may be empty.
Show child attributes
Show child attributes
Plugin ids for this turn (Composer chip equivalent). Empty array clears sticky selection.
Qualified skill names: user/ or expert/.
Opt-in memory for Platform invokes. Default false until end-user isolation ships.
Only "plan" is accepted.
plan Response
SSE stream with agent response events
The response is of type string.

