Literal AI icon

Literal AI

Use the Literal AI API

Overview

This node integrates with the Literal AI API to manage datasets within the Literal AI platform. Specifically, the "Dataset - Create" operation allows users to create a new dataset by specifying its name and optional additional details such as description, metadata, and type.

Common scenarios where this node is beneficial include:

  • Organizing data for machine learning projects by creating datasets categorized as training or evaluation.
  • Adding descriptive metadata to datasets to improve data management and retrieval.
  • Automating dataset creation as part of an AI workflow in n8n.

Practical example:

  • A user wants to create a new training dataset named "Customer Feedback Training Set" with a description and some custom metadata about the source of the data. This node can be used to automate that creation step before adding items to the dataset.

Properties

Name Meaning
Name The name of the dataset to create.
Additional Fields Optional fields to provide extra information about the dataset:
- Description A textual description of the dataset.
- Metadata Additional metadata in JSON format to store custom key-value pairs related to the dataset.
- Type The type of the dataset; options are "Evaluation" or "Training".

Output

The node outputs a JSON object under the content field containing the response from the Literal AI API after creating the dataset. This typically includes details of the newly created dataset such as its ID, name, description, metadata, and type.

No binary data output is produced by this operation.

Example output structure (simplified):

{
  "content": {
    "id": "string",
    "name": "string",
    "description": "string",
    "metadata": { /* object */ },
    "type": "evaluation" | "training",
    // other dataset properties returned by the API
  }
}

Dependencies

  • Requires an API key credential for the Literal AI API configured in n8n.
  • The node uses the official Literal AI client library (@literalai/client) to interact with the API.
  • Proper network access to the Literal AI service endpoint is necessary.

Troubleshooting

  • Invalid API Key or Authentication Errors: Ensure the API key credential is correctly set up and has the necessary permissions.
  • Malformed JSON in Metadata: If providing metadata, ensure it is valid JSON; otherwise, parsing errors may occur.
  • Missing Required Fields: The "Name" property is required; omitting it will cause the API call to fail.
  • API Rate Limits or Network Issues: Temporary failures might happen due to rate limiting or connectivity problems; retrying may help.
  • Unexpected API Response: Check the Literal AI API documentation for any changes or updates that might affect the node's behavior.

Links and References

Discussion