Documentation

Private AI documentation

AideaMaker's Private AI API follows the OpenAI standard for Chat Completions, so the OpenAI SDKs work as they are; these pages say what is available today and what is not.

Quickstart

Make your first call in three steps.

  1. Create a free account and verify your email.
  2. Make a sandbox key in API, then Keys. It is shown once; keep it in an environment variable.
  3. Run your first call against the base URL below. https://api.aideamaker.com/v1
curl
curl https://api.aideamaker.com/v1/chat/completions \
  -H "Authorization: Bearer $AIDEAMAKER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "Laguna-S-2.1",
       "messages": [{"role": "user", "content": "Say hello"}]}'
Python
from openai import OpenAI
import os

client = OpenAI(base_url="https://api.aideamaker.com/v1", api_key=os.environ["AIDEAMAKER_API_KEY"])
reply = client.chat.completions.create(
    model="Laguna-S-2.1",
    messages=[{"role": "user", "content": "Say hello"}],
)
print(reply.choices[0].message.content)
JavaScript
import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://api.aideamaker.com/v1", apiKey: process.env.AIDEAMAKER_API_KEY });
const reply = await client.chat.completions.create({
  model: "Laguna-S-2.1",
  messages: [{ role: "user", content: "Say hello" }],
});
console.log(reply.choices[0].message.content);
Available today

Chat Completions, streaming (server-sent events), the model list (/v1/models), Bearer keys and OpenAI-style errors.

Not available yet

Tools (function calling), JSON mode, and other endpoints. Ask for JSON in your prompt instead.

Switch from the OpenAI SDK

Change the base URL and the key. Nothing else changes.

Python
from openai import OpenAI
import os

client = OpenAI(
    base_url="https://api.aideamaker.com/v1",
    api_key=os.environ["AIDEAMAKER_API_KEY"],
)
# nothing else changes
JavaScript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aideamaker.com/v1",
  apiKey: process.env.AIDEAMAKER_API_KEY,
});
// nothing else changes

Call the API from your own server. It does not accept requests from web pages (no cross-origin access), and a key placed in a web page is a key anyone can copy.

Authentication

Send your key as a Bearer token in the Authorization header. Any other way of sending it is refused with a 401.

Authorization: Bearer YOUR_KEY

A key starts with sk-am- and is shown once, when you create it. Keep it secret. You can replace or revoke it any time in API, then Keys. A sandbox key expires after 30 days and can be renewed.

Models

Put the id shown for a model in the table below in the model field of each request. GET /v1/models lists the models your key may use. More ids (aliases) for these models may be added later; the ids below keep working.

curl
curl https://api.aideamaker.com/v1/models \
  -H "Authorization: Bearer $AIDEAMAKER_API_KEY"
Python
for model in client.models.list():
    print(model.id)
JavaScript
for await (const model of client.models.list()) {
  console.log(model.id);
}
Id to use in requestsThe text to put in the model field of a request to choose this model.Model Input limitThe most tokens one request may send to this model, counting the whole conversation.Output limitThe most tokens this model may write in one answer. A request for more is cut to this figure.
Laguna-S-2.1Laguna122,8808,192
qualityQwen3.8 Flash Next245,76016,384

A model that another customer has rented is not available to your key while the rental lasts. The Models page shows until when, in CST.

Chat completions

POST /v1/chat/completions takes the standard Chat Completions request and returns the standard response, including the usage counts.

Parameters that work

modelRequired. The id of a model on the Models page.
messagesRequired. Roles system, user and assistant (developer counts as system). Text only. Up to 256 messages, and the whole request body up to 1 MiB.
max_tokens, max_completion_tokensThe output limit. The smaller of the two is used, and a value above the cap is cut to the cap.
temperatureFrom 0 to 2.
top_pAbove 0, up to 1.
stopA string, or up to 4 strings of up to 256 bytes each.
streamtrue for server-sent events. See Streaming.
stream_optionsinclude_usage adds a last chunk with the token counts.

Output is limited by your key's cap and by the model's cap. A request for more is cut to the cap without an error. A call that is not streamed ends after 50 seconds and is capped lower than a streamed one, so use streaming for anything long.

Qwen3.8 Flash Next reasons before it answers, and that reasoning counts toward the completion tokens in the usage counts.

Accepted and ignored

These fields do not cause an error and do not change the answer: seed, user, presence_penalty, frequency_penalty, and the name field of a message.

Not supported yet

The call still succeeds, so your code will not see an error, but these have no effect. Check your own requests against this list.

tools, tool_choice, parallel_tool_calls, functions, function_callNo tool or function calling. The model never answers with a tool call.
Messages with the role tool, or assistant messages with tool_callsLeft out of the conversation the model sees.
response_format (json_object, json_schema)No JSON mode and no structured outputs. Ask for JSON in your prompt.
nAlways one choice.
logprobs, top_logprobsNot returned.
Image, audio and file parts in message contentLeft out; the model answers without them.

These endpoints are not available and answer 404 in the OpenAI error format: /v1/completions, /v1/embeddings, /v1/responses, /v1/files, the image and audio endpoints, and GET /v1/models/{id}.

Streaming

Set stream to true to receive server-sent events: data chunks whose first delta carries the role, a final chunk with the finish reason, then data: [DONE]. Add stream_options with include_usage to get the token counts in a last chunk.

Python
stream = client.chat.completions.create(
    model="Laguna-S-2.1",
    messages=[{"role": "user", "content": "Write one sentence about autumn."}],
    stream=True,
)
for chunk in stream:
    if chunk.choices and chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")
JavaScript
const stream = await client.chat.completions.create({
  model: "Laguna-S-2.1",
  messages: [{ role: "user", content: "Write one sentence about autumn." }],
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}
curl
curl -N https://api.aideamaker.com/v1/chat/completions \
  -H "Authorization: Bearer $AIDEAMAKER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "Laguna-S-2.1", "stream": true,
       "messages": [{"role": "user", "content": "Write one sentence about autumn."}]}'

While a stream waits, the service sends a comment line (starting with a colon) every 15 seconds to keep the connection open; the OpenAI SDKs ignore it. A stream can run up to 9 minutes. An error inside a stream arrives as a data chunk holding the error, and the stream then ends without [DONE].

Errors

Errors use the OpenAI shape: an error object with message, type, param and code. Every response carries an x-request-id header; quote it if you contact us.

{"error": {"message": "Invalid API key.", "type": "invalid_request_error", "param": null, "code": "invalid_api_key"}}
StatusCodeWhat it means
400invalid_json, invalid_valueThe body is not valid JSON, or a field is missing or out of range. The param field names it.
401invalid_api_keyThe key is missing, wrong, revoked or expired. Check it in API, then Keys.
403model_not_allowedYour key may not use that model.
404model_not_found, unknown_urlNo such model, or no such endpoint.
413request_too_largeThe request body is over 1 MiB.
429rate_limit_exceededA rate limit was passed. Wait for the Retry-After time and send it again.
429insufficient_quotaYour credit or allowance is used up. Do not retry until it is topped up or renewed.
429(too many at once)Too many calls at the same time for your tier. Retry after one second.
504deadline_exceededA call that is not streamed took over 50 seconds. Use streaming.
5xxserver_errorThe service is busy or restarting. Retry after a pause.

Treat any 5xx answer, including a plain web-server page if the service is restarting, as a reason to retry after a pause.

Rate limits and tiers

Limits apply to your whole account, not to each key. A free account has the sandbox limits; paid tiers upgrade automatically as your total credit purchases reach each level.

TierA tier is the set of limits your account gets. It upgrades by itself when your total credit purchases reach the amount shown for the next tier. Qualifies at Monthly usage limitThe most spend per calendar month a tier allows, counted in CST. The sandbox has no monthly dollar limit because it is never billed. Requests / minHow many calls your whole account may start in one minute. Calls past it are refused with a 429 and a retry time. Tokens / minHow many tokens your whole account may use in one minute. Where models differ, the lowest figure of the approved models is shown. At the same timeHow many of your calls may be running at once. A call started past it is refused with a 429 and a retry after one second.
FreeVerified accountSandbox only3Sandbox1
Build$5 in total credit purchases$5005,0001,000,0001
Launch$100 in total credit purchases$5,00010,0004,000,0002
Grow$500 in total credit purchases$200,00015,00040,000,0003

Past a limit the call is refused with a 429 and a Retry-After header: wait that long and send it again. The OpenAI SDKs do this for you.

Billing and credit

Per-token use is paid from prepaid credit, bought from $5 and used oldest first. Credit expires 12 months after the purchase, and when it runs out, calls stop with a clear error.Prepaid credit stops being usable this long after the purchase. Credit from the oldest purchase is used first.

The usage counts in each response are the tokens we count for you. A small overrun after your balance reaches zero is taken from your next purchase. The sandbox is never billed.

ModelInputWhat one million tokens you send cost. A token is a short piece of a word; the usage counts in each response show how many your call used.OutputWhat one million tokens the model writes back cost. It is shown only once AideaMaker has set it; until then the model is not sold per token.
Laguna$0.075 per 1M$0.16 per 1M

Pricing

Rentals

A rental gives you exclusive use of one model for a 30-day prepaid term after approval, and your rental key works until the term ends.

How rentals work

Data handling

Your prompts and answers pass through our API gateway without being written to our databases, logs or backups. We keep usage records only (which key, which model, token counts, timing, result, and the calling address and software name) to bill, limit and run the service, for up to 400 days.

Calls travel over HTTPS, which encrypts them in transit over the internet.

Do not send health records, payment details or other regulated data unless we have agreed it in writing first.

Software built with us that uses Private AI keeps only what its own page says it keeps.

Privacy Policy

FAQ

What do you keep?

Usage records only: key, model, token counts, timing, result, and the calling address and software name, for up to 400 days. Your prompts and answers are not written to our databases, logs or backups.

Will it work with my code?

If you use Chat Completions with the OpenAI SDK, change the base URL and the key. Tools and JSON mode are not available yet; ask for JSON in your prompt.

Which models can I use?

The models on our approved list: Laguna and Qwen3.8 Flash Next today.

Why can a rental take up to 24 hours?

We check each contract before we enable exclusive access. You are not charged unless it is approved.

Can I send health records or payment details?

Not without a written agreement with us first. Private AI is for business content that is not regulated data; the Terms say what is allowed.

Who runs it?

AideaMaker LLC, a company in the United States, runs the Private AI service itself.

What happens when my credit runs out?

Calls stop with a clear error. Buy more credit any time. There are no surprise bills.

Can I try it before I pay?

Yes. A free account gives you a sandbox key and the playground at no cost, within the sandbox limits.

Ready to try it?

A free account gives you a sandbox key and the playground.