Unrestricted Automated AI Tools: Scripts and Cron
Unrestricted automated ai tools are ordinary scripts that call a text API on a schedule: rewrite a folder of files, tag a spreadsheet, draft the morning report. This guide gives three working automations and the guardrails that keep them reliable.
Last updated

Summary
- Automation needs three things: an API key, a script that handles retries, and a scheduler such as cron.
- JSON mode turns a free-text model into a classifier you can load into a spreadsheet or database.
- Respect limits: 8 concurrent and 300 requests per minute on a full key; back off on HTTP 429.
- Classifying 10,000 short tickets costs about $0.40.
What automation means here
An automated AI tool is not a product you install. It is a loop: read an item, build a prompt, call the model, save the result. Once that loop exists, you can point it at any pile of text and let a scheduler run it while you sleep. Unrestricted automated ai tools matter mostly for content that aligned models handle poorly in bulk, such as dark-themed fiction, blunt moderation datasets or raw user messages, where a refusal in the middle of a batch breaks the pipeline.
This page uses the hosted OpenAI-compatible API on this site. The model is one open-weight model, tuned to answer without content refusals for lawful adult use, with one hard limit: no sexual content involving minors. It handles text only. You will use model ID uncensored and the base URL https://api.unrestrictedaitools.com/v1. Get a key on the API key page.
Shared helper: a client with retries
Every automation should survive a temporary error. Put this in ai.py and import it everywhere:
import os, time
from openai import OpenAI, RateLimitError
client = OpenAI(
base_url="https://api.unrestrictedaitools.com/v1",
api_key=os.environ["API_KEY"],
)
def ask(messages, **kwargs):
for attempt in range(6):
try:
resp = client.chat.completions.create(
model="uncensored", messages=messages, **kwargs
)
return resp.choices[0].message.content
except RateLimitError:
time.sleep(5 * (attempt + 1))
raise RuntimeError("gave up after repeated 429 responses")
Why a delay of at least five seconds? On temporary overload the API returns HTTP 429 with a Retry-After: 5 header. Limit errors also use 429: code rate_limited when you exceed requests per minute, and concurrency when too many requests run at the same time. Failed or refused requests are not charged, so retries are free.
Automation 1: batch rewriting
The task: take a CSV of product or story snippets and rewrite each in a consistent voice. Run it in parallel, but cap workers below the concurrency limit. A full key allows 8 at once; a trial key allows 2, so use 6 and 2 respectively.
import csv
from concurrent.futures import ThreadPoolExecutor
from ai import ask
SYSTEM = "Rewrite the text in a dry, confident voice. Keep every fact and number. Output only the rewritten text."
def rewrite(row):
text = ask(
[{"role": "system", "content": SYSTEM},
{"role": "user", "content": row["text"]}],
temperature=0.4,
)
return {"id": row["id"], "text": text}
with open("input.csv", newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
with ThreadPoolExecutor(max_workers=6) as pool:
results = list(pool.map(rewrite, rows))
with open("output.csv", "w", newline="", encoding="utf-8") as f:
writer = csv.DictWriter(f, fieldnames=["id", "text"])
writer.writeheader()
writer.writerows(results)
Low temperature keeps rewrites faithful. If a row is long, remember that the context window is 100,000 tokens for prompt plus completion and the request body can be up to 8 MB.
Automation 2: classification into JSON
Free text is hard to use downstream. JSON mode makes the model return a parseable object. This sorts incoming messages into categories:
import json
from ai import ask
SYSTEM = (
"Classify the message. Return JSON with keys: "
"category (one of: billing, bug, feedback, abuse, other), "
"urgency (1 to 5), and summary (max 15 words)."
)
def classify(message):
raw = ask(
[{"role": "system", "content": SYSTEM},
{"role": "user", "content": message}],
temperature=0,
response_format={"type": "json_object"},
)
return json.loads(raw)
print(classify("The export button crashes the page every time I click it."))
Validate the output anyway. If json.loads raises an error, or the category is not in your list, retry once, then park the item for a person to review. Models are reliable at this, not perfect.
What it costs
Say 10,000 tickets, each about 200 input tokens (with the instructions) and 20 output tokens. Input: 2,000,000 tokens x $0.15 / 1M = $0.30. Output: 200,000 tokens x $0.50 / 1M = $0.10. The whole run is $0.40. Time is the bigger factor: at 300 requests per minute, 10,000 requests need at least 34 minutes, so schedule long jobs overnight.
Automation 3: a scheduled morning draft
A third pattern is a job that produces something new on a schedule, such as a daily summary of a notes folder, a draft newsletter or a story chapter. This script reads a file of notes and writes a draft:
from datetime import date
from pathlib import Path
from ai import ask
notes = Path("notes/today.txt").read_text(encoding="utf-8")
draft = ask(
[{"role": "system", "content": "You write short, plain daily briefings."},
{"role": "user", "content": "Turn these notes into a briefing under 200 words:\n\n" + notes}],
temperature=0.5,
max_tokens=500,
)
Path(f"drafts/{date.today()}.md").write_text(draft, encoding="utf-8")
Schedule it with cron. Cron does not load your shell profile, so set the key in the crontab itself:
API_KEY=paste-your-key-here
0 6 * * * cd /opt/jobs && /usr/bin/python3 morning.py >> /var/log/morning.log 2>&1
Restrict the crontab to your user, because it now holds a secret. If the key is ever exposed, regenerate it on the key page: the old one stops working at once. Accounts that have topped up can hold up to 5 labelled keys, so give each job its own key and revoke one without touching the rest.
Guardrails for unattended runs
- Cap spending. Top up a small amount and watch
X-Balance-USDorGET /v1/balance. A job that runs out of credit simply fails, which is a built-in ceiling. - Log request IDs. The
X-Request-Idresponse header makes a bad item traceable. - Checkpoint progress. Write results as you go, so a crash at item 7,000 does not restart at zero.
- Review outputs by sampling. Read 20 random results per run. An automation can be consistently wrong.
- Keep humans on high-stakes decisions. Unrestricted does not mean unsupervised. Lawful adult use applies to the content you process and publish.
The API docs cover tool calling too, which lets a model trigger your own functions inside a loop. For background on what these models do and do not change, see uncensored AI myths versus facts.
Test before the full run
A mistake in a batch job repeats itself thousands of times, so rehearse first. Take the first 20 rows of your input and run only those. Read all 20 outputs. Check three things: is the format exactly what your next step expects, is the tone consistent, and did any item come back empty or cut off?
Then compute the real cost per item. Read the usage field in each response, add up input and output tokens, and multiply by the rates ($0.15 and $0.50 per 1M tokens). If 20 items used 4,000 input and 600 output tokens, the cost is $0.0006 plus $0.0003, or $0.0009. Scale by 500 and you know that 10,000 items will cost about $0.45 before you press the button.
Add a --limit option to your script, or a simple environment variable, so a test run and a production run use the same code. Keep the output in a file with the item ID next to each result, so you can rerun only the failures.
From script to queue worker
Once a script proves itself, you may want it to react to events instead of the clock: a new row in a database, a file dropped in a folder, a message in a queue. The pattern stays the same. A small worker takes one item, calls ask(), writes the result and moves on. Keep the number of parallel workers at or below 8 on a full key, and fewer if several programs share the same key.
If you run several jobs, give each its own key. Accounts that have topped up can hold up to 5 keys with labels, so the nightly classifier, the drafting job and your experiments can be told apart and revoked separately. Streamed requests keep a concurrency slot until the stream ends, so automations that do not need live output are better off without stream: true.
Pricing and top-up bonuses are on the pricing page. The minimum top-up is $20, and credit does not expire, so a modest balance can run many nightly jobs.
More guides
Frequently asked questions
How many requests can an automation send at once?
A full key allows 8 concurrent requests and 300 per minute. A trial key allows 2 concurrent and 60 per minute. Stay under those and back off on 429.
How do I get machine-readable output?
Set response_format to json_object and describe the keys in the system prompt. Parse the result and validate it before saving.
Will a failed run cost me money?
Failed or refused requests are not charged. You pay only for completed requests.
Can I run these scripts on a cheap server?
Yes. The scripts only send and receive text, so a small VPS or a spare computer with cron is enough.
Get your key in minutes
Register, copy your key, and update your base URL. That is the entire setup.