Skip to main content
The Prompt Library API lets you manage prompts and prompt folders programmatically. Use it to sync prompts from a repository, bulk-update templates, and keep folder sharing in step with your content workflow.

Base URL

Dedicated deploymentsReplace api.langdock.com with <your-deployment-url>/api/public in all requests.

API Key Scope

All Prompt Library API endpoints require an API key with the PROMPT_API scope.
Create an API key with PROMPT_API scope in your workspace settings. The API acts as the user who created the key, including their Prompt Library access and sharing permissions.

Available Endpoints

Prompt Object

Prompt endpoints return the same prompt object:

Folder Object

Folder endpoints return the same folder object:

Permissions

Requests use the user who created the API key for permissions and access: A prompt cannot be shared with the workspace and assigned to a folder at the same time. A folder cannot be shared with the workspace and a group at the same time. Deleting a folder also deletes the prompts in it. Private folders stay creator-only. Workspace sharing of folders uses the sharePrompts permission or workspace editor access.

Rate Limits

The Prompt Library API follows standard API rate limits. If you exceed the limit, you’ll receive a 429 response. Wait and retry with exponential backoff.
Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.