# Get Your Credentials

After creating your project, you need three values to authenticate with the Graphlit API.

***

## Copy Your Credentials

In the [Developer Portal](https://portal.graphlit.dev), navigate to your project and go to **API Settings**.

<figure><img src="https://3584391222-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuqWSsGKnXu4c7XgGas6d%2Fuploads%2Fgit-blob-5268c962d02c1307df5c8fe5f004736af245f956%2Fimage.png?alt=media" alt=""><figcaption><p>API Settings showing connection information</p></figcaption></figure>

### Required Credentials (All SDKs)

Copy these three values from the Developer Portal:

<table><thead><tr><th width="200">Credential</th><th>Description</th></tr></thead><tbody><tr><td><strong>Organization ID</strong></td><td>Your organization identifier (shared across projects)</td></tr><tr><td><strong>Environment ID</strong></td><td>Your environment identifier (Preview or Production)</td></tr><tr><td><strong>JWT Secret</strong></td><td>Authentication secret for API access</td></tr></tbody></table>

{% hint style="warning" %}
**Security**: Never commit your JWT Secret to version control. Treat it like a password.
{% endhint %}

***

## Configure Your Environment

### Required (All SDKs)

Create a `.env` file in your project root:

```env
GRAPHLIT_ORGANIZATION_ID=your_org_id
GRAPHLIT_ENVIRONMENT_ID=your_env_id
GRAPHLIT_JWT_SECRET=your_secret
```

The SDK will automatically read these environment variables.

{% hint style="info" %}
**TypeScript**: Install `dotenv` to load environment variables: `npm install dotenv`
{% endhint %}

### Optional: TypeScript Streaming

Only needed if using `streamAgent()` for real-time responses:

```env
# Use the API key for your chosen LLM provider
OPENAI_API_KEY=your_openai_key
# OR
ANTHROPIC_API_KEY=your_anthropic_key
# OR
GOOGLE_API_KEY=your_google_key
# (etc.)
```

**Supported LLM clients**: `streamAgent()` works with OpenAI, Anthropic, Google (Gemini), Groq, Mistral, Cohere, Cerebras, Deepseek, xAI, and more.

**Our examples use OpenAI**, but you can use any supported provider. Get your OpenAI key from [platform.openai.com/api-keys](https://platform.openai.com/api-keys).

{% hint style="info" %}
**Python/C# developers**: You don't need this. Use `promptConversation()` (synchronous) for all conversations. Real-time streaming is a TypeScript SDK-specific feature.
{% endhint %}

***

## Verify Your Setup

Test that your credentials work:

```typescript
import { Graphlit } from 'graphlit-client';

const graphlit = new Graphlit();

async function main() {
  const project = await graphlit.getProject();
  console.log(`✅ Connected: ${project.project.name}`);
}

main();
```

Run it with `npx tsx hello.ts` (or your build tool of choice).

{% hint style="success" %}
**Next step**: [Quickstart: Your First Agent](https://docs.graphlit.dev/getting-started/quickstart) - Build your first AI agent in 7 minutes.
{% endhint %}

***

## Next Step

[**Start building →**](https://docs.graphlit.dev/getting-started/quickstart) - Create your first streaming AI agent

***

## Need Help?

* **Ask Graphlit**: Launch the chatbot in the Developer Portal (or visit [ask.graphlit.dev](https://ask.graphlit.dev)) for instant SDK answers.
* **Sample Apps**: Browse [graphlit-samples](https://github.com/graphlit/graphlit-samples) for end-to-end projects.
* **Discord Community**: Join [discord.gg/ygFmfjy3Qx](https://discord.gg/ygFmfjy3Qx) for real-time help.
* **Report Issues**: Open tickets at [graphlit-client-typescript](https://github.com/graphlit/graphlit-client-typescript/issues).
