Skip to contentcloudvix
cloudvix
ExplainerDevelopers & AI

What makes an API ready for AI assistants: seven checks

Denys DunaievskyiFounder, Cloudvix
  • 7 min read
  • Published
  • LevelBeginner
Explained
On this page

Key takeaways

  • Whatever protection exists must therefore be in the API itself, not in a hope that the agent reads a warning.
  • A provider with a no on check 2 or 3 should not get an agent’s key at all.
  • With hourly orders paid from a balance, the balance is a ceiling too: an agent cannot spend money that is not there.

An AI assistant can call an API faster than you can read its answers, and it does exactly what its key allows. An API that is ready for agents is therefore mostly an API that limits damage and leaves evidence. These seven checks work for any provider. Next to each one you can see how the Cloudvix API answers, including where the answer is only partly yes.

Why an API needs more than endpoints

A person who orders a server by mistake sees a price and a button. An agent sees neither: it sees a function that returns a result. Whatever protection exists must therefore be in the API itself, not in a hope that the agent reads a warning.

The list below is what we would check before giving any agent a key, ours included. A no is not always a reason to refuse. It tells you where you must add a guard of your own.

The seven checks

Each check is a question that the provider’s documentation, or one request to its API, can answer. The table gives the question and how the Cloudvix API answers it today. The list under it says why each check matters.

  • Readable description: an agent that has to guess at endpoints will guess wrong in expensive ways.
  • Limited keys: a key that can do everything turns every mistake into a full-power mistake, and a key you can revoke limits how long one lasts.
  • Spending ceiling: a limit written in a prompt is a request, a limit in the API is a rule. Only the second survives a confused or manipulated agent.
  • Price first: agents act in loops. Without a price first, the cost shows up on the invoice, not in the plan.
  • Safe retries: a program reads codes, not sentences, and without a safe retry a dropped connection can create a second server.
  • Deliberate deletes: deletion is the one action you cannot take back, so make it need a second piece of information.
  • A trail: when something goes wrong you want to read what was done, not ask the agent what it remembers.
CheckThe questionCloudvix API today
A description software can readIs there a machine-readable description of every endpoint, field and error?Yes: an OpenAPI 3.1 file, and a llms.txt summary of the site.
A key that can be limitedCan you create a key that cannot do everything, and revoke it at once?Yes: a key does only what you allow. Resetting a server’s root password and ordering monthly or yearly plans need a permission that you tick when you create the key. A revoked key stops working at once.
A spending ceiling set by the providerIs there a limit on money and on the number of servers that holds even if the agent ignores its instructions?Yes: by default a key may spend up to €500 a month and hold 25 servers.
The price before the actionCan the agent ask what an order costs without placing it?Yes: the API has a price estimate.
Errors a program can read, and safe retriesAre there stable error codes, a Retry-After on limits and a way to repeat a request without doing it twice?Yes: every error has a stable code, requests above the rate limit get 429 with Retry-After, and orders and server actions accept an Idempotency-Key.
A deliberate step before anything irreversibleDoes a destructive call need more than one easily mistyped request?Partly: deleting a server needs the server named in the request, and all its data is destroyed. That stops a mistyped id, not an agent that was told to delete.
A trailCan you read afterwards what was done and when?Yes: there is an activity log.

Score any provider in ten minutes

Give each check 0 for no, 1 for partly and 2 for yes. There is no pass mark. A provider with a no on check 2 or 3 should not get an agent’s key at all. For the other checks, a no means that you add a guard of your own, as the next section describes.

The prompt below makes an assistant fill in the table for a provider from its public documentation. It only reads pages: it is told not to call the API and not to use any key.

Prompt to pastetext
Read the public API documentation at DOC_URL and nothing else. Do not call the API and do not use any key.

Rules:
1. Before you start, list the pages you will read and wait for my yes.
2. For each of the seven checks below answer yes, partly or no, and quote the sentence or name the page that shows it. If the documentation does not say, answer "not documented". Do not guess.
3. Finish with a table: check, answer, source, and what I would have to add myself.

The checks: a machine-readable description of the API; keys that can be limited and revoked; a spending ceiling set by the provider; the price before an order; stable error codes and safe retries; a deliberate step before deletion; a log of what was done.

What to add on your side when a check says no

Use a separate account or project for the agent, with a small prepaid balance. With hourly orders paid from a balance, the balance is a ceiling too: an agent cannot spend money that is not there.

Give the agent a key with only the permissions it needs, and put the key in the agent’s environment, not in the prompt. Use one key per agent, so that you can revoke one without stopping the rest.

If the API lacks check 4 or 6, put a thin wrapper between the agent and the API: a script that asks for the price first and never calls delete. Keep a log of your own as well.

Questions people ask

Is an OpenAPI file enough to call an API ready for agents?

No. It tells a program what exists, not what is safe. Checks 2 to 7 are about safety.

Does an agent need its own key?

Yes. One key per agent and per purpose lets you revoke one without stopping the rest, and keeps the limits of each separate.

What if I only use an assistant to write code that calls the API?

Then the key sits in your program and the assistant never holds it. Checks 2, 3 and 6 still decide how bad a bug in that code can get.

How often should I run the checks again?

Whenever the provider changes its API or you give the agent a new permission. This page shows the date it was last changed.

Where to go next

To see the checks applied, read how an assistant deploys over SSH with a restricted key, and the checklist for the server itself. Links are at the end of this page. For a chat assistant, connect it to your account so that no key passes through the chat.

About the author

Denys Dunaievskyi

Founder, Cloudvix

Runs Cloudvix and is responsible for the guides published here.

Related guides

Your server is a few clicks away.

Choose the plan and the system in one order form; the location too, when there is more than one.

Create server