Invoke a language model (LLM) to generate text based on input instructions, enabling creative and dynamic text outputs.
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",
"cache": false
}'
{
"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."
}
Bearer token from your account (https://agent.ai/user/settings#credits)
Use GenAI (LLM)
The response is of type object
.
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",
"cache": false
}'
{
"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."
}
Invoke a language model (LLM) to generate text based on input instructions, enabling creative and dynamic text outputs.
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",
"cache": false
}'
{
"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."
}
Bearer token from your account (https://agent.ai/user/settings#credits)
Use GenAI (LLM)
The response is of type object
.
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",
"cache": false
}'
{
"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."
}