Authentication

SeaCloud API uses API keys to authenticate requests. All API requests must include your API Key in the Authorization header.


Get Your API Key

How to Create an API Key

1

Visit Settings

Go to your Settings page.

2

Create API Key

Click the "Create API Key" button.

3

Name the Key

Give your API Key a descriptive name.

4

Save and Copy

Save and copy the generated API Key (shown only once).


Using Your API Key

Include your API key in the Authorization header of every API request:

curl https://openresty-gateway.api.seaart.ai/llm/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

API Key Security

Best Practices

  • Use Environment Variables: Store your API Key in environment variables, never hardcode it in source code

  • Server-Side Only: Always make API calls from your backend, never directly from browsers or mobile apps

  • Regular Rotation: Regularly rotate your API Keys, especially if you suspect they may have been compromised

  • Least Privilege: Create separate API Keys for different applications for easier management and revocation

Last updated