Getting Started

Getting Started with Cinna API


Install

To begin using the Cinna SDK, install it into your project using your preferred package manager. The SDK is available via npm and supports seamless interaction with Cinna services on Solana.

We recommend using pnpm for fast and efficient installation.

bashCopy codenpm i cinna

You can also use pnpm, yarn, or bun depending on your workflow.


Authentication

Cinna API requires authentication through an API key. This key confirms your identity and gives you access to the models and services provided through the SDK.

Keep the following best practices in mind:

  • Never expose your API key in frontend or public repositories

  • Store the key securely using environment variables or backend key management services

  • Always authenticate through a trusted backend service when possible


Example Authentication Flow

Below is a basic example showing how to authenticate your application using the Cinna SDK:

tsCopy codeimport Cinna from 'cinna'

const cinna = new Cinna({
  apiKey: process.env['CINNA_API_KEY'],
})

This initializes your SDK client with access to Cinna’s infrastructure. Once authenticated, you can start calling models for generation, embedding, and more — all anchored to Solana for transparency and verification.

Last updated