API Documentation
Agents
- GETList Agents
- POSTCreate Agent
- GETRetrieve an Agent
- PUTUpdate an Agent's Settings
- DELDelete an Agent
- POSTDuplicate an Agent
- GETList Agent Versions
- POSTCreate Agent Version
- GETRetrieve an Agent Version
- GETRetrieve an Agent Version
- POSTRun Agent
- POSTRun Agent Async
- GETAgent Job Status
- GETAgent Job Result
- GETList Agent's Jobs
Agents
Agent Job Result
Get agent job result data.
GET
/
v1
/
agents
/
jobs
/
{agent_job_id}
/
result
/
csharp
Copy
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string agentJobId = "YOUR_AGENT_JOB_ID"; // Replace with your agent job ID
string token = "YOUR_API_TOKEN"; // Replace with your API token
string url = $"https://api.roe-ai.com/v1/agents/jobs/{agentJobId}/result/";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response = await client.GetAsync(url);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}
Copy
{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_version_id": "456e7890-e89b-12d3-a456-426614174001",
"inputs": [
{
"key": "input_text",
"value": "Hello world",
"data_type": "text/plain"
}
],
"input_tokens": 100,
"output_tokens": 50,
"outputs": [
{
"key": "output",
"description": "Output JSON data",
"data_type": "application/json",
"value": "{\"summary\": \"hello world!\"}",
"cost": 0.05
}
]
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
Response
200
application/json
Agent job result with outputs, inputs, tokens and metadata
The response is of type object
.
csharp
Copy
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args)
{
string agentJobId = "YOUR_AGENT_JOB_ID"; // Replace with your agent job ID
string token = "YOUR_API_TOKEN"; // Replace with your API token
string url = $"https://api.roe-ai.com/v1/agents/jobs/{agentJobId}/result/";
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
HttpResponseMessage response = await client.GetAsync(url);
string responseBody = await response.Content.ReadAsStringAsync();
Console.WriteLine(responseBody);
}
}
Copy
{
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_version_id": "456e7890-e89b-12d3-a456-426614174001",
"inputs": [
{
"key": "input_text",
"value": "Hello world",
"data_type": "text/plain"
}
],
"input_tokens": 100,
"output_tokens": 50,
"outputs": [
{
"key": "output",
"description": "Output JSON data",
"data_type": "application/json",
"value": "{\"summary\": \"hello world!\"}",
"cost": 0.05
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.