Making Your First Request

Complete walkthrough from installation to your first successful AI request. Get started in under 5 minutes.

Step 1: Create Your Account

  1. Go to cencori.com/dashboard
  2. Click "Sign Up"
  3. Sign in with Google, GitHub, or email
  4. Verify your email (if using email signup)

Step 2: Create a Project

  1. In your dashboard, click "Create Project"
  2. Enter a name (e.g., "My First App")
  3. Add a description (optional)
  4. Click "Create"

Tip: Create separate projects for development and production environments.

Step 3: Generate an API Key

  1. Navigate to your project
  2. Go to "API Keys" in the sidebar
  3. Click "Generate New Key"
  4. Choose environment (Test or Production)
  5. Copy the key immediately - it won't be shown again!
  6. Store it securely in your .env file
.env

Step 4: Install the SDK

JavaScript/TypeScript:

terminal

Python:

terminal

Step 5: Make Your First Request

index.ts

Step 6: Run Your Code

terminal

Expected Output:

output

Step 7: View in Dashboard

  1. Go back to your Cencori dashboard
  2. Navigate to "Request Logs"
  3. See your request with full details:
  • Timestamp
  • Model and provider used
  • Full request and response
  • Token usage and cost
  • Safety score

Try Different Models

Now try switching providers - just change the model name:

try-models.ts

Try Streaming

Get real-time responses with streaming:

streaming.ts

Troubleshooting

401 Unauthorized Error

Cause: Invalid API key

  • Double-check your API key
  • Verify it's in your .env file
  • Restart your application

403 Forbidden Error

Cause: Tier restriction or security filter

  • Free tier only supports Gemini models
  • Check if request was blocked for security
  • View incident in dashboard

Module Not Found

Cause: SDK not installed

  • Run npm install cencori
  • Check your package.json