curl --location --request POST 'https://api.rapidagent.ai/api/v1/agents/{agentId}/predict' \
--header 'Content-Type: application/json' \
--header 'X_SUPERAGENT_API_KEY: <api_token>'
--data-raw '{
"input": {"input": "Hi"},
"has_streaming": true
}'
{
"success": true,
"data": "Hi, how may I help you?",
"trace": {}
}
Agents
/agents/{agentId}/predict
Call an agent.
POST
/
api
/
v1
/
agents
/
{agentId}
/
predict
curl --location --request POST 'https://api.rapidagent.ai/api/v1/agents/{agentId}/predict' \
--header 'Content-Type: application/json' \
--header 'X_SUPERAGENT_API_KEY: <api_token>'
--data-raw '{
"input": {"input": "Hi"},
"has_streaming": true
}'
{
"success": true,
"data": "Hi, how may I help you?",
"trace": {}
}
Authentication headers
string
required
The ID of the agent.
Params
string
required
The ID of the agent.
Body
object
An object containing the request to the Agent
Show input object
Show input object
string
The message to the agent
boolen
Whether or not to return the response as an
EventSource streamstring
An optional session identifier.
Response
boolean
Indicates whether the call was successful.
object
Agent object
curl --location --request POST 'https://api.rapidagent.ai/api/v1/agents/{agentId}/predict' \
--header 'Content-Type: application/json' \
--header 'X_SUPERAGENT_API_KEY: <api_token>'
--data-raw '{
"input": {"input": "Hi"},
"has_streaming": true
}'
{
"success": true,
"data": "Hi, how may I help you?",
"trace": {}
}