Every GlobalAI OPC API endpoint — whether you’re generating text, images, or videos — requires Bearer token authentication. You authenticate by including your API key in theDocumentation Index
Fetch the complete documentation index at: https://docs.xingchaoyiqing.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header of each HTTP request. There are no cookies, sessions, or OAuth flows to manage; a single API key grants access to all endpoints your account is provisioned for.
Your API Key
Contact the GlobalAI OPC team to obtain an API key for your account. Once issued, your key is a sensitive credential — treat it with the same care as a password. Keep the following in mind when handling your key:- Store it securely. Use environment variables, a secrets manager, or an encrypted vault — never plain-text config files checked into source control.
- Keep it private. Do not share your key with other users or embed it in client-side code (browser JavaScript, mobile apps) where it can be extracted.
- Rotate it if compromised. If you suspect your key has been exposed, contact support to revoke the old key and issue a new one.
Passing Your API Key
Include your API key in theAuthorization header of every request, using the Bearer scheme. You should also set Content-Type: application/json for all requests that include a JSON body.
Complete Example
Here is a complete cURL request demonstrating correct header usage against the Nano Banana image generation endpoint:| API Category | Example Endpoint |
|---|---|
| Text | POST http://apillm.globalaiopc.com/gw_llm_power/v1/chat/completions |
| Image | POST https://zcbservice.aizfw.cn/kyyReactApiServer/v1/banana/images |
| Video | POST https://zcbservice.aizfw.cn/kyyReactApiServer/v1/sora/videos |
Using Environment Variables
Store your API key in an environment variable and read it at runtime. This keeps the key out of your source code entirely. Set the variable in your shell or CI/CD environment:os.environ["GLOBALAIOPC_API_KEY"] (with square brackets) rather than os.environ.get(...) causes Python to raise a KeyError immediately if the variable is not set, which helps you catch misconfigured environments early.
Common Auth Errors
401 Unauthorized — Invalid or Missing API Key
401 Unauthorized — Invalid or Missing API Key
403 Forbidden — Insufficient Endpoint Access
403 Forbidden — Insufficient Endpoint Access
You receive a
403 Forbidden response when:- Your API key is valid, but it has not been granted access to the specific endpoint you are calling.
- Your account plan does not include the model or feature you requested.
Next Steps
Quickstart
Follow step-by-step examples for text, image, and video generation using your API key.
API Reference
Explore every endpoint and see complete request and response schemas.