Making your first API request

You are now ready to make your first call with the Basalt API. Below, you will discover how to get your first prompt.

Prerequisites

  • You have an API key. If you don't have it, you can create one in the your Settings.
  • You have deployed a prompt. If you don't have one, you can deploy one in the your Settings.

Get your prompt

// Import the Basalt SDK
import Basalt from '@basalt-ai/sdk'

// Initialize the SDK with your API key
const basalt = new Basalt(token)

// Get your prompt
await basalt.prompt.get('my-prompt-slug')

What's next?

Great, you're now set up with an API client / SDK and have made your first request. Here are a few links that might be handy as you venture further into the Basalt SDK:

Was this page helpful?