Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs-v1.latitude.so/llms.txt

Use this file to discover all available pages before exploring further.

Code

You can retrieve a prompt from one of your Latitude projects. This is useful if you want to render the prompt in the format expected by the LLM you’re using and call it directly.
import { Latitude } from '@latitude-data/sdk'

async function run() {
  const sdk = new Latitude(process.env.LATITUDE_API_KEY, {
    projectId: Number(process.env.PROJECT_ID),
    versionUuid: 'live',
  })

  const response = await sdk.prompts.get('get-prompt/example')
  console.log('Prompt: ', response)
}

run()