POST/v1/auth/login
Returns access_token. Use it as the bearer token in subsequent requests.
curl -fsSL -X POST 'https://api.pxform.tech/v1/auth/login' \
-H "Content-Type: application/json" \
-d '{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}'
POST/v1/auth/register
Creates an account and returns its access token.
curl -fsSL -X POST 'https://api.pxform.tech/v1/auth/register' \
-H "Content-Type: application/json" \
-d '{
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
}'
GET/v1/session
Returns the account associated with the bearer token.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET 'https://api.pxform.tech/v1/session' \
-H "Authorization: Bearer $PXFORM_TOKEN"
POST/v1/auth/logout
Revokes this bearer token. Other tokens are unaffected.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/auth/logout' \
-H "Authorization: Bearer $PXFORM_TOKEN"
GET/v1/cases
Returns example cases and their edit_id values. No bearer token required.
curl -fsSL -X GET 'https://api.pxform.tech/v1/cases'
POST/v1/model/upload
Send a GLB file as the request body with its filename in X-Filename.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/model/upload' \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Content-Type: application/octet-stream" \
-H "X-Filename: model.glb" \
--data-binary "@model.glb"
POST/v1/render
Renders a saved model or example. The returned url is the source_image for an image edit.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/render' \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"edit_id": "EDIT_ID",
"view": "front",
"resolution": 512,
"samples": 32
}'
POST/v1/edit
Edits a source image using the prompt. Use the returned output_url as cond_image for reconstruction.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/edit' \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"example_id": "EDIT_ID",
"source_image": "SOURCE_IMAGE_FROM_RENDER",
"prompt": "Make the object blue"
}'
POST/v1/infer
Streams server-sent events. Save job_id to query or resume progress; the completed event includes output paths.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/infer' \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"edit_id": "EDIT_ID",
"cond_image": "OUTPUT_URL_FROM_EDIT",
"seed": 42
}' \
--no-buffer
GET/v1/jobs
Lists jobs owned by the current account.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET 'https://api.pxform.tech/v1/jobs' \
-H "Authorization: Bearer $PXFORM_TOKEN"
GET/v1/jobs/{JOB_ID}
Returns the job state, progress and available output paths. Use paths from the response for downloads.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET "https://api.pxform.tech/v1/jobs/$PXFORM_JOB_ID" \
-H "Authorization: Bearer $PXFORM_TOKEN"
GET/v1/jobs/{JOB_ID}/events
Streams job events. Last-Event-ID resumes after the last event already received.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET "https://api.pxform.tech/v1/jobs/$PXFORM_JOB_ID/events" \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Last-Event-ID: 0" \
--no-buffer
GET/v1/runtime-assets/{OUTPUT_PATH}
Use the relative path returned by the job response. The bearer token must own the job.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET "https://api.pxform.tech/v1/runtime-assets/$PXFORM_OUTPUT_PATH" \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-o "result.glb"
POST/v1/export
Converts an owned reconstruction to stl, obj or 3mf and returns its download URL. Use the run_id from the completed inference response.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/export' \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"run_id": "RUN_ID",
"format": "obj"
}'
GET/v1/platform
Returns enabled services, payment methods and package identifiers. No bearer token required.
curl -fsSL -X GET 'https://api.pxform.tech/v1/platform'
GET/v1/account/summary
Returns available credits, reserved credits, payment packages, check-in status and recent history.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET 'https://api.pxform.tech/v1/account/summary' \
-H "Authorization: Bearer $PXFORM_TOKEN"
POST/v1/account/checkin
Claims the daily reward once for the current account.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/account/checkin' \
-H "Authorization: Bearer $PXFORM_TOKEN"
POST/v1/payments/orders
Use a package_id and an available method from GET /v1/platform. Returns an order with checkout or QR information; creating an order does not confirm payment.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST 'https://api.pxform.tech/v1/payments/orders' \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"method": "alipay",
"package_id": "p001"
}'
GET/v1/payments/orders/{ORDER_ID}
Returns the current state of an order owned by this account.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET "https://api.pxform.tech/v1/payments/orders/$PXFORM_ORDER_ID" \
-H "Authorization: Bearer $PXFORM_TOKEN"
DELETE/v1/payments/orders/{ORDER_ID}
Closes a pending order. A successful payment must use the refund endpoint.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X DELETE "https://api.pxform.tech/v1/payments/orders/$PXFORM_ORDER_ID" \
-H "Authorization: Bearer $PXFORM_TOKEN"
GET/v1/payments/orders?limit=20&offset=0
Lists paid purchases and their refund state. Use limit and offset for pagination.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET 'https://api.pxform.tech/v1/payments/orders?limit=20&offset=0' \
-H "Authorization: Bearer $PXFORM_TOKEN"
POST/v1/payments/orders/{ORDER_ID}/refund
Requests a refund for a paid order owned by this account. Repeating the request returns the same refund.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X POST "https://api.pxform.tech/v1/payments/orders/$PXFORM_ORDER_ID/refund" \
-H "Authorization: Bearer $PXFORM_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"reason": "No longer needed"
}'
GET/v1/payments/orders/{ORDER_ID}/refund
Returns the refund status. A refund is complete when status is succeeded.
PXFORM_TOKEN="ACCESS_TOKEN_FROM_LOGIN"
curl -fsSL -X GET "https://api.pxform.tech/v1/payments/orders/$PXFORM_ORDER_ID/refund" \
-H "Authorization: Bearer $PXFORM_TOKEN"