Your tools. Our intelligence.
One key. Your way in.
Use Ruthless AI in this website or connect it to an application that supports a custom OpenAI-compatible Chat Completions endpoint.
Connect in three steps
- Sign in to Ruthless, open API keys and create a named key.
- Keep the key private. Connect an account with available credit; website chat and API requests use the same balance.
- Set the base URL to
https://getruthless.io/v1and the model toai-gateway.
export RUTHLESS_API_KEY='YOUR_RUTHLESS_API_KEY'
curl https://getruthless.io/v1/chat/completions \
-H "Authorization: Bearer $RUTHLESS_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: your-unique-request-id' \
-d '{
"model": "ai-gateway",
"reasoning_effort": "high",
"speed": "standard",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Explain this approach clearly."}]
}'Replace the placeholder with your own Ruthless key. Keep it on your server or in a trusted client’s protected settings; do not publish it in browser code, screenshots or a shared repository.
Stream an answer
Use the OpenAI Python package with Ruthless’s base URL. This uses Chat Completions; other OpenAI endpoints, including the Responses API, are not implied by compatibility.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["RUTHLESS_API_KEY"],
base_url="https://getruthless.io/v1",
)
stream = client.chat.completions.create(
model="ai-gateway",
messages=[{"role": "user", "content": "Write a short launch checklist."}],
reasoning_effort="high",
max_tokens=1024,
stream=True,
extra_body={"speed": "standard"},
)
for chunk in stream:
if chunk.choices:
print(chunk.choices[0].delta.content or "", end="", flush=True)For HTTP clients, set stream: true to receive server-sent events. Read the final usage receipt before treating the request as fully completed.
Effort, speed & web research
| Field | Values | What it does |
|---|---|---|
reasoning_effort | medium, high, xhigh | Choose the reasoning depth and price tier. Default: High. |
speed | standard, fast | Choose a routing preference. Default: Standard. |
max_tokens | A positive whole number | Set your response allowance for this request. |
web | "auto", true, false | Let Ruthless use native web research when needed, request web research explicitly, or leave it off. Additional web usage is charged. |
Read GET /v1/models for the public model ID and current pricing. See the pricing page for text, attachments, search and creations.
Automatic native web tools are separate from your own function tools. If you send your own tools, your client owns their execution and results.
Use Ruthless in an agent
Ruthless accepts function-tool definitions. Your application receives tool calls, runs the authorized action, then sends the tool result back in the conversation.
{
"model": "ai-gateway",
"messages": [{"role": "user", "content": "What is the weather in London?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Read the current weather for a city",
"parameters": {
"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]
}
}
}],
"tool_choice": "auto"
}- Read the assistant’s
tool_callsand validate each function name and arguments. - Execute the action in your client, with the permissions you intend to give it.
- Append the original assistant message and a
role: "tool"message with its matchingtool_call_idand result. Send the updated conversation to the same endpoint.
Lucian is one example of a compatible external client. Configure a Ruthless key, the base URL and model above where its settings support a custom provider. Ruthless does not import Lucian or automatically access other applications through your key.
Create images & video
Media uses separate model IDs and job-style responses. Preserve the returned id, check its status and download the available output. A creation can be ready while its final charge is still being confirmed.
curl https://getruthless.io/v1/images/generations \
-H "Authorization: Bearer $RUTHLESS_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: your-unique-image-request-id' \
-d '{"model":"ai-gateway-image","prompt":"A silver panther in a red-lit city","size":"2048x2048","n":1}'For an existing image job, read GET /api/media/jobs/JOB_ID with the same authorization header. Image requests support one to four outputs and up to three image references.
curl https://getruthless.io/v1/videos \
-H "Authorization: Bearer $RUTHLESS_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: your-unique-video-request-id' \
-d '{"model":"ai-gateway-video","prompt":"Slow tracking shot through a neon city","seconds":5,"resolution":"720p","aspect_ratio":"16:9"}'
# Read the SAME returned job; this does not create another video.
curl https://getruthless.io/v1/videos/JOB_ID \
-H "Authorization: Bearer $RUTHLESS_API_KEY"Asset URLs in data require the same account authorization. Download creations you want to keep; generation does not imply permanent file storage.
Keep requests and charges traceable.
Use a unique Idempotency-Key for each intended paid request. If the connection is lost, inspect the original request or media job before sending a replacement. A duplicate chat request can return HTTP 409 rather than generating another paid answer.
Your key can be revoked in the workspace. Requests without valid authorization fail with HTTP 401; insufficient available credit returns HTTP 402. Use the account’s Usage & balance screen to inspect request status and charges.