Quick Start
Follow these steps to quickly get started with Seaplane.
Create an account on the Flightdeck and follow the instructions to set up billing. Flightdeck automatically creates your first project and API key once you complete the billing setup.
Install the seaplane SDK. Open a terminal and run
pip3 install seaplane
. Make sure you have Python 3.10 or higher installed on your machine. We recommend you create a virtual environment to avoid dependency conflicts. Confirm everything is working correctly by runningseaplane version
. This should return the currently installed Seaplane version.Create your first application by running
seaplane init hello-world
. This creates the default Seaplane directory structure and populates themain.py
file with a hello world app.Open the
.env
file in the root directory of your project. Replacesp-your-api-key
with your Seaplane API key which you can get from the FlightdeckOpen a terminal and navigate into
hello-world/
directory created in step three. Runpoetry install
to install the required packages followed byseaplane deploy
to deploy your first application.Your new application is now available at
https://carrier.cplane.cloud/apps/hello-world-app/latest/hello
. Start a new batch request by calling your endpoint with aPOST
request.curl -X POST -H 'Content-Type: application/json' \
--header "Authorization: Bearer $(curl https://flightdeck.cplane.cloud/identity/token --request POST --header "Authorization: Bearer <YOUR-API-KEY>")" \
-d '{"input" : [{"hello": "world"}]}' https://carrier.cplane.cloud/apps/hello-world-app/latest/helloQuery the API for the output of your batch request using the
request_ID
output from step six and theGET
request listed below.curl -X GET \
--header "Authorization: Bearer $(curl https://flightdeck.cplane.cloud/identity/token --request POST --header "Authorization: Bearer <YOUR-API-KEY>")" \
https://carrier.cplane.cloud/apps/hello-world-app/latest/hello/request/<YOUR-BATCH-ID>If implemented correctly your API returns "hello world", the batch-id and status "completed"
{"id":"b8329b4b-6ecc-46bf-878a-3cf420a8524a","output":["hello world"],"status":"completed"}