Setting Up AnyAPI

Get started with AnyAPI in just a few minutes. This guide will help you create an account, obtain your API key, and make your first successful API request.

Create Your Account

  1. Visit anyapi.ai
  2. Click Sign Up to create your free account
  3. Verify your email address
  4. Complete your profile setup

Get Your API Key

1

Access the Dashboard

Once logged in, navigate to your dashboard
2

Generate API Key

Go to API Keys section and click Create New Key
3

Copy Your Key

Copy your API key and store it securely. You’ll need this for authentication.
Keep your API key secure and never expose it in client-side code or public repositories.

Make Your First Request

Here’s how to make your first API call using different programming languages:
curl -X POST "https://api.anyapi.ai/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "user", "content": "Hello, world!"}
    ]
  }'

Authentication

All API requests require authentication using your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Rate Limits

AnyAPI implements rate limiting to ensure fair usage:
  • Free Tier: 100 requests per minute
  • Pro Tier: 1,000 requests per minute
  • Enterprise: Custom limits
Rate limit information is included in response headers:
  • X-RateLimit-Limit: Total requests allowed
  • X-RateLimit-Remaining: Requests remaining in current window
  • X-RateLimit-Reset: Time when the rate limit resets

Error Handling

AnyAPI uses standard HTTP status codes and returns errors in JSON format:
{
  "error": {
    "type": "invalid_request_error",
    "message": "Invalid API key provided",
    "code": "invalid_api_key"
  }
}
Common error codes:
  • 401: Invalid or missing API key
  • 429: Rate limit exceeded
  • 400: Invalid request format
  • 500: Internal server error

Next Steps

Now that you’re set up, explore what you can build:

Support

Need help? We’re here for you: