Skip to main content

Getting Your API Key

1

Create an Account

Sign up at modelslab.com if you haven’t already.
2

Access Dashboard

Navigate to your API Keys Dashboard.
3

Generate Key

Click Create New Key and copy your API key immediately.
4

Store Securely

Save your key in a secure location. You won’t be able to see it again.
Never share your API key publicly or commit it to version control. Treat it like a password.

Using Your API Key

Include your API key in every request using the key parameter in the request body:

Code Examples

Environment Variables

Always use environment variables to store your API key in production applications.

Security Best Practices

Use Environment Variables

Never hardcode API keys in your source code. Use environment variables or secret management tools.

Separate Keys

Create different API keys for development, staging, and production environments.

Rotate Regularly

Periodically rotate your API keys, especially if you suspect they may have been compromised.

Monitor Usage

Regularly check your dashboard for unusual API activity.

Authentication Errors

For detailed error handling, see our Error Codes documentation.

API Key Management

You can manage your API keys from the dashboard:
  • Create new keys for different applications
  • Revoke compromised or unused keys
  • View usage statistics per key
  • Set rate limits (Enterprise plans)

Next Steps

Quickstart Guide

Make your first API call in 5 minutes

Rate Limits

Understand API rate limits for your plan

Error Codes

Handle errors gracefully in your application

SDKs

Use our official SDKs for faster development