Menu
Ai Chat
AI Chat
POST
/ai/chatUse it in a workflow
- Add a step and choose the Directus connector.
- Pick the Ai Chat action (under AI).
- Fill in the fields below, then reference the result from later steps as
{{aiChat.response.data}}.
Request
Request body
Enter the body as JSON in the step's Body field.
{
"provider": "openai",
"model": "string",
"messages": [
{}
],
"tools": [
null
],
"toolApprovals": {},
"context": {
"attachments": [
{}
],
"page": {
"path": "string",
"collection": "string",
"item": null,
"module": "string"
}
}
}
Response
Returns 200 with a string. Read it in later steps with {{aiChat.response.data.<field>}}.
Need more? See the Directus guide for connection setup and behaviour shared by every action.
Was this page helpful?