Get Your Credentials

Configure your API credentials for development

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


Copy Your Credentials

In the Developer Portal, navigate to your project and go to API Settings.

API Settings showing connection information

Required Credentials (All SDKs)

Copy these three values from the Developer Portal:

Credential
Description

Organization ID

Your organization identifier (shared across projects)

Environment ID

Your environment identifier (Preview or Production)

JWT Secret

Authentication secret for API access


Configure Your Environment

Required (All SDKs)

Create a .env file in your project root:

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.

TypeScript: Install dotenv to load environment variables: npm install dotenv

Optional: TypeScript Streaming

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

# 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.

Python/C# developers: You don't need this. Use promptConversation() (synchronous) for all conversations. Real-time streaming is a TypeScript SDK-specific feature.


Verify Your Setup

Test that your credentials work:

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).


Next Step

Start building → - Create your first streaming AI agent


Need Help?

Last updated

Was this helpful?