Import model weights
Copies a model's weights from Hugging Face, S3 or Google Cloud Storage into OpenRelay and checks them, to serve on a dedicated endpoint. Name a credential for a private source. attestRights must be true: you attest you have the rights to the weights, under the license you name. The import runs in the background; poll it until it succeeds or fails. Your organization runs a limited number of imports at once (409 IMPORT_LIMIT names it), and a create passes the same balance and account checks as a VM create.
Required permission
Requires the import.create permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl imports create --attest-rights --source <source>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
application/json- body
A customer's model import.
source*license?stringThe license the weights are under.
attestRights*booleanMust be true: you attest you have the rights to import and serve the weights under that license.
Started
application/json- response
id*stringorgId*stringartifactId*stringThe artifact the import produces, pending until it succeeds.
status*string"queued""copying""validating""succeeded""failed"source*attempt*integerImporter tasks started for this import.
progress*failure?artifact?createdAt*stringdate-timeupdatedAt*stringdate-timecurl -X POST 'https://api.openrelay.inc/v1/inference/imports' \ -H 'Content-Type: application/json' \ -d '{ "source": { "uri": "string" }, "attestRights": true}'{ "id": "string", "orgId": "string", "artifactId": "string", "status": "queued", "source": { "uri": "string", "revision": "string", "pinnedRevision": "string", "credentialId": "string" }, "attempt": 0, "progress": { "filesDone": 0, "filesTotal": 0, "bytesDone": 0, "bytesTotal": 0 }, "failure": { "code": "string", "message": "string" }, "artifact": { "id": "string", "importId": "string", "status": "pending", "weightsRef": "string", "digest": "string", "format": "string", "architecture": "string", "dtype": "string", "quantization": "string", "paramCount": 0, "bytes": 0, "files": 0, "compat": { "evaluatedAt": "2019-08-24T14:15:22Z", "policyId": "string", "policyVersion": 0, "fits": [ "string" ], "refusals": { "property1": "string", "property2": "string" } } }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}List your organization's model imports GET
Every model import of your organization, running or ended, each with its status, progress, source and the artifact it produces. Read the artifact for its facts and the hardware it fits. Imports are listed by id, not by when they started.
Get a model import GET
One of your organization's model imports: its status, progress, the revision it pinned, and why it failed, with the artifact it produces. Another organization's import reads as not found.