Skip to main content
Use this endpoint to convert a trained model into a deployment-ready format. Supported formats are GGUF (quantized), MLX (Apple Silicon), MNN (Alibaba mobile), and QNN (Qualcomm). The export runs asynchronously; poll GET /v1/exports/:id to track completion.

Method + Path

Authentication

Include your PIN API token or JWT in the Authorization header as a Bearer token.

Path parameters

string
required
The model identifier (e.g., md_abc123def456).

Request body

string
required
Target export format. Must be one of: gguf, mlx, mnn, qnn.

Request body example

Request example

Response

Returns a standard PIN success envelope with the export task.
integer
required
0 on success, nonzero on error.
object
required
string
Human-readable message (empty on success).

Example response

Export process

  1. If the model does not have a merged artifact, the system automatically merges the LoRA adapter into the base weights first.
  2. The converter tool runs in a background goroutine:
    • GGUF: Converts to FP16 then quantizes to Q4_K_M using llama.cpp.
    • MLX: Runs mlx_lm.convert or the tool configured by ARIAPIN_CONVERT_MLX.
    • MNN: Runs mnnconvert or the tool configured by ARIAPIN_CONVERT_MNN.
    • QNN: Runs qairt-converter or the tool configured by ARIAPIN_CONVERT_QNN.
  3. On success, the artifact path is registered and the model status returns to ready.

Errors