younifyd
Menu

Ai File Upload

Upload File for AI

POST/ai/files

Use it in a workflow

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

Request

Request body

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

filestring (binary)required

The file to upload.

providerstringrequired

Provider to upload the file to.

One ofopenaianthropicgoogle

json
{
  "file": "string",
  "provider": "openai"
}

Response

Returns 200 with an object. Read it in later steps with {{aiFileUpload.response.data.<field>}}.

dataobject

Provider-specific file reference returned after upload.

json
{
  "data": {}
}

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

Was this page helpful?