REST API Service
๐ Getting Started
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.
โก Steps to get started
1
โ๏ธ Create an app
curl --request POST "http://localhost:8080/create?app_id=my-app" \
-H "accept: application/json"
2
๐๏ธ Add data sources
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 --request POST \
--url http://localhost:8080/my-app/query \
-d "query=Who is Elon Musk?"
4
๐ (Optional) Deploy your app to Embedchain Platform
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:
Was this page helpful?