Authentication

Overview

All requests to the Invictus AI API require authentication. This guide explains how to obtain API keys and use them in your applications.

Obtaining an API Key

  1. Sign up for an account: Visit dashboard.invictusai.com and create an account.

  2. Create an API key:

    • Navigate to the API Keys section in your dashboard

    • Click Create New API Key

    • Give your API key a name (e.g., "Development", "Production")

    • Choose the appropriate access level for your needs

    • Click Create

  3. Save your API key: Copy and store your API key in a secure location. For security reasons, we only show the full key once.

Types of API Keys

Invictus AI offers two types of API keys:

  1. Development Keys:

    • Intended for testing and development

    • Limited rate limits

    • No billing charges

    • Cannot be used in production environments

  2. Production Keys:

    • For live applications

    • Higher rate limits

    • Subject to normal billing

    • Full access to all features

Using Your API Key

REST API

Include your API key in the Authorization header of your HTTP requests:

JavaScript SDK

Python SDK

Environment-based Configuration

For security best practices, we recommend storing your API keys as environment variables:

JavaScript (Node.js)

Example .env file:

Python

API Key Security Best Practices

  1. Never hardcode API keys in your source code

  2. Don't commit API keys to version control systems

  3. Use environment variables to store API keys

  4. Implement proper access controls to limit who can use your API keys

  5. Rotate API keys periodically for enhanced security

  6. Use development keys for testing and development

  7. Restrict API key permissions to only what's necessary

Key Rotation

For security reasons, we recommend rotating your API keys regularly:

  1. Create a new API key in your dashboard

  2. Update your applications to use the new key

  3. Verify that everything is working correctly

  4. Delete the old API key

Revoking API Keys

If an API key is compromised:

  1. Go to your dashboard at dashboard.invictusai.com

  2. Navigate to the API Keys section

  3. Find the compromised key and click Revoke

  4. Create a new key and update your applications

Webhooks Authentication

For webhook endpoints, we recommend implementing signature verification:

Next Steps

  • Learn how to make your first API call

  • Explore the API Reference

  • Check out our Rate Limits documentation