# 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="/files/f9D6NHNy7ULOUayFggvW" 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](/getting-started/quickstart.md) - Build your first AI agent in 7 minutes.
{% endhint %}

***

## Next Step

[**Start building →**](/getting-started/quickstart.md) - 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).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphlit.dev/account-setup-one-time/credentials.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
