Prepare to call an API¶
Before calling an API, choose the API you need and prepare the matching access credential. An AI Studio endpoint can also require a target workspace ID.
Endpoint addresses¶
API |
Start of the endpoint address |
What it is for |
|---|---|---|
Genesis |
|
Model chat, embeddings, reranking |
AI Studio |
|
Resources and tasks inside a workspace |
Every endpoint page shows its complete address and method at the top. Copy the complete address from that page; you do not need to assemble it yourself.
Credentials¶
Before calling an API, create a credential on the Access credentials page in the console.
Genesis: use a personal access token or service-account API key. For creation steps, see Manage API Keys.
AI Studio: use a personal access token.
The request example on each endpoint page shows the credential required for that call. Keep tokens out of URLs, logs, code repositories, and screenshots.
Workspace ID¶
AI Studio resources belong to workspaces. When an endpoint requires a workspace ID, call List workspaces, find the workspace you want to operate in under data.workspaces, and save that workspace’s id. This value is the workspace ID used in the API call.