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

X_SUPERAGENT_API_KEY
string
required

The ID of the agent.

Params

agentId
string
required

The ID of the agent.

Body

input
object

An object containing the request to the Agent

has_streaming
boolen

Whether or not to return the response as an EventSource stream

session
string

An optional session identifier.

Response

success
boolean

Indicates whether the call was successful.

data
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": {}
}