Document API: Embeddings Retry Generate beta

Document embeddings generation may fail due to various reasons such as OpenAI API rate limits, invalid API keys, document parsing errors, special characters, corrupted or locked PDFs, and excessively large documents. If the issue is related to the API key, it needs to be corrected; before retrying, ensure that the document is accessible and can be parsed correctly.

You need to regenerate document embeddings in a memory before you can use them. The retry document API endpoint allows you to retry generating document embeddings in a memory on Langbase with API. This endpoint requires a User or Org API key.


Deprecation Notice

This API endpoint has been deprecated. Please use the new embeddings retry document API endpoint.


Generate a User/Org API key

You will need to generate an API key to authenticate your requests. For more information, visit the User/Org API key documentation.


Deprecated/beta/memorysets/{owner}/documents/embeddings/retry

Retry generating document embeddings in a memory

Retry generate document embeddings in a memory by sending a POST request to this endpoint.

Required headers

  • Name
    Content-Type
    Type
    string
    Description

    Request content type. Needs to be application/json.

  • Name
    Authorization
    Type
    string
    Description

    Replace <YOUR_API_KEY> with your User or Org API key.

Required path parameters

  • Name
    owner
    Type
    string
    Description

    The organization or user username.

    Replace {owner} with the organization or user username.

Request attributes

  • Name
    memoryName
    Type
    string
    Description

    The name of memory to which the document belongs.

  • Name
    documentName
    Type
    string
    Description

    Name of the document.

POST
/beta/memorysets/{owner}/documents/embeddings/retry
curl https://api.langbase.com/beta/memorysets/{owner}/documents/embeddings/retry \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-d '{
  "memoryName": "rag-memory",
  "documentName": "file.pdf"
}'

Response

{
  "success" : true,
}