Literal AI icon

Literal AI

Use the Literal AI API

Overview

This node integrates with the Literal AI API to perform various operations related to AI project management, including handling users, scores, projects, steps, files, threads, datasets, experiments, and prompts. Specifically for the Step resource with the Get Many operation, it retrieves multiple step records from the Literal AI system, optionally filtered by user-defined criteria and limited in count.

Common scenarios where this node is beneficial include:

  • Fetching a batch of AI processing steps for analysis or reporting.
  • Retrieving filtered steps based on specific metadata or attributes.
  • Integrating step data into workflows for further automation or decision-making.

For example, a user might want to get the latest 50 steps that match certain filter conditions (e.g., steps related to a particular project or status) to monitor progress or trigger downstream actions.

Properties

Name Meaning
Return Item Count Maximum number of step results to return. Must be at least 1. Default is 50.
Filters JSON array of filters to apply when retrieving steps. Allows specifying conditions to narrow down the results.

Output

The node outputs an array of items, each containing a json object with a single property:

  • content: This holds the response data returned by the Literal AI API for the requested steps. It typically includes an array of step objects matching the query parameters (limit and filters).

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "content": [
    {
      "id": "step_123",
      "name": "Example Step",
      "status": "completed",
      "metadata": { ... }
    },
    ...
  ]
}

Dependencies

  • Requires an API key credential for the Literal AI API to authenticate requests.
  • The node uses the official Literal AI client library (@literalai/client) to interact with the API.
  • Proper configuration of the API key credential within n8n is necessary before use.

Troubleshooting

  • Invalid API Key or Authentication Errors: Ensure the API key credential is correctly configured and has sufficient permissions.
  • Malformed Filters JSON: The Filters property expects valid JSON. Invalid JSON syntax will cause errors. Validate JSON format before input.
  • Limit Value Issues: The Return Item Count must be a positive integer (minimum 1). Values below this may cause validation errors.
  • API Rate Limits or Network Issues: If the API returns rate limit errors or timeouts, consider adding retry logic or reducing request frequency.
  • Unexpected Response Structure: If the API changes its response format, the node's output may not match expectations. Check Literal AI API documentation for updates.

Links and References

Discussion