Account
Authentication
API keys, the trial key for agents, and what works with no key at all.
Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)
API keys
Every call to a /v1 endpoint carries a key in the Authorization header:
curl https://api.millionshort.com/v1/sources \
-H "Authorization: Bearer $MILLIONSHORT_API_KEY"import os
import requests
r = requests.get(
"https://api.millionshort.com/v1/sources",
headers={"Authorization": "Bearer " + os.environ["MILLIONSHORT_API_KEY"]},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])const res = await fetch('https://api.millionshort.com/v1/sources', {
headers: { Authorization: `Bearer ${process.env.MILLIONSHORT_API_KEY}` },
});
if (!res.ok) throw new Error(`GET /v1/sources failed: ${res.status}`);
const { data } = (await res.json()) as { data: unknown };
console.log(data);The same call as a tool of the MCP server:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_sources",
"arguments": {}
}
}- A key starts with
ms-. - A key belongs to a team. Every key of a team draws on the same credit balance and the same rate limits.
- The full key is shown once, when it is created. After that only its first characters are shown. If you lose a key, revoke it and create another.
- A team can hold up to 10 active keys.
- Revoking a key stops it at once and cannot be undone.
- A key can have a monthly spending cap, and can be rolled: a new key replaces it while the old one keeps working for 24 hours. See The dashboard.
Create, name, cap, roll and revoke keys in the dashboard. The Free plan needs a signed-in account with a verified email address, and no card.
Send the key only in the header. Do not put it in a URL, and do not ship it in code that runs in a browser or a mobile app: call the API from your server.
A missing key is answered with 401 and the code AUTH_MISSING_KEY; a key that is malformed, revoked or expired with 401 and AUTH_INVALID_KEY. See Errors.
Signing in to the dashboard
Keys in the dashboard are made by a signed-in account. There are three ways to sign in to the dashboard:
| Way in | How |
|---|---|
| Email and password | Sign up with your address and a password of at least 8 characters. We send a confirmation link; the account opens when you open it |
| GitHub | Sign in with GitHub. The address your GitHub account has verified is the one we use |
| Sign in with Google. The address of your Google account is the one we use |
- One verified address is one account, whichever way you sign in. If you signed up with an email address and later sign in with GitHub or Google under the same verified address, you are in the same account, with the same keys, credits and plan.
- Forgot your password? The sign-in page sends a link to set a new one.
- No password yet? An account opened with GitHub or Google has none. "Forgot your password?" sets one; signing up again does not.
- A new sign-up opens nothing until its address is confirmed. No account, no dashboard key and no credits exist until the address is proved, by the confirmation link, the link to set a new password, GitHub or Google.
- An account you already had on millionshort.com keeps its email address and password where the sign-in page says so ("Have a millionshort.com account?"): sign in with them as before, with no confirmation link.
- A link we send works once and comes back to the dashboard's sign-in page. Open it in the browser you asked for it in. Opened elsewhere, a confirmation link still confirms your address, and you then sign in there; a link to set a new password cannot set one there, and is used up: ask for a new one.
- The sign-in page has no sign-in link by email. If you have no password, or have lost it, "Forgot your password?" sends a link to set a new one, and setting it signs you in.
A sign-in that cannot open a free account (the address is not verified, is a disposable address, or already belongs to another account: sign in the way you did when you created it) is answered with ACCOUNT_NOT_ELIGIBLE. It is a dashboard answer only and is never returned by a /v1 call.
Trial key for agents
An agent that cannot sign up can get a key with one call and no account:
curl https://api.millionshort.com/v1/keys/agent \
-H "Content-Type: application/json" \
-d '{ "agent": "my-agent", "purpose": "trying the search API" }'import requests
r = requests.post(
"https://api.millionshort.com/v1/keys/agent",
json={
"agent": "my-agent",
"purpose": "trying the search API"
},
timeout=30,
)
r.raise_for_status()
print(r.json()["data"])const res = await fetch('https://api.millionshort.com/v1/keys/agent', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"agent": "my-agent",
"purpose": "trying the search API"
}),
});
if (!res.ok) throw new Error(`POST /v1/keys/agent failed: ${res.status}`);
const { data } = (await res.json()) as { data: unknown };
console.log(data);| Field | Type | Notes |
|---|---|---|
agent | string, up to 60 characters | Required. The agent's name. |
purpose | string, up to 200 characters or null |
The response's data holds the key:
| Field | Type | Notes |
|---|---|---|
api_key | string | The ms-... key, shown exactly once. |
tier | trial | |
rate_limit | string | |
expires_in_days | integer | expires_in_hours rounded up to whole days. |
expires_in_hours | integer | |
expires_at | string | When the key stops working. |
team_id | string |
A trial key carries 25 credits and stops working after 24 hours; expires_at in the response gives the exact time. Trial keys are limited per network address and in total per day; past the limit the call answers 429. When the trial ends, create a key in the dashboard to keep going.
With the SDKs:
from millionshort import MillionShort
key = MillionShort().create_agent_key("my-agent").api_key
client = MillionShort(api_key=key)import { MillionShort } from 'millionshort';
const { api_key } = await new MillionShort().createAgentKey('my-agent');
const client = new MillionShort({ apiKey: api_key });Without a key
Two things work with no key at all. Both are for trying the service, not for building on it.
The playground. The Agents page has a search playground that runs real searches from the browser. It needs no key and asks for none. Limits per visitor: 6 searches a minute and 15 a day (a run that also shows a comparison counts as two), one source per search, up to 5 results, no explain.
The MCP server. The hosted MCP server accepts a connection with no Authorization header. A caller with no key gets the search and list_sources tools; list_sources then returns the names of the sources only. Limits per visitor: 10 free searches a day and at most 5 in a minute, one source per search, up to 5 results, no explain. Each answer says how many searches are left today. When they are used up, the tool says so and names the dashboard, where a key is free.
Neither of these is an API. The REST endpoints under /v1 always need a key, except POST /v1/keys/agent.
Which one to use
| You are | Use |
|---|---|
| Building a product or a script | An API key from the dashboard |
| An agent trying the API with no human to sign up | A trial key |
| Connecting an IDE or a coding agent | The MCP server with your API key |
| Connecting a chat assistant that cannot send a key | The MCP server with no key |
| Just looking | The playground |