Back to Models
openrouter/free
random-free
Global: Random - free to try
200,000 tokens
Input: ¥0/M
Output: ¥0/M
Specifications
Modalities
Input
text
image
Output
text
Code Examples
curl https://api.fastmetal.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "random-free",
"messages": [{"role": "user", "content": "Hello!"}]
}'How random-free actually answers
Real responses to our standard prompts, recorded on FastMetal.
Count the number of 'r's in 'strawberry'
Count the number of 'r's in 'strawberry'. Explain your reasoning step by step.
Certainly! Let's count the number of 'r's in the word "strawberry" step by step:
1. **Identify the word**: The word we are examining is "strawberry".
2. **Break down the word**: Let's look at each letter in the word:
- s
- t
- r
- a
- w
- b
- e
- r
- r
- y
3. **Count the occurrence of 'r'**: Now, we will count how many times the letter 'r' appears:
- The first 'r' is in the third position.
- The second 'r' is in the ninth position.
- The third 'r' is in the tenth position (which is actually the letter 'y' in this case, so it doesn't count).
4. **Verify the count**: We can double-check to ensure we haven't missed any 'r's or counted any incorrectly.…
10.8s response270 output tokens
Debug This Error
I'm getting the following error in my Node.js application: TypeError: Cannot read properties of undefined (reading 'map') at UserList (/app/components/UserList.js:12:25) at renderWithHooks (/app/node_modules/rea…
The error "TypeError: Cannot read properties of undefined (reading 'map')" means that the `users` prop passed to your `UserList` component is `undefined`. The `map` function is called on `users`, but `users` doesn't have a `map` method because it's `undefined`. React is trying to render the component, and when it encounters this undefined value, it throws the error.
Here's a breakdown of the problem and how to fix it, along with best practices:
**Understanding the Problem**
* **Prop Passing:** The `UserList` component expects a prop called `users`. This prop should be an array of user objects.
* **Missing or Incorrect Prop:** The error indicates that the `users` prop is not being pass…
71.2s response
Code Review
Please review the following Python function and suggest improvements for readability, performance, and best practices: def get_data(url, retries=3): import requests import time for i in range(retries):…
Here's arevised version of the function with improvements for readability, performance, and best practices, along with detailed explanations:
```python
import requests
import time
from typing import List, Dict
def get_data(url: str, retries: int = 3) -> List[Dict[str, str]]:
"""
Fetch and process data from a URL with retry logic, filtering active items.
Args:
url: The API endpoint to fetch data from.
retries: Number of retry attempts on failure (default: 3).
Returns:
List of dictionaries containing 'name' and 'id' of active items.
Returns empty list if all retries fail or no active items found.
"""
# Configuration constan…
28.8s response7560 output tokens
Frequently asked questions
- How much does the random-free API cost?
- On FastMetal, random-free is billed per token in yen: ¥0 per 1M input tokens and ¥0 per 1M output tokens, before tax. Usage is drawn from a prepaid balance; there is no subscription or monthly fee.
- Can I call random-free with the OpenAI SDK?
- Yes. Point base_url at https://api.fastmetal.ai/v1 and pass "random-free" as the model; existing OpenAI-style code works unchanged, including streaming, tool calls and structured output.
- What is the context window of random-free?
- 200,000 tokens, shared between the prompt and the response.
- What do I need to try random-free?
- Create an account and add credit; the model is then available both in the browser chat and over the API. There is no contract or minimum spend.
Try random-free right now
random-free is available on FastMetal through one API key. Start in the browser, or call it from the OpenAI SDK.