younifyd
Menu

Ai Object

AI Object Extraction

POST/ai/object

Use it in a workflow

  1. Add a step and choose the Directus connector.
  2. Pick the Ai Object action (under AI).
  3. Fill in the fields below, then reference the result from later steps as {{aiObject.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

providerstringrequired

AI provider to use.

One ofopenaianthropicgoogleopenai-compatible

modelstringrequired

Model ID for the selected provider.

promptstringrequired

Prompt describing the object to generate.

outputSchemaobjectrequired

JSON Schema 7 definition for the output object.

maxOutputTokensinteger

Maximum number of tokens in the model output. Minimum 256.

json
{
  "provider": "openai",
  "model": "string",
  "prompt": "string",
  "outputSchema": {},
  "maxOutputTokens": 0
}

Response

Returns 200 with a string. Read it in later steps with {{aiObject.response.data.<field>}}.

Need more? See the Directus guide for connection setup and behaviour shared by every action.

Was this page helpful?