Before You Start
- API key: Use a workspace or personal API key with the Embedding API scope.
Base URL
Parameters
All parameters from the OpenAI Embeddings endpoint are supported according to the OpenAI specifications, with the following exceptions:model: Currently only thetext-embedding-ada-002model is supported.encoding_format: Supports bothfloatandbase64formats.
Rate limits
The default limits are 500 RPM (requests per minute) and 150,000 TPM (tokens per minute).- RPM is enforced per workspace, model, and API key.
- TPM is shared by all API keys using the same model in a workspace.
- On Langdock Cloud, admins can set TPM for custom models in Settings > Workspace > Products > API; it caps the estimated size of a single request.
- On dedicated deployments, admins can configure custom limits per model in Settings > Workspace > Products > API.
429 Too Many Requests response.
Using OpenAI-compatible libraries
As the request and response format is the same as the OpenAI API, you can use popular libraries like the OpenAI Python library or the Vercel AI SDK to use the Langdock API.Example using the OpenAI Python library
Example using the Vercel AI SDK in Node.js
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.