> ## Documentation Index
> Fetch the complete documentation index at: https://docs.opengiant.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart Guide

> Get up and running with the OpenGiant TypeScript SDK in just a few steps.

<img className="rounded-xl" src="https://assets.basehub.com/61703dd0/23687c970a404003ac8a06789558b6ae/image.png?format=auto&width=1500" alt="Run Toward" noZoom />

In just a few minutes, you'll have full control over how your AI communicates. Whether you're crafting customer support bots or designing immersive in-game NPCs, OpenGiant ensures every interaction feels thoughtful, on-brand, and unmistakably human.

Let’s get started.

***

## Step 1: Install the SDK

Add the OpenGiant SDK to your project using npm or yarn:

<CodeGroup>
  ```bash npm theme={null}
  npm install @opengiant/sdk
  ```

  ```bash yarn theme={null}
  yarn add @opengiant/sdk
  ```
</CodeGroup>

<Tip>
  For the best experience, use Node.js version 20 or higher.
</Tip>

***

## Step 2: Create Your Persona

Head over to [OpenGiant Studio](https://studio.opengiant.com) to craft your AI persona. Shape the tone, style, and personality to fit your brand.

Once you've created your persona, you’ll receive two essentials:

* **OG Key**
* **Persona ID**

We’ll use these in the next steps.

<Info>
  **Want a guided experience?** We’d be happy to walk you through setting up your persona and integrating OpenGiant. [Talk to us](https://opengiant.com/contact) and let’s build something great together.
</Info>

***

## Step 3: Initialize OpenGiant

Import and initialize the SDK with your OG Key, provider, and Persona ID:

```typescript theme={null}
import { OpenGiant } from '@opengiant/sdk';

const og = new OpenGiant({
  provider: 'openai', // e.g., 'openai', 'anthropic', 'cohere'
  providerApiKey: 'YOUR_PROVIDER_API_KEY',
  ogKey: 'YOUR_OG_KEY',
  personaId: 'YOUR_PERSONA_ID',
});
```

***

## Step 4: Shape AI Responses with OpenGiant

Use your provider's SDK as usual, then pass the raw output through OpenGiant to shape responses that resonate.

```typescript theme={null}
// Example using OpenAI's SDK
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // Default environment variable
});

async function main() {
  const chatCompletion = await client.chat.completions.create({
    messages: [{ role: 'user', content: 'I need help with my account statement.' }],
    model: 'gpt-4o',
  });

  // Pass raw response through OpenGiant
  const refinedResponse = await og.refine(chatCompletion);

  console.log(refinedResponse);
}

main();
```

***

## What’s Next?

* **Explore Advanced Features**: Set up adaptive style rules and dynamic personalization.
* **Integrate with More Providers**: OpenGiant works with OpenAI, Anthropic, Cohere, and custom LLMs.
* **Ensure Compliance**: Use our pre-built templates to meet industry standards effortlessly.

***

<Tip>
  **Want a guided experience?** We’re here to help you get the most out of OpenGiant. [Talk to us](https://opengiant.com/contact) and let’s make your AI unforgettable.
</Tip>

***

Every word counts. Own your tone.
