Skip to main content
Lance REST Namespace spec is an OpenAPI protocol that enables reading, writing and managing Lance tables by connecting those metadata services or building a custom metadata server in a standardized way. LanceDB OSS allows you to interface with Lance tables via the REST Namespace. However, LanceDB’s Cloud and Enterprise products provide an extended REST API with additional endpoints for managing projects, tables, and data. If you have specific needs or questions about the Enterprise/Cloud REST API Namespace, please contact us.

Authentication

Cloud Enterprise All HTTP requests to LanceDB APIs must contain an x-api-key header that specifies a valid API key and must be encoded as JSON or Arrow RPC. The tutorial below demonstrates how to connect to LanceDB Cloud using the REST API.

Get the API Key

  1. Go to LanceDB Cloud and complete the onboarding.
create
  1. Let’s call this particular Project embedding.
  2. Save the API key and the project instance name: embedding-yhs6bg.
This is how the Project looks in the LanceDB Cloud Dashboard: projects
  1. In your terminal, check the existence of the remote Project. Specify the remote LanceDB Project db and region.
curl -X GET "https://{db}.{region}.api.lancedb.com/v1/tables" \
   -H "Content-Type: application/json" \
   -H "x-api-key: LANCEDB_API_KEY"
  1. Now, create a Table to store data. Let’s call it words.
curl -X POST "https://embedding-yhs6bg.us-east-1.api.lancedb.com/v1/tables/words" \
   -H "Content-Type: application/vnd.apache.arrow.stream" \
   -H "x-api-key: LANCEDB_API_KEY"
  • the db is embedding-yhs6bg
  • the region is us-east-1
  • the name of the table is words.
  1. Now check that the Table has been created:
curl -X GET "https://embedding-yhs6bg.us-east-1.api.lancedb.com/v1/tables" \
   -H "Content-Type: application/json" \
   -H "x-api-key: LANCEDB_API_KEY"
You can always check from the LanceDB Cloud Dashboard: words That’s it — you’re connected! Now, you can start adding data and querying it. You can visit the tutorial section to build your own applications with LanceDB.

Tutorials

Check out our tutorials on building various applications with LanceDB.