Skip to main content
Every Langdock API key answers two questions:
  1. What does it call? A Model Gateway key calls AI models: chat completions, responses, messages, embeddings and, optionally, agent runs. A Platform API key works with Langdock itself: agents, workflows, knowledge folders, skills, prompts, integrations and the admin APIs.
  2. Who does it act as? A personal key acts as the member who created it, with that member’s access and spend limit. A workspace key belongs to the workspace, acts as its own service account and is created by an admin for shared apps and automations.
The split into Model Gateway keys and Platform API keys is rolling out together with the Model Gateway. If your account settings show Type and the Create key menu offers Model Gateway key and Platform API key, your workspace has it. Until then, a personal key can hold model access and platform scopes at the same time and uses the classic endpoints. Dedicated deployments use the classic endpoints for now.

Which key do I need?

If you are not sure, start with a personal Model Gateway key for anything that calls a model, and a Platform API key for everything else.

The two kinds side by side

Personal keys and workspace keys

Never share a personal key. Anyone who has it works as you and spends your budget. For anything shared, ask an admin for a workspace key. See API key best practices.

Hosts

Langdock serves the API on two hosts: So a Model Gateway key with Run agents calls models on gateway.langdock.com and agents on api.langdock.com. The same key works on both hosts. On the classic endpoints each model is reachable only in its provider’s own format, for example Claude through /anthropic/{region}/v1/messages. On dedicated deployments, replace https://api.langdock.com with https://<your-domain>/api/public.
gateway.langdock.com does not serve workspace keys or embeddings yet. Those requests get 403 model_gateway_unsupported. Send them to api.langdock.com instead.

Keys created before the split

A key created before the split can hold model access and platform scopes at the same time. It shows the Gateway + Platform badge. It keeps working on both hosts, and its scopes can only be reduced, not extended. Replace it with one Model Gateway key and one Platform API key when you can. See Move from a combined key.

Frequently asked questions

No. Both kinds look like sk-.... The kind comes from the key’s scopes and is shown in the Type column of your keys.
An agent run costs money like a model call, so it sits with the key that is governed by spend limits. Managing agents (create, update, publish) stays on Platform API keys.
Yes. Agent runs through the API count toward the model’s requests per minute and tokens per minute and toward the same spend limits as model calls. See Limits and usage.
No. Any personal key with model access works there, including keys created before the split, as long as the Model Gateway is enabled for you.