Skip to main content
The Assistants API will be deprecated in a future release.For new projects, we recommend using the Agents API. The Agents API provides native Vercel AI SDK compatibility and removes custom transformations.See the migration guide to learn about the differences.
An admin needs to create the API key and share the assistant with it. If you’re not an admin, invite one as an editor to your assistant using the “Share” button.

How to create an API key

  1. Navigate to Langdock and open the workspace settings from the dropdown menu. Navigate to workspace settings
  2. Click on API under Products in the sidebar. Go to API settings
  3. Click Create API key, enter a name, select the required scopes (at minimum “Agent API”), and confirm. Create new API key
  4. Copy your API key and store it securely. You won’t be able to view it again. Save your API key

How to share an assistant with the API key

  1. Navigate to Agents in the sidebar. Navigate to Agents
  2. Create a new assistant or select an existing one. Enter at least a name to save it. Create new assistant
  3. In the assistant editor, click the Share button in the top right corner. Edit assistant and share
  4. The share dialog opens showing current access settings. Share dialog
  5. Search for your API key by name and add it to share the assistant with the API. Invite API key
Only admins can connect an assistant with an API key. If you don’t see API keys in the share menu, ask an admin to perform this step.

Testing the API connection

Once shared, you can test your assistant via the Assistant API documentation. Use your API key and the assistant ID from the URL (https://app.langdock.com/assistants/ASSISTANT_ID/edit).

Migrating to Agents API

For new projects, we recommend using the Agents API instead:
Langdock blocks browser-origin requests to protect your API key. For more information, see our guide on API Key Best Practices.