Skip to main content

M L Models

Export the tenant's trained model artifact

GET
/models/{useCase}/export
AuthorizationBearer <token>

API key issued to a Sonzai project. Format: Bearer sk_....

In: header

Path Parameters

useCase*string

Query Parameters

format?string

Export format: omitted/"sonzai-gbdt-v1" (default, in-process Go GBDT) or "onnx" (proxies the ml-service ONNX artifact).

Response Body

application/json

application/problem+json

curl -X GET "https://loading/api/v1/models/string/export"
{
  "$schema": "/api/v1/schemas/ModelExportOutputBody.json",
  "artifact": null,
  "artifact_b64": "string",
  "calibration": {
    "method": "string",
    "params": {
      "property1": null,
      "property2": null
    }
  },
  "exported_at": "2019-08-24T14:15:22Z",
  "feature_schema": [
    "string"
  ],
  "format": "string",
  "served_from": "string",
  "sha256": "string",
  "use_case": "string",
  "version": 0
}
{
  "$schema": "/api/v1/schemas/ErrorModel.json",
  "detail": "Property foo is required but is missing.",
  "errors": [
    {
      "location": "string",
      "message": "string",
      "value": null
    }
  ],
  "instance": "https://example.com/error-log/abc123",
  "status": 400,
  "title": "Bad Request",
  "type": "https://example.com/errors/example"
}