Skip to main content
An API key gives your organization its own rate limit with no hourly cap, in place of the shared per-IP limit. With a key, the API also returns what each call used. See Rate limits for the numbers. To get a key, log in or follow the three steps on API keys. For an agent choosing between keyless calls, an API key, device login, MCP sign-in and pay per request, Access methods for agents puts each one in a single table.

CLI

Run this command and follow the browser flow:
The CLI uses device authorization, so an agent can run the command and give you the link to approve. To build the same login into your own tool, see Device login.

MCP

The CLI adds Keenable to your MCP clients with your credentials:
keenable configure-mcp --all configures every supported client it detects. To set up a client by hand, create an API key in the console and send it in the API key header. If your client signs you in instead of taking a key, such as a Claude custom connector, it connects to https://api.keenable.ai/mcp-oauth and opens the Keenable sign-in page. See Claude.

API key header

To set up an MCP client by hand, send your API key in the X-API-Key header. These configs add Keenable with a key:
Claude Desktop needs the last config. Claude Desktop accepts only local command servers in its config file and ignores a remote "url" entry without an error. If you don’t need to use your key, skip the file and add Keenable as a connector instead. Keys belong to your organization, never expire on their own, and can be rotated at any time. If your MCP client or framework supports only bearer tokens, send the key in the Authorization header with the Bearer scheme:
If you send both headers, the API uses the key in X-API-Key.

Try it without a key

You can try the MCP server, the CLI and the HTTP API before you create an account. Over HTTP, call the /public endpoints described in the API reference. They take no key, but they need an X-Keenable-Title header that names your application. If you don’t send a key, your requests share a public pool capped at 1,000 requests per hour and 10 requests per second per IP address. The responses carry no usage metadata: the MCP server returns the _meta["keenable/usage"] block only for calls with a key. Keyless requests are free, but Keenable logs each one. The log records the search query, or the fetched URL and its prompt, along with your IP address, your user agent and the X-Keenable-Title value. See Data and privacy. Each request also counts toward the per-IP limit. Use an API key for anything beyond a first look. Everyone on your network or egress address shares the per-IP pool, so you can’t control how much of it is left.

Pay per request without a key

An agent with a wallet can pay per request over the x402 protocol, with no account and no key. Each search or fetch costs $0.01 in USDC on Base, on the /v1/x402/* paths. That page lists the limits and error responses for these paths. For regular use, an API key costs less.

Device login

Device login gets an API key for a tool that can’t show a sign-in page, such as a CLI, a coding agent or a CI job. Your tool requests a code, a person approves it in the console, and your tool collects a new API key. The flow follows the device authorization grant in RFC 8628, so an OAuth library that supports that grant can run it. keenable login calls the same endpoints. The SDKs don’t wrap them yet, so call the HTTP API. Both endpoints accept JSON or form-encoded bodies, and only POST.

1. Request a code

Send client_id, a short name for your tool. label is optional and names the API key that the login creates:
The response holds the code your tool polls with and the code for the person:
The codes expire after expires_in seconds. agent_code repeats device_code for older clients. If you leave out label, the key is named agent <client_id> <date>, such as agent my-agent 2026-11-08.

2. Show the code to the person

Show the person verification_uri and user_code. The link already carries the code. The person signs in to the console and approves the code. The API key belongs to the organization they are signed in to.

3. Poll for the key

Poll every interval seconds with the device_code and the same client_id you sent in step 1:
After the person approves, the poll returns 200 with the key:
api_key and access_token hold the same key. Store it where your tool keeps secrets, such as the KEENABLE_API_KEY environment variable, and send it in the API key header. Each device_code returns a key only once. Until the person approves, each poll returns 400. error holds the RFC 8628 value, and code says what happened: Each of these bodies also has error_description and message with the reason in words, a fix and a docs_url. The authorization_pending and slow_down bodies also carry interval.

Request errors

The first column names the endpoint that returns each error: When the person approves in the console, a mistyped or expired code returns 404 user_code_not_found, and a code that was already approved returns 400 user_code_used.

Older agent_code grant

Older clients poll with grant_type=urn:ietf:params:oauth:grant-type:agent_code and send the code in agent_code. That grant still works. keenable login polls with the device_code grant and switches to this one only if the server rejects that grant type. The older grant differs from device_code in these ways:
  • It answers every poll with 200 and puts the state in error: authorization_pending, access_denied or expired_token.
  • It reports a used code or a different client_id as expired_token, and names the reason in code.
  • On success it returns only api_key.
  • It never returns slow_down, and it doesn’t return 503 while polling.

Error responses

An authentication error body has a code that says what went wrong and a fix that says what to do. None of these succeed if you retry the same request unchanged. On /v1/search and /v1/fetch, a 401 also names the keyless /public alternative in keyless. Every code the API returns, with the exact body you see and how to fix it, is on Errors.