| title | Get started with ZGI: from sign-up to first API call |
|---|---|
| description | Create your account, build your first knowledge base and workflow on the canvas, then call it via the ZGI API — all in one walkthrough. |
This page walks you through the full ZGI onboarding path from zero to a live, callable AI workflow. You will sign up, configure a workspace, upload a document to a knowledge base, wire together a simple workflow on the visual canvas, and make your first API call — giving you a working foundation to build on.
Open [cloud.zgi.cn](https://cloud.zgi.cn) in your browser and click **Sign up**. Enter your email address and create a password, then verify your email using the confirmation link ZGI sends you.<Note>
If your organization has an existing ZGI account, ask your workspace admin to invite you instead of creating a separate account.
</Note>
1. Enter a **Workspace name** (for example, `my-first-workspace`).
2. Choose a region closest to your users.
3. Click **Create workspace**.
You land on the workspace dashboard. All subsequent steps happen inside this workspace.
1. In the left sidebar, click **Knowledge Base**, then click **New knowledge base**.
2. Enter a name for the knowledge base and click **Create**.
3. Click **Upload document** and select a PDF, Word document, or plain text file from your computer.
4. ZGI processes the file automatically — parsing, chunking, and indexing it. Wait for the status indicator to show **Ready** before continuing.
<Tip>
For your first test, a short PDF works well. Once you're familiar with the flow, you can upload large document sets and configure chunking and scoring parameters in the **Document Processing** settings.
</Tip>
1. In the left sidebar, click **Workflows**, then click **New workflow**.
2. Give the workflow a name, for example `My first workflow`, and click **Create**.
3. The canvas opens with a **Start** node already placed. Drag an **LLM** node from the node panel onto the canvas.
4. Connect the **Start** node's output handle to the **LLM** node's input handle.
5. Click the **LLM** node to open its settings. Select a model from the dropdown (for example, `gpt-4o`) and enter a system prompt:
```
You are a helpful assistant. Answer questions clearly and concisely.
```
6. Drag an **End** node onto the canvas and connect the **LLM** node's output to the **End** node's input.
7. Click **Save**, then click **Publish** to make the workflow callable via API.
<Note>
To incorporate your knowledge base, add a **Knowledge Recall** node between **Start** and **LLM**. Connect **Start → Knowledge Recall → LLM → End**, then select your knowledge base in the Knowledge Recall node settings.
</Note>
Replace `YOUR_API_KEY` and `YOUR_WORKFLOW_ID` in the examples below with your actual values.
<CodeGroup>
```bash cURL
curl --request POST \
--url https://api.zgi.cn/v1/workflows/YOUR_WORKFLOW_ID/run \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"inputs": {
"query": "What is ZGI?"
}
}'
```
```python Python
import requests
response = requests.post(
"https://api.zgi.cn/v1/workflows/YOUR_WORKFLOW_ID/run",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"inputs": {
"query": "What is ZGI?"
}
},
)
print(response.json())
```
</CodeGroup>
A successful response looks like this:
```json
{
"run_id": "run_01j9xkz4m8f3p7wy",
"status": "succeeded",
"outputs": {
"answer": "ZGI is an enterprise AI infrastructure platform that lets you build, run, and govern AI workflows at scale."
},
"usage": {
"prompt_tokens": 42,
"completion_tokens": 28,
"total_tokens": 70
}
}
```
<Tip>
The `run_id` in the response lets you look up the full execution trace — node-by-node inputs, outputs, and latency — in **Observability → Workflow runs**.
</Tip>