Explore practical examples of using the AgilityAI API endpoints for different use cases.
Generate a simple response based on a query and context.
{
"query": "What's the weather like?",
"context": "The current temperature is 72°F with clear skies."
}
This example demonstrates how to generate a book using a multi-step approach:
{
"query": "Create a schema for a book structure",
"context": "The schema should include title, description, and an array of chapters with their titles and descriptions"
}
{
"query": "Generate a fantasy book outline",
"context": "Create a book about a magical library",
"schema": {
"title": "string",
"description": "string",
"chapters": [{
"title": "string",
"description": "string"
}]
}
}
{
"queries": [
{
"query": "Write chapter 1",
"context": "Book: The Enchanted Archives\nPlot: A magical library where books come alive\nChapter: The Discovery"
},
{
"query": "Write chapter 2",
"context": "Book: The Enchanted Archives\nPlot: A magical library where books come alive\nChapter: The First Adventure"
}
]
}