API authentication

The DataMind Platform API authenticates machine callers with your company's API key, sent in the x-api-key header. This page covers the header, what happens when a key is rejected, and the company settings that apply to every request you send.

Send the key with every request

Send the company key in the x-api-key header, for example x-api-key: <api_key>, on every request to the API.

A request that carries no key, an empty key or a key that DataMind does not recognise is refused before it reaches a model. It fails with status 401, code invalid_api_key and the message Invalid or missing API key. A key that was rotated or revoked is refused the same way. An Authorization: Bearer header does not authenticate a request on its own: a request that sends the key only that way is refused like one without a key.

For full request and SDK examples, see Use the API.

What the company key covers

Your company holds one active API key, and the same key covers:

An Administrator creates, rotates and revokes the key in Settings. The full secret is shown once, when it is created or rotated, so copy it then. A rotated or revoked secret stops working at once: requests that still send the old secret are refused. Paste the new secret wherever the old one was used, including DataMind OS and your applications.

Company settings that apply to every request

Three company settings shape the requests your key authenticates. An Administrator changes all three in Settings.

SettingWhat it does to your requests
RegionDecides where requests are processed. With EU, requests are processed in the EU, and your company uses the models served there. Embeddings are the one exception: they always run on the global route (Embeddings).
Prohibit PII transmissionWhen it is on, a request that carries personal data is not forwarded: it fails with status 400 and code content_filter, and the error names the kinds of data found, never the values. This applies to every request on your key, including the AI features of DataMind OS.
Provider sortSets which provider DataMind tries first for pay-as-you-go requests. The default is Throughput; a single request can override it with provider.sort.

Questions, answered

Which header carries the API key?

The x-api-key header, on every request. Use the API shows full examples for your first request.

What happens when the key is missing or not recognised?

The request is refused before it reaches a model, with status 401, code invalid_api_key and the message Invalid or missing API key. Check that the request sends the current company key, then send it again.

Why did my requests start failing after a key rotation?

A rotated or revoked secret stops working at once, so a request that still sends the old secret is refused with the 401 error above. Ask an Administrator to rotate the key or create a new one in Settings, then paste the new secret wherever the old one was used.

Does the Region setting change my API requests?

Yes. With Region set to EU, requests are processed in the EU, and your company uses the models served there. Embeddings are the one exception: they always run on the global route (Embeddings). An Administrator changes the setting in Settings.

Which provider order do my pay-as-you-go requests use?

Your company's Provider sort setting, which defaults to Throughput. One request can override it with provider.sort; see Use the API.

Does the company PII setting apply to my API requests?

Yes. When Prohibit PII transmission is on, a request that carries personal data is not forwarded: it fails with status 400 and code content_filter, and the error names the kinds of data found, never the values. Such a request uses no tokens. Remove the personal data and send the request again.

What does Last used count?

AI requests only. Last used does not count software downloads; you can see it on the key card in Settings.

Does DataMind record which client version we use?

When a request carries a version, DataMind records it for your company, so support can check which version you run. A request without a version leaves the recorded value unchanged.