Quickstart

To use Embedchain as a REST API service, run the following command:

docker run --name embedchain -p 8080:8080 embedchain/rest-api:latest

Navigate to http://localhost:8080/docs to interact with the API. There is a full-fledged Swagger docs playground with all the information about the API endpoints.

Swagger Docs Screenshot

โšก Steps to get started

1

โš™๏ธ Create an app

  • cURL

  • python

  • javascript

  • go

curl --request POST "http://localhost:8080/create?app_id=my-app" \
 -H "accept: application/json"
2

๐Ÿ—ƒ๏ธ Add data sources

  • cURL

  • python

  • javascript

  • go

curl --request POST \
  --url http://localhost:8080/my-app/add \
  -d "source=https://www.forbes.com/profile/elon-musk" \
  -d "data_type=web_page"
3

๐Ÿ’ฌ Query on your data

  • cURL

  • python

  • javascript

  • go

curl --request POST \
  --url http://localhost:8080/my-app/query \
  -d "query=Who is Elon Musk?"
4

๐Ÿš€ (Optional) Deploy your app to Embedchain Platform

  • cURL

  • python

  • javascript

  • go

curl --request POST \
  --url http://localhost:8080/my-app/deploy \
  -d "api_key=ec-xxxx"

And youโ€™re ready! ๐ŸŽ‰

If you run into issues, please feel free to contact us using below links: