AI Preferences: Saying What AI May Do With Your API

AI Preferences: Saying What AI May Do With Your API

Every API provider has an opinion about AI now, whether they have written it down or not. Can the data coming out of your API be used to train a model? Can it be fed into an assistant that answers a user’s question? Can an agent sign up for an account, take actions, or make a purchase on somebody’s behalf? Most of the time the answer is buried in a terms of service page, a sentence or two in a section nobody reads, and the consumer, human or machine, has to dig it out and interpret it. The AI Preferences element in API Commons is an attempt to pull that answer out into the open and make it something you can read without a lawyer.

The element covers two things. First, the stances: training AI, training generative AI, using output for AI inference or search, and whether an AI agent may onboard, act or buy for a person. Second, the machine signals a provider publishes alongside those stances, such as an AIPREF header, Content Signals, an ai.txt or an llms.txt file.

What it looks like

Here is the APIs.json entry, with the property type AIPreferences, using the example from the element definition:

- name: AI Preferences
  type: AIPreferences
  description: The ai preferences of the Example Weather API, harvested from its own page.
  url: ai-preferences/example-weather-api-ai-preferences.yml
  source_date: '2026-11-09'
  data:
    ai_preferences: 0.1.0
    provider: Example Weather API
    aid: example-weather-api
    url: https://weather.example.com/legal/api-terms
    source_date: '2026-11-09'
    train_ai:
      stance: prohibited
      text: You may not use API output to train machine learning or artificial intelligence models.
    train_genai:
      stance: prohibited
      text: You may not use API output to train machine learning or artificial intelligence models.
    ai_use:
      stance: allowed
      text: You may use API output as input to AI assistants that answer end-user questions.
    agent_onboarding:
      stance: unstated
    agent_actions:
      stance: conditional
      text: Automated agents may call the API only with a key issued to the account holder.
    agent_purchases:
      stance: unstated
    signals:
      aipref_header: false
      content_signals: true
      ai_txt_url: null
      llms_txt_url: https://weather.example.com/llms.txt

I trimmed the derivation block for space; the full example on the element page also records how and when the stances were harvested. The file usually lives next to the rest of a provider’s APIs.json artifacts, and every stance points back to the page and the exact text it came from. The schema and a validator live at api-commons/ai-preferences.

Why it matters

For consumers, this is a question that increasingly decides whether they can use an API at all. If you are building a product that puts API output in front of a model, you need to know whether that is allowed before you ship, not after a letter arrives. A stance of prohibited, allowed, conditional or unstated, with the original sentence quoted beside it, is a lot faster to act on than a forty-page agreement.

For agents, it matters even more. An agent reading an API has no way to just know the provider’s posture. It can read an OpenAPI to learn what it is able to do, but nothing in that contract says what it is permitted to do. AI Preferences fills in that second half. The agent_onboarding, agent_actions and agent_purchases stances are the ones I think will matter most over the next couple of years, as agents stop just reading and start signing up and paying.

I’ll be honest about where this is thin. Most providers do not state most of these things, which is why unstated is a first-class value and not an error. The signals side is also still moving. The IETF AIPREF Working Group is chartered to produce a vocabulary for AI-related preferences and ways to attach it to content, through well-known URIs like robots.txt and through HTTP response headers, but that work is not finished. Content Signals, ai.txt and llms.txt are community efforts that overlap in places, and llms.txt is really about helping a model read your docs rather than stating a preference. This element does not pick a winner; it records which ones you publish.

Getting it right

  • Quote, don’t paraphrase. Every stance should carry the text it came from and the URL of the page. An interpretation without its source is just an opinion.
  • Use unstated honestly. If your terms say nothing about agents making purchases, say that. Don’t upgrade silence to allowed or prohibited.
  • Separate training from use. Training a model on your output and passing your output to a model at inference time are different things, and providers often treat them differently. The schema keeps them apart for a reason.
  • Keep the signals consistent with the words. If your terms prohibit training but your headers and robots.txt say nothing, the machines will believe the machines. Make them agree, and refresh the source_date when either changes.

The full definition is on the AI Preferences element page, along with its related elements: terms of service, license, llms.txt, agent skills and the Model Context Protocol. If you think the stances are missing something, or the signals list is out of date, open an issue or a pull request at github.com/api-commons/api-commons.

← Agent Skills: Packaging What an Agent Needs to Use Your API
The API Identifier: The Name Everything Else Points At →