Prerequisites
Get an API Key
- Sign in to the ComPDF console.
- Create or copy a
publicKeyfrom the API Key page.

- Keep the key secret. Do not commit it to frontend code or public repositories.
Authentication
All ComPDF AI APIs use the API key in the request header:
http
x-api-key: <your-public-key>Quick validation:
bash
curl --location 'https://api-server.compdf.com/server/v2/asset/info' \
--header 'x-api-key: <your-public-key>'code=200 means the key is valid.
Base URLs
| Region | Base URL |
|---|---|
| Global | https://api-server.compdf.com/server |
| China mainland | https://api-server.compdf.cn/server |