Skip to main content
Version: 0.6.0

Quick Start

Follow these steps to quickly get started with Seaplane.

note

Please note prior to proceeding with the following instructions you need Python 3.10 or higher installed on your machine. For more information on installing Python please go to our SDK Installation Page.

  1. 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.

  2. 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 running seaplane --version. This should return the currently installed Seaplane version.

  3. Create your first application by running seaplane init hello_world. This creates the default Seaplane directory structure and populates the main.py file with a hello world app.

  4. Open the .env file in the root directory of your project. Replace sp-your-api-key with your Seaplane API key which you can get from the Flightdeck.

  5. Open a terminal and navigate into hello_world/ directory created in step three. Run poetry install to install the required packages followed by seaplane deploy to deploy your first application.

  6. Your new application is now available at https://carrier.cplane.cloud/v1/endpoints/hello-world-app. Start a new batch request by calling your endpoint with a POST request.

    TOKEN=$(curl -X POST https://flightdeck.cplane.cloud/identity/token --header "Authorization: Bearer ${API_KEY}")
    curl -X POST -H 'Content-Type: application/octet-stream' \
    -H "Authorization: Bearer $TOKEN" \
    -d '{"input" : [{"hello": "world"}]}' https://carrier.cplane.cloud/v1/endpoints/hello-world-app/request
  7. Query the API for the output of your batch request using the request_id (batch-id) output from step six and the GET request listed below.

    curl -X GET -H "Authorization: Bearer $TOKEN" https://carrier.cplane.cloud/v1/endpoints/hello-world-app/response/<YOUR-BATCH-ID>.1
  8. If implemented correctly, your API returns the batch-id, "hello world", and status "completed".

    {"id":"b8329b4b-6ecc-46bf-878a-3cf420a8524a","output":["hello world"],"status":"completed"}