Literal AI icon

Literal AI

Use the Literal AI API

Overview

This node integrates with the Literal AI API to manage various resources related to AI projects, including steps and their generations. Specifically, for the Step resource with the Delete operation, it deletes a step identified by its unique Step ID. This is useful in workflows where you need to programmatically remove obsolete or incorrect generation steps from your AI project data.

Practical examples include:

  • Cleaning up intermediate or failed generation steps after an experiment.
  • Automating project maintenance by removing outdated steps.
  • Managing lifecycle of AI-generated content within a larger automation pipeline.

Properties

Name Meaning
Step ID The unique identifier of the step to delete. This is required to specify which step should be removed.

Output

The node outputs a JSON object under the json field containing the response from the Literal AI API after attempting to delete the step. Typically, this will confirm successful deletion or provide details if the step was not found or could not be deleted.

No binary data output is produced by this operation.

Example output structure:

{
  "content": {
    // API response confirming deletion or error details
  }
}

Dependencies

  • Requires an active connection to the Literal AI API via an API key credential configured in n8n.
  • The node uses the official Literal AI client library (@literalai/client) to interact with the API.
  • Proper permissions on the API key are necessary to perform delete operations on steps.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent Step ID will likely result in an error from the API indicating the step cannot be found.
    • Missing or incorrect API credentials will cause authentication failures.
    • Network connectivity problems can prevent communication with the Literal AI API.
  • Error messages:

    • "Step not found": Verify that the Step ID is correct and that the step exists.
    • "Unauthorized" or "Invalid API key": Check that the API key credential is correctly set up and has the necessary permissions.
    • Timeout or network errors: Ensure stable internet connection and that the Literal AI service is reachable.
  • To handle errors gracefully, enable the node's "Continue On Fail" option to allow workflow execution to proceed even if deletion fails.

Links and References

Discussion