Skip to main content

Full API Keys Documentation

Need more details? View the complete API Keys guide with security best practices and advanced features.

What You’ll Learn

Create Your First Key

Generate an API key in under 2 minutes

Authenticate Requests

Make your first authenticated API call

Test & Verify

Verify your API key is working correctly

Best Practices

Learn essential security practices

Step 1: Create Your API Key

Using the Dashboard

  1. Log in to your NeuroAI account
  2. Navigate to SettingsUsers and TeamsAPI Keys
  3. Click Create API Key
  4. Fill in the details:
  5. Click Create
⚠️ Important: Copy your API key immediately and store it securely—you won’t be able to see it again!
Your API key will look something like this:

Step 2: Store Your API Key Securely

Never commit API keys to version control or hardcode them in your application source code.
Create a .env file in your project directory:
Add .env to your .gitignore:

Step 3: Make Your First API Call

Using cURL

Test your API key with a simple request:
Or using environment variables:

Step 4: Verify Your API Key

Test that your API key is valid and check its permissions:
Expected response:
✅ If you see "valid": true, your API key is working correctly!

Common API Operations

Now that your API key is set up, try these common operations:

List Agents

View all available AI agents

Create Task

Create a new AI task

Upload File

Upload files for processing

Get Task Status

Check task completion status

Example: Create a Task

Security Best Practices

Environment Variables

Store keys in .env files, never in source code

Separate Keys

Use different keys for dev, staging, and production

Rotate Regularly

Change your API keys every 90 days

Monitor Usage

Track API key activity for suspicious patterns

Quick Security Checklist

  • ✅ Store API keys in environment variables
  • ✅ Add .env to .gitignore
  • ✅ Use separate keys per environment
  • ✅ Set expiration dates for keys
  • ✅ Use minimum required permissions
  • ❌ Never commit keys to version control
  • ❌ Don’t share keys via email or chat
  • ❌ Avoid logging API keys

Troubleshooting

Problem: Your request is being rejected with a 401 error.Solutions:
  • Verify your API key is correct (no extra spaces or characters)
  • Check the Authorization header format: Bearer YOUR_API_KEY
  • Ensure the API key hasn’t been revoked or expired
  • Confirm you’re using the correct API base URL
Test your key:
Problem: Your API key doesn’t have permission for this operation.Solutions:
  • Check your API key’s role and permissions
  • Use a key with higher privileges (e.g., Administrator)
  • Create a new key with the required permissions
Check permissions:
Problem: You lost or forgot your API key.Solutions:
  • API keys cannot be retrieved after creation
  • Create a new API key from the dashboard
  • Revoke the old key if you’re concerned about security
  • Update your applications with the new key
Problem: Your code can’t read the API key from .env.Solutions for Python:
Solutions for Node.js:
Verify the file exists:

Next Steps

Full API Keys Guide

Learn about key types, permissions, and advanced features

API Reference

Explore all available API endpoints

Security Guide

Deep dive into API key security

Rate Limits

Understand API rate limits and quotas

Webhooks

Set up real-time notifications

Examples

View complete integration examples

Quick Reference

Bearer Token (Recommended):
X-API-Key Header:
Query Parameter (Not recommended for production):
Create .env file:
Load in Python:
Load in Node.js:
  • Verify Key: GET /v1/auth/verify
  • List Agents: GET /v1/agents
  • Create Task: POST /v1/tasks
  • Get Task: GET /v1/tasks/{task_id}
  • Upload File: POST /v1/files
  • List API Keys: GET /v1/api-keys
Create Key:
List Keys:
Rotate Key:
Delete Key:

Get Help

Documentation

Browse comprehensive guides and tutorials

API Status

Check real-time API availability

Support

Contact our support team

Community

Join the developer community