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": "agent-123",
  "model": "nugen-flash-instruct",
  "response": "Hello! How can I assist you today?",
  "usage": {
    "input_tokens": 50,
    "output_tokens": 100,
    "total_tokens": 150
  }
}

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

Example:

"agent-123"

model
string
required

Model used for execution

Example:

"nugen-flash-instruct"

response
string
required

Agent response

Example:

"Hello! How can I assist you today?"

usage
AgentExecutionUsage · object
required

Token usage information

Example:
{
"input_tokens": 50,
"output_tokens": 100,
"total_tokens": 150
}