Basics
API Key, Base URL, groups, and billing—core concepts to understand before integrating with MoleAPI
This section introduces several core concepts you'll use when integrating with MoleAPI: API Key, Base URL, Group, and billing methods. Once you understand these, you'll be less likely to mix things up when configuring the console or filling in parameters in code.
In This Section
What Is an API Key
Its purpose, format, and security considerations.
How to Create an API Key
Steps to create and retrieve an API Key in the console.
How to Set the Base URL
How the root endpoint and /v1 are used.
What Is a Group
How groups relate to model availability, pricing, and stability.
Usage-Based Billing vs Per-Request Billing
Billing methods for text models and image/video models.
Quick Start
To make a successful request, you only need these two items:
- Base URL:
https://api.moleapi.com/v1 - API Key: A key created in the console that starts with
sk-
For more fine-grained configuration, you can set the following in the console: model scope, Key quota, IP restrictions, and group selection.
Notes
- The Base URL must be the MoleAPI endpoint (including
/v1). Do not use the official OpenAI endpoint. - After creating an API Key, save the full key immediately. Once you leave the page, it cannot be viewed again.
- We recommend using different Keys for different projects or environments so you can better distinguish usage and permissions.
- Different groups may have different model lists, unit prices, and stability. Be sure to review the details before choosing one.
How is this guide?
Last updated on