# Distributed AI

{% hint style="info" %}
**Good to know:** All Distributed AI interfaces need to use token as the request header.
{% endhint %}

## Uploading Dataset

Upload the dataset to obtain a file path as a parameter of other APIs.

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/uploadFile`

Upload a file to server

#### Headers

| Name                                           | Type                | Description                                     |
| ---------------------------------------------- | ------------------- | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark>        | string              | The access token generated in the previous step |
| Content-Type<mark style="color:red;">\*</mark> | multipart/form-data | content type                                    |

#### Request Body

| Name                                   | Type | Description  |
| -------------------------------------- | ---- | ------------ |
| file<mark style="color:red;">\*</mark> | file | Dataset file |

{% tabs %}
{% tab title="200: OK Return the path of the file on the server" %}

```json
{
    "code":200,
    "msg":"111@gmail.com/2023-10-24T12:07:12Zy_train.csv"
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```sh
curl --location 'https://www.phoenix.global/sdk/computation/deAI/uploadFile' \
--header 'token: eyJhbGciOiJIUzIxxxxxxxxxxxxx' \
--form 'file=@"your local file path"'
```

{% endtab %}

{% tab title="Golang" %}

```go
import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	genTokenBody := common.ReqGenToken{
		Email:  "xxx@gmail.com",
		Passwd: "xxxxxxxxxxx",
	}
	genTokenResult, err := controllers.GenToken(genTokenBody)
	tokenMap := make(map[string]interface{})
	err = json.Unmarshal(genTokenResult, &tokenMap)
	token := tokenMap["token"].(string)
	fileName := "absolute file path"
	result, err := controllers.UploadDeAIFile(fileName, token)
	......
}
```

{% endtab %}
{% endtabs %}

## Evaluating CCD Cost for CNN

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/queryGuarantee`

Evaluate the number of ccds required for training CNN model

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                           | Type    | Description                                                                                  |
| ---------------------------------------------- | ------- | -------------------------------------------------------------------------------------------- |
| model<mark style="color:red;">\*</mark>        | string  | Model name, which is CNN                                                                     |
| epoch<mark style="color:red;">\*</mark>        | integer | The epoch for training                                                                       |
| jobName<mark style="color:red;">\*</mark>      | string  | Job name                                                                                     |
| x\_train<mark style="color:red;">\*</mark>     | string  | The path of the training dataset, obtained by calling the upload file api                    |
| y\_train                                       | string  | The path of the label dataset, obtained by calling the upload file api                       |
| train\_shard<mark style="color:red;">\*</mark> | float   | A decimal number greater than 0 and less than 1, indicating the proportion used for training |
| scale\_ratio                                   | integer | The number of colors in the picture                                                          |
| category<mark style="color:red;">\*</mark>     | int     | Number of categories                                                                         |
| channel                                        | int     | Image channel                                                                                |

{% tabs %}
{% tab title="200: OK Return the CCD cost" %}

```json
{
    "code": 200,
    "msg": "success",
    "ccd_cost": 27870365208168000
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

<pre class="language-bash"><code class="lang-bash"><strong>curl --location 'https://www.phoenix.global/sdk/computation/deAI/queryGuarantee' \
</strong>--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2OTgxNTg1ODl9.lZPScQLs1ScGS6KPqUp1lg5XdOqnGLQyOsO3wMugps8' \
--header 'Content-Type: application/json' \
--data-raw '{
  "epoch": 2,
  "jobName": "CNN Classification Job",
  "model": "CNN",
  "scale_ratio": 255,
  "category": 3,
  "channel": 1,
  "train_shard": 0.8,
  "x_train": "111@gmail.com/2023-10-24T13:42:46Zx_train.zip",
  "y_train": "111@gmail.com/2023-10-24T13:22:36Zy_train.csv"
}'
</code></pre>

{% endtab %}

{% tab title="Golang" %}

```go
import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	genTokenBody := common.ReqGenToken{
		Email:  "xxx@gmail.com",
		Passwd: "xxxxxxxxxxx",
	}
	genTokenResult, err := controllers.GenToken(genTokenBody)
	tokenMap := make(map[string]interface{})
	err = json.Unmarshal(genTokenResult, &tokenMap)
	token := tokenMap["token"].(string)
	req := common.ReqQueryFlops{
		JobName:    "CNN Classification Job",
		TrainData:  "222@gmail.com/2023-11-01T03:25:25Zx_train.zip",
		TrainLable: "222@gmail.com/2023-11-01T03:26:20Zy_train.csv",
		Epoch:      3,
		Model:      "CNN",
		TrainShard: 0.8,
		Category:   2,
		Channel:    1,
		ScaleRatio: 255,
	}
	res, err := controllers.QueryAICcdCost(req, token)
	......
}
```

{% endtab %}
{% endtabs %}

## Evaluating CCD Cost for LSTM

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/queryGuarantee`

Evaluate the number of ccds required for training LSTM model

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                               | Type    | Description                                                                                                    |
| -------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| jobName<mark style="color:red;">\*</mark>          | string  | Job name                                                                                                       |
| model<mark style="color:red;">\*</mark>            | string  | Model name, which is LSTM                                                                                      |
| epoch<mark style="color:red;">\*</mark>            | integer | The epoch for training                                                                                         |
| x\_train<mark style="color:red;">\*</mark>         | string  | The path of the training dataset, obtained by calling the upload file api                                      |
| train\_shard<mark style="color:red;">\*</mark>     | float   | A decimal number greater than 0 and less than 1, indicating the proportion used for training                   |
| input\_width<mark style="color:red;">\*</mark>     | integer | Please refer to the website: <https://www.tensorflow.org/tutorials/structured_data/time_series#data_windowing> |
| label\_width<mark style="color:red;">\*</mark>     | integer | Please refer to the website: <https://www.tensorflow.org/tutorials/structured_data/time_series#data_windowing> |
| shift<mark style="color:red;">\*</mark>            | integer | Please refer to the website: <https://www.tensorflow.org/tutorials/structured_data/time_series#data_windowing> |
| sequence\_stride<mark style="color:red;">\*</mark> | integer | Please refer to the website: <https://www.tensorflow.org/tutorials/structured_data/time_series#data_windowing> |
| sampling\_rate                                     | integer | Please refer to the website: <https://www.tensorflow.org/tutorials/structured_data/time_series#data_windowing> |

{% tabs %}
{% tab title="200: OK Return the CCD cost" %}

```json
{
    "code": 200,
    "msg": "success",
    "ccd_cost": 27870365208168000
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location 'https://www.phoenix.global/sdk/computation/deAI/queryGuarantee' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2OTgxNTg1ODl9.lZPScQLs1ScGS6KPqUp1lg5XdOqnGLQyOsO3wMugps8' \
--header 'Content-Type: application/json' \
--data-raw '{
  "epoch": 2,
  "jobName": "LSTM Job",
  "model": "LSTM",
  "train_shard": 0.8,
  "x_train": "111@gmail.com/2023-10-24T13:53:15Zjena_climate.csv",
  "input_width":24,
  "label_width":24,
  "shift":24,
  "sequence_stride":1,
  "sampling_rate":1
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	genTokenBody := common.ReqGenToken{
		Email:  "xxx@gmail.com",
		Passwd: "xxxxxxxxxxx",
	}
	genTokenResult, err := controllers.GenToken(genTokenBody)
	tokenMap := make(map[string]interface{})
	err = json.Unmarshal(genTokenResult, &tokenMap)
	token := tokenMap["token"].(string)
	req := common.ReqQueryFlops{
		JobName:        "LSTM Job",
		TrainData:      "222@gmail.com/2023-10-24T13:53:15Zjena_climate.csv",
		Epoch:          3,
		Model:          "LSTM",
		TrainShard:     0.8,
		InputWidth:     24,
		LabelWidth:     24,
		Shift:          24,
		SequenceStride: 1,
		SamplingRate:   1,
	}
	res, err := controllers.QueryAICcdCost(req, token)
	......
}

```

{% endtab %}
{% endtabs %}

## Creating a CNN Job

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/createJob`

Creating a CNN job

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                          | Type    | Description                               |
| --------------------------------------------- | ------- | ----------------------------------------- |
| jobName<mark style="color:red;">\*</mark>     | string  | Job Name                                  |
| batchSize<mark style="color:red;">\*</mark>   | integer | batch size                                |
| computation<mark style="color:red;">\*</mark> | string  | Computation type, which is Distributed AI |

{% tabs %}
{% tab title="200: OK Return job id" %}

```json
{
    "code":200,
    "msg":"Success",
    "data":"59576164105114941297104078936238635731163357384303362249410479244945241708329"
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```powershell
curl --location 'https://www.phoenix.global/sdk/computation/deAI/createJob' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2OTgxNTg1ODl9.lZPScQLs1ScGS6KPqUp1lg5XdOqnGLQyOsO3wMugps8' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jobName": "CNN Classification Job",
    "computation": "Distributed AI",
    "batchSize": 64
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	genTokenBody := common.ReqGenToken{
		Email:  "xxx@gmail.com",
		Passwd: "xxxxxxxxxxx",
	}
	genTokenResult, err := controllers.GenToken(genTokenBody)
	tokenMap := make(map[string]interface{})
	err = json.Unmarshal(genTokenResult, &tokenMap)
	token := tokenMap["token"].(string)
	req := common.ReqCreateAIJob{
		JobName:     "CNN Classification Job",
		Computation: "Distributed AI",
		BatchSize:   64,
	}
	res, err := controllers.CreateAIJob(req, token)
	......
}
```

{% endtab %}
{% endtabs %}

## Creating a LSTM Job

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/createJob`

Creating a LSTM Job

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                      | Type    | Description                               |
| ----------------------------------------- | ------- | ----------------------------------------- |
| jobName<mark style="color:red;">\*</mark> | string  | Job name                                  |
| batchSize                                 | integer | batch size                                |
| computation                               | string  | Computation type, which is Distributed AI |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code":200,
    "msg":"Success",
    "data":"59576164105114941297104078936238635731163357384303362249410479244945241708329"
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location 'https://www.phoenix.global/sdk/computation/deAI/createJob' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjExMUBnbWFpbC5jb20iLCJleHAiOjE2OTgxNTg1ODl9.lZPScQLs1ScGS6KPqUp1lg5XdOqnGLQyOsO3wMugps8' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jobName": "LSTM Job",
    "computation": "Distributed AI",
    "batchSize": 64
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	genTokenBody := common.ReqGenToken{
		Email:  "xxx@gmail.com",
		Passwd: "xxxxxxxxxxx",
	}
	genTokenResult, err := controllers.GenToken(genTokenBody)
	tokenMap := make(map[string]interface{})
	err = json.Unmarshal(genTokenResult, &tokenMap)
	token := tokenMap["token"].(string)
	req := common.ReqCreateAIJob{
		JobName:        "LSTM Job",
		Computation:    "Distributed AI",
		BatchSize:      64,
	}
	res, err := controllers.CreateAIJob(req, token)
	......
}
```

{% endtab %}
{% endtabs %}

## Evaluating CCD Cost for Inference

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/inferenceCost`

Evaluating ccd cost for inference

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                         | Type   | Description                                                      |
| -------------------------------------------- | ------ | ---------------------------------------------------------------- |
| data\_path<mark style="color:red;">\*</mark> | string | The path of the dataset, obtained by calling the upload file api |
| jobID<mark style="color:red;">\*</mark>      | string | The job id of a distributed AI job                               |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": 200,
    "msg": "success",
    "ccd_cost": 13271602480080000
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location 'https://www.phoenix.global/sdk/computation/deAI/inferenceCost' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwMzQ2NTN9.0NhuhoPX-AuIxjRiF0V4N-idYr_3tAjTUEafOD67DS0' \
--header 'Content-Type: application/json' \
--data-raw '{
  "data_path": "222@gmail.com/2023-11-15T06:00:19Zx_train.zip",
  "jobID": "86336785146289395195200824626469818031842412882953927198307248471561534896799"
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)
func main() {
	token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwMzA3NTB9.T4aB0gyUneFerrGd2IZGHh6pjtvi9TH4IMT01ZaRzo8"
	jobID := "86336785146289395195200824626469818031842412882953927198307248471561534896799"
	dataPath := "222@gmail.com/2023-11-15T06:00:19Zx_train.zip"
	req := common.ReqInferenceCost{
		JobID:    jobID,
		DataPath: dataPath,
	}
	res, err := controllers.QueryInferCost(req, token)
	......
}

```

{% endtab %}
{% endtabs %}

## Inference

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/inference`

Inference

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                    | Type   | Description                        |
| --------------------------------------- | ------ | ---------------------------------- |
| jobID<mark style="color:red;">\*</mark> | string | The job id of a distributed AI job |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": 200,
    "msg": "Inference success",
    "infer_id": 13
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```sh
curl --location 'https://www.phoenix.global/sdk/computation/deAI/inference' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwMzQ2NTN9.0NhuhoPX-AuIxjRiF0V4N-idYr_3tAjTUEafOD67DS0' \
--header 'Content-Type: application/json' \
--data '{
  "jobID": "86336785146289395195200824626469818031842412882953927198307248471561534896799"
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwMzgwMjh9.HJT8uy4CL5Lqx-L9E4Mx0NOcKzIPsBbt48v3_kObKno"
	jobID := "86336785146289395195200824626469818031842412882953927198307248471561534896799"
	req := common.ReqInference{
		JobID: jobID,
	}
	res, err := controllers.InferenceJob(req, token)
	......
}

```

{% endtab %}
{% endtabs %}

## Querying Inference Result

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/queryInfer`

Querying a inference result by id

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                 | Type   | Description                                             |
| ------------------------------------ | ------ | ------------------------------------------------------- |
| id<mark style="color:red;">\*</mark> | string | The inference id, obtained by calling the inference api |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": 200,
    "msg": "success",
    "data": {
        "tx_hash": "0x76233b90445f34e6c0c19d056b3d04ec06c2f36844c6b777c74493a9b3ea3124",
        "result": "https://phoenix.global/ai/resultFiles/predicted_222@gmail.com_5CNN_mnist.csv",
        "submitTime": 1700037265,
        "ccd_cost": "0.01327160248"
    }
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```powershell
curl --location 'https://www.phoenix.global/sdk/computation/deAI/queryInfer' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwMzkzMjV9.gKHqa2-Q7zxFcEle0bzv-o8x2__1949TWDclZrAK51Q' \
--header 'Content-Type: application/json' \
--data '{
  "id": 21
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwMzkzMjV9.gKHqa2-Q7zxFcEle0bzv-o8x2__1949TWDclZrAK51Q"
	inferenceID := int64(21)
	req := common.ReqQueryInferByID{
		ID: inferenceID,
	}
	res, err := controllers.QueryInference(req, token)
	......
}

```

{% endtab %}
{% endtabs %}

## Querying Inference Result List

<mark style="color:green;">`POST`</mark> `https://www.phoenix.global/sdk/computation/deAI/queryInferList`

Querying inference result list

#### Headers

| Name                                    | Type   | Description                                     |
| --------------------------------------- | ------ | ----------------------------------------------- |
| token<mark style="color:red;">\*</mark> | string | The access token generated in the previous step |

#### Request Body

| Name                                       | Type    | Description |
| ------------------------------------------ | ------- | ----------- |
| pageNo<mark style="color:red;">\*</mark>   | integer | Page number |
| pageSize<mark style="color:red;">\*</mark> | integer | Page size   |
| jobID<mark style="color:red;">\*</mark>    | string  | Job id      |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "code": 200,
    "msg": "success",
    "size": 10,
    "page": 1,
    "totalPages": 1,
    "totalCount": 2,
    "data": [
        {
            "tx_hash": "0x76233b90445f34e6c0c19d056b3d04ec06c2f36844c6b777c74493a9b3ea3124",
            "result": "https://phoenix.global/ai/resultFiles/predicted_222@gmail.com_5CNN_mnist.csv",
            "submitTime": 1700037265,
            "ccd_cost": "0.01327160248"
        },
        {
            "tx_hash": "0x7ff8ee03deb93d608503bb59c183ecc9ed0e16be9599289af0938b4c20bdd91c",
            "result": "https://phoenix.global/ai/resultFiles/predicted_222@gmail.com_4CNN_mnist.csv",
            "submitTime": 1700037108,
            "ccd_cost": "0.01327160248"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

The usage of curl and golang sdk is as follows:

{% tabs %}
{% tab title="cURL" %}

```powershell
curl --location 'https://www.phoenix.global/sdk/computation/deAI/queryInferList' \
--header 'token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwNDM4ODN9.i68m1VKJ894NxAd83HXGLUkvrobmAJ3yWo3aJPs4YT4' \
--header 'Content-Type: application/json' \
--data '{
  "jobID": "86336785146289395195200824626469818031842412882953927198307248471561534896799",
  "pageNo": 1,
  "pageSize": 10
}'
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/common"
	"github.com/PhoenixGlobal/Phoenix-Computation-SDK/controllers"
)

func main() {
	token := "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJFbWFpbCI6IjIyMkBnbWFpbC5jb20iLCJleHAiOjE3MDAwMzkzMjV9.gKHqa2-Q7zxFcEle0bzv-o8x2__1949TWDclZrAK51Q"
	jobID := "86336785146289395195200824626469818031842412882953927198307248471561534896799"
	req := common.ReqQueryInfer{
		ReqPage: &common.ReqPage{
			PageNo:   1,
			PageSize: 10,
		},
		JobID: jobID,
	}
	res, err := controllers.QueryInferList(req, token)
	......
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://computation-sdk.phoenix.global/reference/api-reference/distributed-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
