AI
An OpenAI-compatible chat endpoint, billed per token.
AnythingCloud AI exposes the same request and response shape as the OpenAI chat completions API, so existing SDKs work by changing the base URL and key. Requests are metered from the token counts the model reports, split into cache hits, cache misses, and generated tokens. Usage is debited from your AnythingCloud balance as it accrues. Requests are independent, so any number of clients or servers can use the same key; no session or sticky routing is required.
Quick start
- Open Cloud → AI and choose
Create key. The key starts with
ac_ai_and is shown once. - Use
https://anything.solutions/v1as the OpenAI base URL. - Send a chat completion. Keep a positive AnythingCloud balance.
Connected apps
An app you sign in to with the AnythingCloud AI permission can request its own key. Requesting the key enables AnythingCloud for you if it is not already enabled. The key is billed to your balance and appears on the AI page as managed by the app, so you do not copy or handle the credential yourself.
To remove a managed key, revoke the app in Settings → Connected apps. The key stops immediately, and the app must ask you for access again before it can request another one. See OAuth for the integration details.
Python and JavaScript
Both official OpenAI SDKs work unchanged; set the base URL and AI key.
from openai import OpenAI
client = OpenAI(
base_url="https://anything.solutions/v1",
api_key="ac_ai_...",
)
response = client.chat.completions.create(
model="Qwen3.6-35B-A3B",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
print(response.usage)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://anything.solutions/v1",
apiKey: "ac_ai_...",
});
const response = await client.chat.completions.create({
model: "Qwen3.6-35B-A3B",
messages: [{ role: "user", content: "Hello" }],
});
console.log(response.choices[0].message.content);
console.log(response.usage);
Models
GET https://anything.solutions/v1/models lists every model this endpoint may
serve. Sending an unlisted model returns 404 model_not_found.
Each request chooses its model in the request body.
| Model | ID | Context |
|---|---|---|
| Qwen3.6 35B A3B | Qwen3.6-35B-A3B |
131,072 tokens |
| DeepSeek V4.1 Flash | deepseek-flash |
1,000,000 tokens |
Streaming
Set "stream": true to receive server-sent events. The first
tokens arrive immediately, which is better for long answers.
Pricing
Prices are per million tokens. A prompt token is a cache hit when the model reuses it from its prompt cache; otherwise it is a cache miss. Generated tokens are the tokens returned in the completion.
| Model | Cache hit | Cache miss | Generated |
|---|---|---|---|
| Qwen3.6 35B A3B | $0.05 / 1M | $0.30 / 1M | $1.00 / 1M |
| DeepSeek V4.1 Flash | $0.0066 / 1M | $0.33 / 1M | $1.32 / 1M |
Token counts come from the response's usage object. A
cache hit is read from prompt_tokens_details.cached_tokens;
cache misses are the remaining prompt tokens. The total is debited from
your balance as it reaches whole Points.
Billing and budgets
AI usage appears as its own category on the Billing page. You can set a monthly budget for AI API alone, or for all AnythingCloud, and optionally pause the account at the limit. A paused account cannot call the AI endpoint until it is resumed and funded.
Errors
Errors use the OpenAI shape:
{"error": {"message": "...", "type": "invalid_request_error", "param": null, "code": "..."}}
| Status | Meaning |
|---|---|
| 401 | The AI key is missing, invalid, or revoked. |
| 403 | AnythingCloud is not active or the balance is exhausted. |
| 404 | The requested model is not in the catalog. |
| 502 | The model service is unavailable. Retry shortly. |