Endpoints & Authentication¶
CloudSigma AI Studio is deployed independently in each region. Each regional deployment has its own control plane, data plane, resources, and Credit balance.
Before making an API request, identify the region that contains your workspace. The API endpoint, API key, workspace ID, and other resource IDs used in one request must belong to the same region.
Regional API endpoints¶
Region |
Region code |
Console URL |
API base URL |
|---|---|---|---|
Manila 2, Philippines |
|
|
|
Johannesburg, South Africa |
|
|
|
Set the API base URL for the region that contains your workspace.
For Manila 2:
export CLOUDSIGMA_API_BASE="https://genai.mnl2.cloudsigma.com/v5"
For Johannesburg:
export CLOUDSIGMA_API_BASE="https://genai.jhb.cloudsigma.com/v5"
Regional isolation¶
CloudSigma regions operate independently.
Item |
Regional rule |
|---|---|
API requests |
Send requests to the endpoint for the target workspace’s region. |
API keys |
Use an API key issued by the same regional deployment. |
Workspaces and resources |
Workspace IDs and other resource IDs belong to the region in which they were created. |
Billing |
Usage and billing records are maintained separately in each region. |
Credit balance |
Each region has an independent Credit balance. Credits are not shared across regions. |
Do not combine an API endpoint from one region with an API key, workspace ID, or resource ID from another region.
Authentication¶
Pass your personal access token in the X-API-Key request header.
Store the token in an environment variable:
export CLOUDSIGMA_API_KEY="<your-personal-access-token>"
Send a request using the regional API base URL:
curl "$CLOUDSIGMA_API_BASE/workspaces" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY"
Create or manage the token on the Access credentials page in the same regional console.
Keep access tokens out of URLs, application logs, screenshots, and source code repositories.
How to read the request examples¶
Request examples use environment variables so that you can copy the commands without placing credentials or resource IDs directly in the documentation.
Example value |
Meaning |
What you need to do |
|---|---|---|
|
HTTP request header that carries your personal access token. |
Use this header name exactly as shown. |
|
Environment variable containing your personal access token. |
Set it to the token created in the current region. |
|
HTTP request header that identifies the target workspace. |
Use this header name exactly as shown when an operation requires it. |
|
Environment variable containing the target workspace ID. |
Set it to a workspace ID returned by the current regional endpoint. |
|
Path parameter shown in an API definition. |
Replace it with the ID of the target resource. |
|
Environment variable used for that path parameter in a shell example. |
Set it to the ID of the target resource. |
Names beginning with X-, such as X-API-Key, are literal HTTP header names. Names beginning with $ are shell environment variables whose values you configure before running a command.
Workspace ID¶
Some operations require a workspace ID in the X-Workspace-ID request header.
First, list the workspaces available in the selected region:
curl "$CLOUDSIGMA_API_BASE/workspaces" \
-H "X-API-Key: $CLOUDSIGMA_API_KEY"
Store the target workspace ID returned by this request:
export WORKSPACE_ID="<your-workspace-id>"
For operations that require a workspace context, include the following header:
-H "X-Workspace-ID: $WORKSPACE_ID"
The workspace ID must come from the same regional endpoint used for the API request.
Check your regional configuration¶
Before troubleshooting an API request, verify that:
CLOUDSIGMA_API_BASEpoints to the region containing the workspace.CLOUDSIGMA_API_KEYwas created in that regional deployment.WORKSPACE_IDwas returned by that regional endpoint.The required Credit balance is available in that region.
If a workspace or resource cannot be found, check the regional configuration before changing the request parameters.