Invoke AI Skill
Table of Contents
Overview
This JS API task invokes AI skills created in your Creator account with the necessary input query. This task returns the AI-generated result as a response.
Request Details
Syntax
ZOHO.CREATOR.invokeAISkill(config).then(function (response) {
console.log(response);
});
Syntax Details
The syntax holds:
- <config> (object) - The configuration required to invoke the AI skill. This configuration includes the following parameters.
Name | Type | Description |
ai_skill_name | string | Link name of the AI skill created in your Creator application. Eg: Book Suggester |
workspace_name | string | Scope name or account name. This can be obtained from the Creator URL. The highlighted part is the scope name: https://creator.zoho.in/userhome/john_smith/admindashboard#/microservices |
http_method | string | POST |
content_type | string | application/json |
payload | object | Request data for the AI skill API. It is the input query to instruct the AI with a prompt. The character limit for one query is 10,000. |
Possible Errors
Refer to this page for the complete list of error codes and messages.
Sample Request
CopiedThe below request invokes the AI skill Book Suggester, which is used in the Library Management app to analyze a reader's history and suggest relevant books.
var config = {
ai_skill_name: "Book Suggester",
workspace_name: "zylker",
http_method: "POST",
content_type : "application/json"
payload: {
"data" : {
"query" : "Analyze member's reading history and give book recommendations"
}
}
};
ZOHO.CREATOR.invokeAISkill(config).then(function (response) {
console.log(response);
});
Sample Response
Copied//response
{
"ai_response": "Member Reading Summary\n\n
The member shows a strong preference for mystery, historical fiction, and sci-fi genres.\nFrequent authors include Agatha Christie, Ken Follett, and Isaac Asimov.\n
Their average book rating is 4.3 out of 5.\n\n
Recent books read:\n-
And Then There Were None by Agatha Christie\n-
Pillars of the Earth by Ken Follett\n-
Foundation by Isaac Asimov\n\n
Book Recommendations\n\n
1. The Cuckoo’s Calling by Robert Galbraith\n
A modern mystery novel reminiscent of Agatha Christie’s detective storytelling.\n\n
2. The Nightingale by Kristin Hannah\n
A deeply emotional historical fiction novel suitable for fans of Ken Follett.\n\n
3. Dune by Frank Herbert\n
A science fiction classic with expansive world-building, ideal for Asimov readers.\n\n
4. The Seven Deaths of Evelyn Hardcastle by Stuart Turton\n
A time-loop murder mystery blending sci-fi and suspense—great for puzzle lovers.\n\n
5. The Book Thief by Markus Zusak\n
A powerful historical novel with a unique narrative voice and emotional resonance.\n\n
Suggested Next Steps\n\n-
Add to Reading Queue:
Queue these books for the member’s future reading.\n-
Get Audiobook Versions: Find out if these titles are available as audiobooks.\n-
Monthly Book Suggestions: Enable regular, personalized book recommendations."
}