XPlor3
REST API

Endpoint reference

The REST endpoints available to an API key, with each one's request and response fields.

Every address is relative to https://api.xplor3.space/v1. Except for GET /models, every endpoint needs the header Authorization: Bearer xpk_....

Models

List models

GET /models

The catalogue of every active model. Public, no key needed.

Prop

Type

Fields of type image, video or audio take a list of upload ids from POST /uploads. max on a media field says how many files may be sent.

The same content, as tables per model with the rules per tier and mode, is in the Model reference.

Generate

Start a job

POST /jobs

Starts a generation and takes the credits at once. Needs a verified email.

Prop

Type

Response 201:

Prop

Type

Job status

GET /jobs/{id}

Prop

Type

Live status changes

GET /jobs/{id}/events

Server-Sent Events (text/event-stream). The first message is the current status; later messages arrive whenever the status or progress changes, and the connection closes when the job finishes. Every message carries jobId, status, progress, failCode, failMessage, assets and queuePosition (the place in the queue while QUEUED).

List jobs

GET /jobs

The account's job history, newest first. Paginated with limit and cursor.

Prop

Type

Cancel a job

POST /jobs/{id}/cancel

Cancels a job that is still QUEUED and returns its credits. The answer is { "id": "...", "status": "CANCELED" }. A job already sent to the model is answered 400 JOB_ALREADY_SENT and keeps running to the end; a finished job is answered 400 JOB_NOT_CANCELABLE.

Files

Upload a file

POST /uploads

Multipart, with one file in the file field. Its kind is recognised from the file's contents, not its name: image, video or audio. The answer is 201 with id, name, mimeType and kind. Uploaded files also appear in the studio's Library.

POST /uploads/base64

The same, for clients that cannot send multipart. A JSON body { "fileName": "...", "dataBase64": "..." }, with base64 content up to about 11 MB.

POST /assets/urls

Prop

Type

The answer is { "items": [{ "id", "url", "expiresAt" }] }. Each link is valid for 15 minutes. Ids that are not your account's are left out.

GET /assets/{id}/url

One link for one file, with ?download=true when needed.

Account

Balance

GET /wallet

balance and the last 20 credit entries in ledger. Each entry carries delta, reason (for example JOB_DEBIT, JOB_REFUND, TOPUP), jobId and createdAt.

GET /wallet/ledger

Every credit entry, paginated with limit and cursor.

Key owner

GET /me

id, email, name and emailVerified of the account that owns the key.

Webhook secret

GET /me/webhook-secret
POST /me/webhook-secret/rotate

The webhook signing secret (secret, starting whsec_) and its version number (version). Both accept only a signed-in browser session, never an API key, so they are used from the studio's Credentials page. A request with an API key is answered 403.

Projects

GET /collections

The account's projects, with an id that can be sent as collectionId.

POST /collections

Creates a new project. Body { "name": "Holiday campaign" }.

POST /collections/{id}/items

Files finished jobs into a project. Body { "jobIds": ["..."] }.

On this page