伊辛云开放API
    • 设备机型列表
      GET
    • 获取OSS上传签名
      GET
    • 查询用户任务列表
      POST
    • 创建通用计算任务
      POST
    • 创建模板计算任务
      POST
    • 获取任务详情
      GET
    • 数据模型
      • UserTaskQuery
      • OssSignatureData
      • ComputerType
      • UserInfo
      • GeneralTaskCreate
      • OssSignatureResponse
      • ComputerTypeListResponse
      • UserInfoResponse
      • TemplateTaskCreate
      • ErrorResponse
      • Task
      • TaskDetail
      • TaskListResponse
      • TaskResponse
      • TaskDetailResponse

      创建通用计算任务

      POST
      /tasks/create-general
      创建一个通用的计算任务,需要提供必要的计算参数

      光电伊辛机 S4095#

      computerTypeId 填 8。可通过生产机型目录查询机型能力。
      questionType=2 为 Ising,最多 4095 个自旋。questionType=1 为 QUBO,最多 4094 个变量。
      inputJFile 使用当前账号上传的 J 矩阵文件地址。矩阵须为有限实数方阵。CSV 无表头,上限 30 MiB。NPZ 须包含 matrix 数组,上限 100 MiB。大规模矩阵建议使用 NPZ。
      caculateCount 和 postProcess 均为 1,可省略以使用默认值。省略 inputHFile。
      {
        "name": "s4095-ising-example",
        "computerTypeId": 8,
        "questionType": 2,
        "inputJFile": "<已上传的 matrix.npz 文件地址>",
        "caculateCount": 1,
        "postProcess": 1
      }
      SDK 使用教程

      请求参数

      Body 参数application/json必填

      示例
      {
          "name": "我的计算任务",
          "computerTypeId": 1,
          "inputJFile": "/path/to/jfile.json",
          "inputHFile": "/path/to/hfile.json",
          "questionType": 1,
          "caculateCount": 100,
          "postProcess": 1,
          "useCoupon": true,
          "useCredit": true
      }

      请求示例代码

      Shell
      JavaScript
      Java
      Swift
      Go
      PHP
      Python
      HTTP
      C
      C#
      Objective-C
      Ruby
      OCaml
      Dart
      R
      请求示例请求示例
      Shell
      JavaScript
      Java
      Swift
      curl --location '/tasks/create-general' \
      --header 'Content-Type: application/json' \
      --data '{
          "name": "我的计算任务",
          "computerTypeId": 1,
          "inputJFile": "/path/to/jfile.json",
          "inputHFile": "/path/to/hfile.json",
          "questionType": 1,
          "caculateCount": 100,
          "postProcess": 1,
          "useCoupon": true,
          "useCredit": true
      }'

      返回响应

      🟢200
      application/json
      成功创建任务
      Bodyapplication/json

      示例
      {
          "success": true,
          "message": "success",
          "data": {
              "id": "task_123456789",
              "userId": 1,
              "type": 1,
              "source": 1,
              "name": "我的计算任务",
              "computerTypeId": 1,
              "appTemplateId": 1,
              "status": 1,
              "createTime": "2023-01-01T10:00:00Z",
              "finishTime": "2023-01-01T11:00:00Z",
              "durations": 3600,
              "price": 10.5,
              "couponId": 1,
              "couponAmount": 5,
              "paidAmount": 5.5,
              "payload": "{\"param1\": \"value1\"}",
              "result": "计算完成",
              "message": "任务执行成功",
              "creditUsed": true
          }
      }
      🟠400
      🔴500
      修改于 2026-11-25 09:38:26
      上一页
      查询用户任务列表
      下一页
      创建模板计算任务
      Built with