Create and Manage API Keys
Learn how to create, use, edit, disable, and delete ApiSmart API Keys for secure API authentication.
API Keys are credentials used to authenticate requests to the ApiSmart API.
You can create and manage your API Keys from the ApiSmart Console. Each key can be used to access supported API endpoints and models available to your account.
🔑 Create an API Key
Sign in to the ApiSmart Console and go to:
Console → API Keys
Click Create API Key to create a new credential.

When creating a key, use a descriptive name that helps you identify where it will be used.
For example:
Development
Production
Backend Service
Internal Testing
Using separate API Keys for different applications or environments makes them easier to manage later.
After creating the key, store it securely and use it only in trusted applications.
🔗 Use Your API Key
The standard ApiSmart API Base URL is:
https://gw.apismart.ai/v1
Authenticate requests by including your API Key in the Authorization header:
Replace <your-api-key> with your actual API Key.
For example, you can test your key by requesting the available model list:
If authentication succeeds, the API returns the models currently available through the platform.
🗂️ Manage Existing API Keys
The API Keys page lists the credentials you have created.

For each key, you can review information such as:
Key name
Key identifier
Usage or remaining balance information
Creation time
Current status
Integration example
You can also search for an existing key by its name or prefix.
✏️ Edit an API Key
Use Edit when you need to update the information associated with an existing API Key.

For example, you may want to rename a key so that its purpose is easier to identify.
Use clear names such as:
Production Backend
or:
Development Testing
This becomes especially useful when your account contains multiple API Keys.
⏸️ Disable an API Key
If you want to temporarily prevent a key from making API requests, select Disable.

A disabled key can no longer be used to authenticate API requests.
Disabling a key is useful when:
An application is temporarily inactive
You are investigating unexpected usage
You want to stop access without immediately deleting the key
If the key is needed again, you can re-enable it from the Console when the option is available.
🗑️ Delete an API Key
Use Delete when an API Key is no longer required.

Delete keys that belong to applications, environments, or services that are no longer in use.
Before deleting a key, make sure no active application still depends on it. Requests using a deleted key will no longer authenticate successfully.
⚠️ Keep API Keys Secure
API Keys provide access to your ApiSmart account and should be treated as sensitive credentials.
Do not:
Share API Keys publicly
Commit API Keys to public Git repositories
Include API Keys directly in publicly accessible client-side code
Send full API Keys in screenshots, logs, or support requests
For detailed security recommendations, see Secure Your API Keys.
🛠️ Authentication Issues
If the API returns:
401 invalid_api_key
check the following:
The API Key was copied correctly
The key is currently enabled
The request uses the
Bearerauthentication schemeThe
Authorizationheader is formatted correctlyThere are no missing characters or additional spaces
The expected format is:
If the key is valid but a specific model returns:
403 model_not_allowed
the model is not currently enabled for that API Key or account.
See Models and Model IDs for more information about model access.
➡️ Next Steps
After creating your API Key, continue with:
Secure Your API Keys — Learn recommended security practices
Models and Model IDs — Find models available through the API
Quick Start — Send your first API request
API Basics — Learn common API conventions
Chat Completions API — Start building with text models
Image Generation API — Generate and edit images
Video Generation API — Create video generation workflows
最後更新於
這有幫助嗎?