Straico Official icon

Straico Official

Get data from Straico API

Overview

The node integrates with the Straico API to perform various operations related to AI models, prompts, files, agents, and retrieval-augmented generation (RAG). Specifically for the Prompt - Completion operation, it sends a text message prompt to one or more selected language models (LLMs) or uses a smart LLM selector to generate text completions. This is useful for generating AI-driven text responses, content creation, summarization, or conversational AI tasks.

Typical use cases include:

  • Generating natural language completions or replies based on user input.
  • Using multiple AI models simultaneously to compare or aggregate results.
  • Automatically selecting the best model(s) based on quality, balance, or budget criteria.
  • Analyzing additional context such as files, images, or YouTube videos to enrich the prompt.
  • Controlling output creativity and length via temperature and max tokens settings.

Properties

Name Meaning
Model Names or IDs Select one or more specific AI models by name or ID for generating completions. If left empty, the node uses the Smart LLM Selector instead.
Message The text prompt or message to send to the AI model(s) for completion.
Smart LLM Selector Configuration to automatically select models based on:
- Quantity: Number of models to select (1-4).
- Pricing Method: Strategy for selection among "Quality", "Balance", or "Budget".
Additional Fields Optional extra parameters:
- Display Transcripts: Return transcripts of analyzed files.
- File URLs: Comma-separated list of up to 4 file URLs to analyze.
- Images: Comma-separated list of image URLs.
- Max Tokens: Maximum number of tokens to generate (1-2048).
- Replace Failed Models: Whether to replace failed models with similar ones.
- Temperature: Controls creativity/diversity of output (0-2).
- YouTube URLs: Comma-separated list of up to 4 YouTube video URLs to analyze.
Simplify If true, returns a simplified version of the response containing only key fields instead of the full raw data.

Output

The node outputs JSON data representing the completion result from the Straico API. The structure includes:

  • id: Identifier of the completion request.
  • message: The generated text completion.
  • model: The model used for the completion.
  • usage: Information about token usage.
  • created_at: Timestamp of the completion.

If the Simplify option is enabled, only these key fields are returned; otherwise, the full raw API response is provided.

The node does not output binary data for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Straico API.
  • Network access to https://api.straico.com endpoints.
  • Proper configuration of the credential in n8n to enable authenticated HTTP requests.

Troubleshooting

  • Error: "You must provide either models or smart_llm_selector."
    Occurs if neither specific models nor the smart selector is configured. Fix by specifying at least one model or enabling the smart LLM selector.

  • Error: "You cannot provide both models and smart_llm_selector."
    Both options cannot be used simultaneously. Choose either explicit models or the smart selector, but not both.

  • Invalid or missing binary data error
    Not applicable for this operation, but relevant for file upload operations in the same node.

  • API request failures
    Check that the API key credential is valid and has proper permissions. Also verify network connectivity.

  • Token limits exceeded
    Ensure max_tokens is within allowed range (1-2048).

Links and References

Discussion