Temperature Simulator API

Category: developer

Compare AI text generation at Temperature 0, 0.5, and 1.0 side-by-side. Calls OpenAI GPT-3.5 Turbo with three different temperature settings.

Endpoint

POST https://anythingtext.com/api/tools/tempsim
API Key Required Content-Type: application/json

API Key

This API requires an API key. No login or OAuth is needed. Generate your key from the API Keys section in your dashboard settings.

Include the X-API-Key header in all API requests:

X-API-Key: atk_your_api_key_here

Rate Limiting

API requests are limited to 60 requests per minute per user. If you exceed this limit, the API returns a 429 Too Many Requests response.

Every response includes rate limit headers:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
X-RateLimit-Reset: 42

When rate limited, the response body contains:

{ "error": "Rate limit exceeded. Maximum 60 requests per minute.", "retryAfter": 42, "limit": 60 }

Request Parameters

Name Type Required Description
prompt string Required The prompt to send at 3 different temperatures
Example: Write a haiku about programming

Response

Content-Type: application/json

Returns three AI-generated responses at temperature 0, 0.5, and 1.0.

{"temp0": "...", "temp05": "...", "temp10": "..."}

Error Responses

StatusDescriptionBody
401 Not authenticated {"error": "Please log in..."}
400 Bad request / Missing required params {"error": "... is required"}
500 Internal server error {"error": "Failed to ..."}

cURL Example

curl -X POST https://anythingtext.com/api/tools/tempsim \
  -H 'Content-Type: application/json' \
  -d '{"prompt": "Write a haiku about programming"}'

Code Samples

const response = await fetch('/api/tools/tempsim', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ prompt: 'Write a haiku about programming' })
});
const data = await response.json();
console.log('Temp 0:', data.temp0);
console.log('Temp 0.5:', data.temp05);
console.log('Temp 1.0:', data.temp10);
import requests

response = requests.post('https://anythingtext.com/api/tools/tempsim',
    json={'prompt': 'Write a haiku about programming'})
data = response.json()
print('Temp 0:', data['temp0'])
print('Temp 0.5:', data['temp05'])
print('Temp 1.0:', data['temp10'])
// HttpRequest request = HttpRequest.newBuilder()
//     .uri(URI.create("https://anythingtext.com/api/tools/tempsim"))
//     .header("Content-Type", "application/json")
//     .POST(HttpRequest.BodyPublishers.ofString("{\"prompt\":\"Write a haiku\"}" ))
//     .build();