OpenRouter - Bring Your Own Key
Pricing
from $0.14 / 1,000 results
OpenRouter - Bring Your Own Key
Use the OpenRouter platform to choose the best and most cost effective model for your prompts utilizing a standardized interface (including ChatGPT, Claude, Gemini, Llama, Mistral, and more). See instructions for creating an OpenRouter account and API key.
Pricing
from $0.14 / 1,000 results
Rating
0.0
(0)
Developer

Superlative
Actor stats
16
Bookmarked
39
Total users
2
Monthly active users
19 days ago
Last modified
Categories
Share
OpenRouter - A Unified Interface for LLMs
Note: Apify offers a built-in OpenRouter actor that does not require an OpenRouter API key. Use this actor if you prefer to bring your own OpenRouter key for billing or model access reasons.
This Apify Actor integrates with OpenRouter, providing access to a diverse array of Large Language Models (LLMs).
Recommended Use Cases
The OpenRouter Actor can be used in the Apify console or programmatically via the Apify api.
- Integration with Other Apify Actors: Use web scraping to collect data and prepare it as training or input data for LLM applications.
- Clay Users: From within Clay, generate personalized text for a company or contact, conduct company research, determine the ideal customer persona for a company, and more.
- General Integration with LLMs: Suitable for any use case requiring LLM interaction, whether from another Apify actor or an external application.
Single-Turn Requests
This actor supports single-turn messages due to their simplicity and broad applicability for Apify use cases. Multi-message dialog requests are not supported. However, you may send an array of messages to be processed individually which will use the same model parameters for each message.
Inputs
Review the OpenRouter documentation for more detail on specific parameters, supported models, and links to individual model specifications.
Required Inputs:
- api_key: Your OpenRouter API key. Encrypted and only used by the Actor at runtime.
- messages: An array of messages to process individually.
- model: Model specification (e.g.,
openai/gpt-4o,google/gemini-flash-1.5,cohere/command-r-plus). Defaults toopenrouter/auto.
Optional Parameters:
- max_tokens: Maximum number of tokens for the model response
- response_format: Response format type if not text (note: only option is
json_objectwhich is not supported by all models) - stop: Stop sequence for the model
- temperature: Sampling temperature
- top_p: Nucleus sampling probability threshold
- top_k: Top-k sampling value
- frequency_penalty: Frequency penalty
- presence_penalty: Presence penalty
- repetition_penalty: Repetition penalty
- seed: Random seed for reproducibility
Example Inputs
Example: Determine the Ideal Customer Persona (ICP) for a Company
- Scenario: Given details about a company (e.g., from LinkedIn), determine the Ideal Customer Persona (ICP) for the company.
{"api_key": "your-openrouter-api-key","messages": ["Your task is to determine the ideal customer persona (ICP) for a company based on their LinkedIn profile. An ICP is a hypothetical description of the type of customer that would be a perfect fit for the company's products or services. Here is the company's description: Apify is a full-stack web scraping and browser automation platform that lets you extract data from websites and automate workflows on the web. Describe the company's ICP in less than 100 words. Only output the description and no summary text, headings, or other markup."],"model": "openrouter/auto"}