POST
/
action
/
invoke_llm
curl --request POST \
  --url https://api-lr.agent.ai/v1/action/invoke_llm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "instructions": "What is an AI agent?",
  "llm_engine": "gpt4o"
}'
{
  "status": 200,
  "response": "An AI agent is a software entity that performs tasks autonomously using artificial intelligence techniques. It perceives its environment through sensors, processes the information, and takes actions to achieve specific goals. AI agents can range from simple programs that perform basic tasks to complex systems capable of learning and adapting to new situations. They are used in various applications, including virtual assistants, autonomous vehicles, recommendation systems, and more. AI agents can be classified based on their capabilities, such as reactive agents, which respond to stimuli without internal state, and cognitive agents, which have memory and reasoning abilities."
}

Authorizations

Authorization
string
header
required

Bearer token from your account (https://agent.ai/user/settings#credits)

Body

application/json

Response

200 - application/json

Use GenAI (LLM)

The response is of type object.