In brief: An API key provides access to the account; an AI token measures the text a model processes and is billed by usage. The author argues that this token should be treated as a product and examines why existing criminal-law categories do not provide a reliable answer, distinguishing prepaid balances from debt owed to the provider.

Earlier today, I wrote about stolen API keys and people using AI at someone else's expense. But that story leaves a question unanswered: what exactly is being stolen?

First, two terms we should keep apart. The key (also sometimes called a token) is the credential that opens the account. Here, though, we mean a token as the unit used to measure and consume AI: the smallest piece of text the model reads or writes. Part of a word, a short word, a punctuation mark. The key is the key to the house. The token is the electricity used inside.

We pay for tokens

Just look at a price list. One price for every million tokens you send, another for every million the model sends back. The bill is literally a token count.

To produce them, the provider needs data centres, chips, software and a huge amount of electricity. But none of that is what it sells. When I buy a sheet of cardboard, someone has used a factory, machinery and energy to make it. What I am charged for is the sheet of cardboard. When I pay for electricity, the power station has burned gas or driven turbines. What I pay for is kilowatt-hours.

The same applies to AI. The token is more than the unit used to measure something: it is the product. It is measured, paid for and consumed. If you pay in advance, your balance gradually turns into tokens. If you pay at the end of the month, each token turns into debt. In both cases, what changes hands is tokens.

The authorities are already looking at the end product

The idea is not so strange. In 2018, the Norwegian tax authorities had to decide what a company renting out computing capacity for bitcoin mining was selling. They concluded that it was selling just that, computing capacity. Electricity was merely a cost of producing it. That is the logic of the sheet of cardboard applied to computing.[1]

Other countries have gone further and made unauthorised use of other people's computers a criminal offence. In the United States, the federal law against computer fraud recognises the value of computer use. California, Texas and New York include computer time and processing among the services whose unauthorised use can be punished.[2][3][4][5] England and Wales distinguish between stealing electricity and dishonestly obtaining services. Switzerland expressly punishes obtaining services from data-processing equipment without paying.[6][7][8]

All these laws have something in common: they protect the machine and its use. None mentions the token. They stop at the factory and never reach the sheet of cardboard.

It happened with electricity too

This has happened before. In 1899, Germany's supreme court held that electricity was not a “thing” and could not be stolen. The following year, Germany passed a specific law.[9][10][11] In 1977, the Supreme Court of Virginia overturned a conviction for using a university computer without permission. Computer time was worth money, but it was not property that could be stolen under the law as it then stood.[12] The laws came later.

The lesson is always the same. A judge cannot convict on the basis of resemblance. When a new and valuable product does not fit the existing offences, the legislature needs to name it. And there are limits: in 2022, Japan's Supreme Court acquitted someone who had used visitors' computers to mine cryptocurrency through his website. The program was not considered socially unacceptable, so one of the requirements of the offence was missing.[13]

Stolen tokens are already in court

The clearest case so far is Storm-2139. Microsoft sued a group in the United States for using stolen keys to resell access to its models. In his recommendation of May 2026, the magistrate judge recounts allegations in the complaint, deemed admitted on default, about customers deprived of “tokens they had paid for”.[14]

This is a civil lawsuit, not a criminal conviction. The judge does not say that a token is a thing that can be stolen. But he describes the harm as it is: the victims had tokens they had bought taken away from them.

In Spain and Norway, there is no box for the token

If Clara, who runs the administrative services firm in my earlier article, reports tomorrow that someone has spent 1,480 euros on tokens at her expense, the prosecutor will have to find where that fits. And it is not easy.

In the earlier article, I presented Article 255 as an argument that could be defended. Here I explain why I do not think it is enough to give a reliable answer on token consumption. Article 255 of Spain's Criminal Code punishes fraudulent use of “telecomunicaciones u otro elemento, energía o fluido”: telecommunications or any other element, energy or fluid. A token is neither energy nor fluid. And “otro elemento” — any other element — is too vague to stretch, because criminal law does not allow analogy against the accused. Article 256 requires the use of someone else's terminal. Using an API is not quite that. And computer fraud under Article 249.1.a requires a non-consensual transfer of an asset. Often, what exists instead is a debt owed to the provider.[15]

In Norway, the Criminal Code treats energy as a thing, but does not name tokens.[16] Alongside computer fraud under § 371 b), its aggravated form under § 372 and handling the proceeds of crime under § 332, we will need to examine unlawful use of other people's computer systems under §§ 343 and 344, which the preparatory works discuss.[17][18][19][20] I know of no Spanish or Norwegian judgment on AI tokens.

One practical distinction helps. If Clara had a prepaid balance, the thief has spent money that was already hers. That looks very much like computer fraud. If she paid at the end of the month, someone has run up a debt in her name. That looks more like tapping into someone else's electricity meter. But neither box was made for the token.

Europe has not resolved it either

The EU has no specific category for AI tokens billed by usage. There are separate provisions that protect those who contract for the service.

The AI Act uses the word token, but only to measure the size of training data.[21] The Data Act regulates access to computing resources and switching providers, including exportable data. But it does not define the billed token as a product.[22] The Digital Content and Services Directive protects consumers. Member States can extend that protection to businesses.[23] For VAT purposes, an automated AI response fits the definition of an electronically supplied service, even if it is billed in tokens. A prepaid balance could be a voucher for VAT purposes, depending on how it is designed.[24][25]

In criminal law, Articles 3 and 7 of the directive on attacks against information systems protect the door: access and keys. They do not themselves make token consumption an offence.[26] The directive on fraud involving means of payment requires a transfer of money, monetary value or virtual currency. It is not clear that a token is any of these.[27] And MiCA, the crypto-assets regulation, is beside the point: billing an AI token by usage does not make it a crypto-asset that can be transferred and stored using distributed ledger technology or similar technology.[28]

Europe regulates the machine, the service, the tax and the door. The product on the bill still has no name.

We need to name it

The answer is not to stretch Article 255 or wait for a court to take the plunge. It is to do what was done with electricity: name it. Articles 255 and 256 of the Criminal Code need only expressly include tokens and other units of data processing billed by usage, just as Switzerland already does with data processing.[8] On one condition: not every breach of terms of use should become a crime.

And this goes beyond criminal law. We need clarity on how the price per token is disclosed, what happens to balances that expire, how prepayment is taxed and how it is accounted for.

In the meantime, any business using AI through an API should check four things: how much each token costs and who pays for tokens consumed without permission; whether it pays in advance or at the end of the month; whether its spending limit actually cuts off usage or merely sends an alert; and whether it keeps the records needed to show which tokens were its own and which were not.

If I am billed for tokens, I consume tokens, just as I consume kilowatt-hours rather than turbines. The meter already counts tokens. It is time the law counted them too.

Sources

  1. Skattedirektoratet, binding advance ruling 16/2018, on the sale of computing capacity.
  2. 18 U.S.C. § 1030(a)(4), Computer Fraud and Abuse Act (Cornell LII).
  3. California Penal Code § 502(b)(4) and (c)(3).
  4. Texas Penal Code, Chapter 33, §§ 33.01(7) and 33.02; Chapter 31, §§ 31.01(6) and 31.04 (theft of service).
  5. New York Penal Law § 165.15(11) (Public.Law).
  6. Fraud Act 2006, s. 11.
  7. Theft Act 1968, s. 13.
  8. Swiss Criminal Code, Article 150 (Fedlex, version of 1 October 2026).
  9. Reichsgericht, 1 May 1899, 739/99 (DeJure case entry).
  10. German Act of 9 April 1900 on the unlawful taking of electrical energy (Wikisource).
  11. StGB § 248c.
  12. Lund v. Commonwealth, 217 Va. 688 (1977).
  13. Supreme Court of Japan, 20 January 2022, Coinhive case.
  14. Microsoft v. Yadegarnia, E.D. Va., Report and Recommendation, 26 May 2026.
  15. Spanish Criminal Code, Articles 4.1, 249, 255 and 256 (BOE).
  16. Straffeloven § 12 (Lovdata).
  17. Ot.prp. nr. 22 (2008–2009), section 2.13.
  18. Straffeloven §§ 371–372 (Lovdata).
  19. Straffeloven § 332 (Lovdata).
  20. Straffeloven §§ 343–344 (Lovdata).
  21. Regulation (EU) 2024/1689, AI Act, Annex XIII.
  22. Regulation (EU) 2023/2854, Data Act, Article 2.8.
  23. Directive (EU) 2019/770, Articles 1, 2.2 and 2.6; recital 16.
  24. Implementing Regulation (EU) 282/2011, Article 7.
  25. Directive (EU) 2016/1065, on vouchers.
  26. Directive 2013/40/EU, Articles 3 and 7.
  27. Directive (EU) 2019/713, Articles 2 and 6.
  28. Regulation (EU) 2023/1114, MiCA, Article 3.

Text by Roberto Ortega, prepared with AI editorial assistance. The Norwegian and English editions are editorial adaptations of the Spanish original.