Skip to main content
POST
/
api
/
v3
/
agents
/
run-agents
/
{agent_name}
/
run
Run Agent
curl --request POST \
  --url https://api.nugen.in/api/v3/agents/run-agents/{agent_name}/run \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "message": "<string>"
}
'
{
  "agent_id": "<string>",
  "model": "<string>",
  "response": "<string>",
  "usage": {
    "total_tokens": 123,
    "input_tokens": 123,
    "output_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Session-ID
string | null

Path Parameters

agent_name
string
required

Name of the agent to execute

Body

application/json
message
string
required

User message or prompt to send to the agent

Response

Returns the generated response from the agent along with usage statistics and model information after executing the specified agent by name

agent_id
string
required

Agent identifier

model
string
required

Model used for execution

response
string
required

Agent response

usage
AgentExecutionUsage · object
required

Token usage information