4. Remote API#
This page specifies the v1 HTTP API between SiliconCompiler’s remote client
and a job server: what a client sends, and what a server must answer. It is
written for anyone building a server the client can use, or a client of their
own. To run jobs remotely, see Guide to Remote Compilation.
Note
v1 is alpha. It is versioned, but any part of it may change until it
is declared frozen, and nothing on the wire marks the freeze. Building another
v1 server before then is discouraged.
The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are to be interpreted as described in RFC 2119 and RFC 8174. The API constrains what a client can observe; how a server stores, schedules and isolates the work behind it is its own business.
4.1. Terms#
- CI
Continuous integration: a pipeline that builds and tests every change, with no person at it.
- DER
Distinguished Encoding Rules, the binary encoding a CI credential’s private key is written in.
- DPoP
Demonstrating Proof of Possession (RFC 9449): each request carries a proof, signed with the client’s private key, that it comes from the key the token was issued to, so a stolen token is useless without the key.
- ECDSA
- ES256
ECDSA on P-256 with SHA-256, under the name RFC 7518 Section 3.4 gives it. The one signature algorithm
v1uses.- FIFO
A named pipe: a special file, which an archive may not create.
- JWK
JSON Web Key (RFC 7517): a key written as JSON. A proof carries the public half of the client’s key as one, with
"kty": "EC"for an elliptic-curve key.- JWS
JSON Web Signature (RFC 7515): a header, a payload and a signature over both. In its compact form, each is base64url-encoded and the three are joined by dots.
- JWT
JSON Web Token (RFC 7519): a JWS whose payload is a set of claims, such as
iat(issued at) andexp(expires). A DPoP proof and a CI credential’s assertion are JWTs.- KiB
A kibibyte, 1,024 bytes (binary prefixes).
- LFS
Git Large File Storage, which keeps a repository’s large files on a server of their own.
- NDA
A non-disclosure agreement, such as a foundry requires before it releases a PDK.
- OAuth
OAuth 2.0 (RFC 6749), the framework the login endpoints follow: a client trades a grant for tokens at a token endpoint. The device grant is RFC 8628, and token exchange RFC 8693.
- P-256
The elliptic curve also named secp256r1, defined in NIST SP 800-186.
- PDK
A process design kit; see PDK.
- PEP
A Python Enhancement Proposal. PEP 440 defines Python version specifiers, and PEP 503 how a distribution’s name is normalised.
- RFC
A Request for Comments, an Internet standard or one of its companions. Each is linked where it is cited.
- SHA-256
The 256-bit hash of the SHA-2 family. A digest is written
sha256:<hex>.- SSE
Server-sent events: a stream of text events in one HTTP response,
text/event-stream, resumed withLast-Event-ID.
4.2. Overview#
A remote run is submit, poll, collect:
GET /v1 which versions the server runs, which login it takes
POST /v1/auth/token a session, bound to this machine's key
POST /v1/jobs 201, the job in created
POST /v1/jobs/{id}/upload-grant 200, a presigned PUT
PUT <the presigned URL> the archive, straight to storage
POST /v1/jobs/{id}/submit 202, the job in staging
GET /v1/jobs/{id} until terminal, waiting Retry-After between reads
GET /v1/jobs/{id}/logs?step=&index= 303 to one node's live log
GET /v1/jobs/{id}/artifacts the results, listed
GET /v1/jobs/{id}/artifacts/{aid} 303 to one artifact's bytes
Every path is under
/v1. The API moves JSON and never bulk bytes: an archive goes up, and every artifact comes down, through a URL the server hands over.Every session is bound to a key pair the client generates and keeps. Each request carries a token and a proof signed with that key (DPoP).
The create call carries what the client already knows about the run, so a job can be refused before its archive moves.
Endpoint |
Credential |
Scope |
|---|---|---|
none |
– |
|
none |
– |
|
a DPoP proof |
– |
|
a DPoP proof |
– |
|
token |
none: a session may always end itself |
|
token |
none; refused to a CI session |
|
token |
|
|
token |
|
|
|
token |
|
|
token |
|
token |
|
|
token |
|
|
token |
|
|
token |
|
|
token |
|
|
token |
|
|
token |
|
|
token |
|
|
token |
|
|
token |
|
Nothing else is under /v1/. /v1/admin/ is reserved for a deployment’s
own routes and is never given to the API, so they cannot collide with it; a
route there MUST NOT accept a v1 access token, and no v1 scope is
administrative. A deployment’s portal is outside /v1 and its routes are not
part of the API: a client reaches a portal page only through a URL the server
hands it.
There is deliberately no webhook, no .well-known discovery document, no
separate refresh endpoint, no retry verb (a retried request replays through
Idempotency-Key; a new run is a new job) and no path into an archive.
4.3. Conventions#
4.3.1. Versioning and compatibility#
The version is in the path. Within v1 a change is additive only: new
response members, new endpoints, and new optional request members, each paired
with a features string in GET /v1, since an older server refuses a
member it does not know. Nothing is removed, retyped or tightened.
Requests are strict. A JSON endpoint refuses a request member it does not
define, and every endpoint refuses a query parameter it does not define, with
400 invalid-request. A client-supplied value is checked for type, length and
character set and refused rather than trimmed or escaped; the refusal names the
field and never echoes the value. The two OAuth endpoints are the exception: they
ignore a parameter they do not know (RFC 6749 Section 3.2), except
actor_token, audience and resource sent with a value, which are
refused invalid_request. A parameter sent with no value counts as omitted
(RFC 6749 Section 3.1), a missing required parameter is invalid_request,
a missing grant_type included, and a repeated parameter is
invalid_request, even one the endpoint does not know
(RFC 6749 Section 5.2). A member the
server owns is refused in a request like any other member the endpoint does
not define. A job’s design and jobname, a flow, a step and an index
are [A-Za-z0-9][A-Za-z0-9._-]{0,99}; a value outside it is 400.
Order. At an endpoint that takes a token, a request is authenticated first
(401, session-ended included), then its scope is checked (403), then
its own query and body (400), then a feature the deployment lacks (501),
and only then are the object and its state looked at. A malformed request
without a credential is therefore 401, never 400. The two OAuth
endpoints and the endpoints that take no token have no credential to check
first.
Responses are must-ignore. A client discards a response member it does not know. It also accepts an unrecognised value in an enumerated field, and takes the cautious default:
Field |
On a value the client does not recognise |
|---|---|
a job’s or node’s |
read |
an SSE |
discard the event |
|
re-request the stream and resume; only |
an artifact’s |
list it, and infer nothing from it |
|
infer no block either way |
|
report the artifact deleted, reason unknown |
|
treat it as |
|
do not rely on the identity |
a granted scope |
ignore it |
|
fail, and say so |
an error |
an untyped failure of its status class, retried by waiting only where it
carries |
|
act on the |
anything else |
display the raw value, and act on nothing |
Every enumeration is closed at v1, so these defaults are robustness rather
than room to grow. The exceptions are artifact kinds and scopes, which v1
may add to. The error registry is complete at the freeze.
Deprecation. A deprecated version answers every response with
Deprecation and Sunset headers, at least 60 days apart. A client MUST
NOT fail on either, and warns its user once per session, giving the
Sunset date.
4.3.2. Requests and responses#
A success is
application/json, and a refusalapplication/problem+json(Errors). A live log istext/event-stream, from the stream host rather than the API.There is no envelope: a resource response is the resource. A collection is
{"items": [...]}, and an empty one is200with{"items": []}, never404.201carries the resource and aLocationheader.202carries the resource in its new state, so a client need not read it again.204carries nothing.A request shown below as
{}takes no body. A server accepts an empty body and a JSON{}alike there.JSON request bodies are
application/json. The two OAuth endpoints takeapplication/x-www-form-urlencoded.
4.3.3. Names and values#
Form |
Means |
|---|---|
|
every member, query parameter and enumeration value |
|
an error |
|
a feature string, |
|
a scope, |
|
an RFC 3339 timestamp in UTC, written with |
|
a timestamp promised as a floor |
|
a number in that base unit, never scaled |
|
a ceiling on one request or one object |
|
a ceiling on what one caller holds at once, in |
|
an opaque identifier, which a client MUST NOT parse, order or construct |
|
a link the client follows and never constructs |
|
an error |
|
a closed set naming what an object is |
|
on an error or a stream event, a closed sub-case a client may branch on; on a transition or a cancel, prose |
|
prose, for display only |
|
a closed set saying why a |
|
a boolean about what the caller may do |
Absent and
nulldiffer. Absent means the concept does not apply to this deployment or object;nullmeans it applies and the value is empty or unknown. A client MUST NOT conflate them.A limit is a non-negative integer,
nullor absent.0means none allowed,nullmeans no ceiling, and absent means the server does not implement it, for which a client invents no bound. A client decodes a limit into a nullable type.A multi-valued field is a JSON array, or an object keyed by name. The one exception is
scope, space-delimited wherever it appears, as RFC 6749 Section 3.3 defines it.
4.3.4. URLs the server hands over#
Where a client may reach something only by the server’s leave, the server hands over the URL and the API publishes no path to it. A client MUST NOT construct one.
URL |
What the client does with it |
|---|---|
the upload grant’s |
|
the |
|
the |
|
the |
open it in a browser, for a person |
The first three are bearer secrets for what they name. A client MUST NOT log, print or store one, and on a retry or a resume asks for a fresh one rather than reuse it. So is a sign-in
urlwhoseexpires_atis set: a client prints it only where no browser opened.Following a
303from.../logsor an artifact fetch is a new request. It carries noAuthorization, no proof and no credential of the client’s own. Any other303to the API’s own origin carriesAuthorizationand a proof signed for the target, so a client does not let its HTTP library follow redirects with the previous headers.A URL the server builds on its own origin names one of the deployment’s configured public origins, never an address only a proxy can reach.
4.3.5. Pagination#
A collection that paginates, the job list and the artifact list, takes
?limit= and ?cursor=, and the next page is a Link header with
rel="next", absent on the last page. limit and cursor each appear at
most once; a repeat is 400 invalid-request. GET /v1/devices takes no
query.
A client follows
rel="next"on any list response, documented as paginated or not, as given. It never rebuilds the request aroundcursor, which is opaque and carries every filter.A paginated collection is ordered by
created_at, newest first, withidcompared bytewise as the tie-breaker. The device list is ordered the same way byenrolled_at.limitdefaults to 50 and is clamped to an unpublished maximum, never refused.A filter repeats to OR within its key, and filters AND across keys. An unrecognised value of an enumerated filter is
400, never an empty page.A stale or malformed cursor is
400 invalid-cursor, on which a client starts the listing again.
4.3.6. Idempotency#
POST /v1/jobs and POST /v1/jobs/{id}/submit take an Idempotency-Key
header.
A client MUST send a fresh key on each create and each submit, a resubmit after the job was sent back included. A request without one is accepted and not de-duplicated.
A server honours a key for 24 hours, scoped to the caller, the endpoint and the path. A replay with the same body returns the original response, its status included, even once the job has moved on or been deleted.
Only a final answer binds a key: a
2xx, or a refusal withoutRetry-After. A refused create MAY leave its key unbound.A replay that arrives while the original is still being handled is
409 job-state-conflictwithreason: "in_progress"andRetry-After.The same key with a different body is
422 idempotency-key-reuse.
After a timeout or a 5xx, every retry carries a fresh DPoP proof:
Call |
A retry |
|---|---|
every |
is safe |
create and submit |
is safe with the same |
|
is safe: it re-issues, for the same |
the presigned |
starts the upload over, under a re-issued grant once this one can no longer start it |
cancel, both |
is safe: each is idempotent |
|
is safe for a few minutes, with a proof from the same key |
|
is a new trade, and safe |
|
starts a new authorization, with a new code |
|
is safe: each call answers a new page |
4.3.7. Polling#
The server sets the interval. A read of a job that is not terminal carries
Retry-After, in whole seconds and at least 1, and a client waits at least
that long before reading it again.
4.3.8. Headers#
User-Agent. A client MUST send one naming the product and its version, stable rather than an HTTP library’s default –
siliconcompiler/0.38.4– so an operator can allowlist it at an edge. A server MUST NOT authorize on it.Headers the API does not define. A server ignores them and MUST NOT refuse a request for one. A client supports headers its operator configures for an access layer in front of the server, and sends them to the API’s origin only, never to a storage, stream or browser URL on another origin. So a server never sends a client to another origin that requires them.
Caching. Every response from
POST /v1/auth/tokenandPOST /v1/auth/device, whether tokens, an OAuth error,problem+jsonor a bare405, carriesCache-Control: no-storeandPragma: no-cache. Every authenticated response from another endpoint carriesCache-Control: private, no-store.GET /v1, the same for every caller, carriesmax-age;GET /v1/healthzcarriesno-store.Every response carries
X-Content-Type-Options: nosniff.Tracing.
traceparentis accepted on every request, and a refusal’strace_idis that trace.A client sends no credential it did not put there itself: none from
~/.netrc, a credential helper or a keychain, to the API, storage or a stream host.
4.3.9. Transport#
A credential is an access or refresh token, a device_code or a
user_code.
A client MUST NOT send a credential over plaintext to a deployment that authenticates.
A deployment whose
grant_types_supportednames an authenticating grant is HTTPS-only. It refuses a plaintext request with426 insecure-transportand anUpgradeheader, never with a redirect, since by then the credential has been read.A deployment that authenticates nobody MAY serve plaintext. Its tokens are bound to a key and are not bearer secrets, and the only bearer secrets it issues are its storage and stream URLs and its sign-in links.
A client never infers
httpsfrom a port. Plaintext is only ever what a person typed.An answer to an
httpsrequest sends the client only tohttpsURLs. A client never follows anhttpsAPI to plainhttp, and oninsecure-transportstops and says the address must behttps.
4.4. Authentication#
4.4.1. Keys and proofs#
Every session is bound to a P-256 key pair the client generates and keeps. The
private half never leaves the machine. Tokens are opaque to the client, their
token_type is DPoP, and each works only with a proof from the key it was
issued to (RFC 9449). Every request after login carries both:
Authorization: DPoP <access token>
DPoP: <proof>
POST /v1/auth/device and POST /v1/auth/token take a proof and no
token. A proof is a compact JWS, freshly signed for each HTTP request:
// header: the public key travels in every proof
{"typ": "dpop+jwt", "alg": "ES256",
"jwk": {"kty": "EC", "crv": "P-256", "x": "l8tF...", "y": "9VE4..."}}
// payload
{"htm": "GET",
"htu": "https://sc.example.com/v1/jobs/01J9...",
"iat": 1789433600,
"jti": "d90f...",
"ath": "fUHy...", // with an access token: base64url(SHA-256(token))
"nonce": "eyJ7..."} // where the server issued one
alg is
ES256: ECDSA on the P-256 curve with SHA-256, as RFC 7518 Section 3.4 defines it. It is the one algorithmv1allows: a server MUST accept it and a client MUST use it, and it is not negotiated.htu is canonical: scheme and host lowercased, a default port omitted, the path as sent, and no query or fragment. A server canonicalises both sides and compares against its configured public origins with the request’s path, never against the
HostorX-Forwarded-Hostthe request carries.iat is accepted within 60 seconds either way. The window is fixed by the API: a server that narrows it refuses a conforming client.
jti is fresh on every request, retries and redirect follow-ups included.
The server verifies the signature with the embedded key, checks the claims, refuses a replayed
jti, and compares the key’s RFC 7638 thumbprint with the one the token, session or device code is bound to. A client never sends a thumbprint.A refused proof says which check failed: the URL, the time, the signature, the key or a replay.
Nonces. A server MAY require one. Its challenge is
401 dpop-nonce-requiredwithWWW-Authenticate: DPoP error="use_dpop_nonce"and aDPoP-Nonceheader, or400 use_dpop_nonceat the two OAuth endpoints. A client retries once with the nonce and keeps one nonce per origin. A missing or stale nonce is never reported as a bad proof.Clock. A client whose proof is refused for its time compares its clock with the response’s
Date, corrects later proofs by the difference where it is past the window, retries once, and tells its user.No error invalidates the key, a
401included. A new key enrols a new device, so a client replaces its key only when its user asks it to.
4.4.2. Logging in#
GET /v1’s grant_types_supported says which login a deployment takes, and
a client chooses by it:
|
Used for |
|---|---|
|
a person approving this machine in a browser (RFC 8628) |
|
a deployment that authenticates nobody |
|
a CI pipeline presenting its own credential (RFC 8693) |
|
rotating a session the client already holds; every deployment that issues refresh tokens |
A cached GET /v1 can be stale, so a client still handles
unsupported_grant_type by switching login. That answer never counts towards
a rate limit or a lockout.
The device grant. The client sends POST /v1/auth/device with a proof and
the scopes it wants, opens verification_uri in a browser and prints it with
user_code and its key’s thumbprint, then polls POST /v1/auth/token with
the device_code every interval seconds, each poll with a proof from the
same key. A person signs in to the page behind verification_uri and approves
the code there. That page is the deployment’s, outside /v1, and takes no
proof, but it MUST:
attribute the approval to the person signed in to it, never to anything the request carries;
show the code, the machine key’s thumbprint as the server computed it,
requesting_hostas the client’s own claim, the address the request came from, and the scope as it would be granted, and require a positive act;accept at most three wrong codes per approver, across codes, before a cooldown that does not reveal whether a code exists, and answer an unknown, expired, decided or used code identically. The one exception is the person who decided a code, from any of their browser sessions, repeating the same decision while the code is unexpired; once it has expired, its decider gets the identical answer too;
not approve a login that would take the account past its
deviceslimit;not be cacheable, frameable or leak its URL through
Referer: it carriesContent-Security-Policy: default-src 'self'; frame-ancestors 'none'; form-action 'self'; base-uri 'none',Referrer-Policy: no-referrer,Cache-Control: no-storeandX-Content-Type-Options: nosniff. So does every other HTML page this API sends a person to.
A deployment that authenticates nobody takes client_credentials with
client_id=local:<subject>. The subject is derived by the client from the
machine’s fingerprint and the user’s uid, and the user name goes as
display_name, for display. The server provisions an identity on first
contact, with issuer: "local", and binds it to the key that first presents
it; the same subject presented with another key is invalid_client. A server
MAY turn the binding off where every client is one trust domain, such as a fleet
of containers sharing one machine id. It publishes identity_assurance:
"self_asserted". A client MUST NOT use this grant where it cannot derive a
fingerprint, and keeps the id GET /v1/me last reported for the server,
so it can tell a new identity from lost jobs.
A CI pipeline holds a credential minted for it, one line of the form
<prefix>_<credential id>_<key>: an opaque prefix, an id with no _, and
the base64url DER encoding of a P-256 private key. It trades the credential at
POST /v1/auth/token with an RFC 7523 assertion signed by that key, with a
proof from its own session key; the two keys MAY be the same. The trade returns
an access token and no refresh token, and the pipeline trades again when the
token expires.
Refresh rotates the pair: each refresh token is spent once and replaced.
A refresh carries a proof from the session’s key, or it is refused
invalid_dpop_proofand revokes nothing.For a few minutes after a refresh token is replaced, a repeat of it with a valid proof is a retry, answered with the replacement already issued. Later, it is reuse: the session ends,
invalid_grantwithreason: "reused". The same holds for a redeemeddevice_code. A client whose processes share one session refreshes once for all of them.A refresh always returns the session’s full scope, and never widens it.
Lifetimes are the server’s, read from every token response and never
assumed: expires_in for the access token; refresh_token_expires_in for
how long the client may be idle and resume, renewed on each rotation and never
past the session; and session_expires_in for when its user must log in
again, which never moves. On a token exchange, session_expires_in is what is
left of the CI credential.
4.4.3. The machine fingerprint#
Where it can derive one, a client sends machine_id_hash, an opaque hash of
the machine’s identity, and machine_id_source, one of linux_machine_id,
macos_platform_uuid, windows_machine_guid or none, at enrolment and
on every refresh. It is a label, not a credential: a refresh whose pair differs
from the device’s is invalid_grant, and the person logs in again. A device
enrolled with none has no change detection, and a token exchange carries no
pair. machine_id_hash is 1 to 128 printable ASCII characters. A hash needs a
source other than none, and a source other than none needs a hash;
anything else, at enrolment or at refresh, is invalid_request, and the proof
is not spent.
4.4.4. Scopes#
Scope |
Permits |
|---|---|
|
listing and reading jobs and nodes, the artifact listing, and live log output |
|
create, |
|
|
|
an artifact’s bytes, every kind, an archived log included |
|
listing and reading the caller’s devices |
|
revoking a device; carries |
|
|
The granted scope is the expanded set. A request for
jobs:writeis granted, and echoed, asjobs:read jobs:write. A check is set membership against it.A session’s scope is its ceiling: the grant’s default intersected with what was asked for. A device grant or
client_credentialsdefaults to every scope. A CI credential defaults tojobs:read jobs:write artifacts:read profile:read, withjobs:deleteonly where it was minted with it, and MUST NOT holddevices:readordevices:write.An unrecognised scope is dropped and the rest granted; a request left with none is
invalid_scope. A request for more than the grant allows is narrowed, never refused for being more. A token-exchange request whose recognised scopes all lie outside the credential’s scope isinvalid_scope, not a session with an empty scope; one partly outside is narrowed.Scope is checked first, before the caller’s access to the object and before any entitlement, and its refusal discloses neither:
403 insufficient-scopewithWWW-Authenticate: DPoP error="insufficient_scope", scope="<the scope needed>". A client fails on it and does not refresh.
4.4.5. Handling a 401#
Every 401 carries WWW-Authenticate with the DPoP scheme and an
error= parameter. invalid_token covers two conditions a client must
treat oppositely, so it branches on the header and the body’s type
together:
|
|
The client |
|---|---|---|
|
|
refreshes, then retries once |
|
|
logs in again, and does not refresh. On |
|
|
retries once with the |
|
|
fails, and does not refresh; refused for its time, it corrects its clock and retries once |
4.4.6. POST /v1/auth/device#
Starts a device authorization. The body is form-encoded, shown here as JSON. The proof’s key is the one the login will enrol.
{
"scope": "jobs:read jobs:write jobs:delete artifacts:read devices:read devices:write profile:read",
// REQUIRED. Space-separated; no default and no "*"
"requesting_host": "fabric-ws-3", // OPTIONAL. The client's own name for its host
"device_label": "laptop", // OPTIONAL. The name of the device it enrols
"machine_id_hash": "...", // OPTIONAL. The fingerprint pair
"machine_id_source": "linux_machine_id" // OPTIONAL. Absent reads as none
}
Response 200:
{
"device_code": "...", // REQUIRED
"user_code": "WDJB-MJHT", // REQUIRED. What the person types
"verification_uri": "https://.../device", // REQUIRED
"verification_uri_complete": "https://.../device?user_code=...", // OPTIONAL
"expires_in": 600, // REQUIRED. Seconds
"interval": 5 // REQUIRED. Seconds between polls
}
A refusal is in the OAuth shape: invalid_request for a missing or empty
scope or a repeated parameter; invalid_scope when no scope asked for is recognised;
unsupported_grant_type where the deployment does not offer the device grant;
use_dpop_nonce and invalid_dpop_proof. A server MUST bound how fast
authorizations are created.
4.4.7. POST /v1/auth/token#
The only token endpoint; grant_type says which grant. The body is
form-encoded, and every grant takes a proof.
// grant_type=urn:ietf:params:oauth:grant-type:device_code
{"grant_type": "urn:ietf:params:oauth:grant-type:device_code",
"device_code": "..."} // REQUIRED. A scope here is invalid_request
// grant_type=refresh_token
{"grant_type": "refresh_token",
"refresh_token": "...", // REQUIRED
"machine_id_hash": "...", // OPTIONAL. The fingerprint pair, as at enrolment
"machine_id_source": "linux_machine_id"} // OPTIONAL. A scope here is ignored
// grant_type=client_credentials, where the deployment authenticates nobody
{"grant_type": "client_credentials",
"client_id": "local:<subject>", // REQUIRED
"machine_id_hash": "...", // OPTIONAL
"machine_id_source": "linux_machine_id", // OPTIONAL
"display_name": "jchen", // OPTIONAL. For display only
"scope": "jobs:read jobs:write"} // OPTIONAL. Narrows the default
// grant_type=urn:ietf:params:oauth:grant-type:token-exchange, for CI
{"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
"subject_token": "<JWT>", // REQUIRED. The assertion, below
"subject_token_type": "urn:ietf:params:oauth:token-type:jwt", // REQUIRED
"requested_token_type": "urn:ietf:params:oauth:token-type:access_token", // OPTIONAL
"scope": "jobs:read jobs:write"} // OPTIONAL. Narrows the credential's scope
The token-exchange assertion is signed with the CI credential’s key, ES256,
and carries iss and sub equal to the credential id; aud, one of the
deployment’s public origins, compared as htu is; jti; iat; exp,
no more than 300 seconds out; and cnf.jkt, which MUST equal the thumbprint
of the request’s proof (RFC 7800), or the trade is invalid_grant. Its
times are checked with 60 seconds of leeway, so an exp up to 360 seconds
ahead of the server’s clock is accepted. A subject_token that is not a
compact JWT, three base64url segments, or is over 4096 characters is
invalid_request; a well-formed assertion that does not verify is a bare
invalid_grant. subject_token_type other than
the JWT type is invalid_request, requested_token_type other than the
access-token type is invalid_target, and actor_token, audience or
resource is invalid_request.
Response 200:
{
"access_token": "...", // REQUIRED. Opaque
"token_type": "DPoP", // REQUIRED. Never Bearer
"expires_in": 900, // REQUIRED
"refresh_token": "...", // OPTIONAL. On every grant but token-exchange
"refresh_token_expires_in": 604800, // REQUIRED with refresh_token, else absent
"session_expires_in": 2592000, // REQUIRED
"scope": "jobs:read jobs:write ...", // REQUIRED on every grant: what was granted
"issued_token_type": "urn:ietf:params:oauth:token-type:access_token"
// REQUIRED on token-exchange, else absent
}
A refresh token is never accepted as an access token, and one deployment’s
tokens are never accepted by another. Refusals are in the OAuth shape, with
reason where the row names one:
|
When |
The client |
|---|---|---|
|
the person has not decided yet |
polls on at |
|
the person denied the login; with |
stops. After |
|
the device code expired before it was redeemed, decided or not; an approval does not extend it |
starts the login again |
|
an unknown or spent refresh token, a changed fingerprint, a refused
assertion, or a session that has ended, with |
logs in again, and never retries the refresh |
|
a |
fails; an operator can release the binding |
|
a required parameter is missing or empty, |
fails |
|
a |
switches login |
|
no scope asked for is recognised; or, at token-exchange, all lie outside the credential’s scope |
fails |
|
a nonce is required; |
retries once with it |
|
the proof is missing, malformed, replayed or from the wrong key |
fails, and does not refresh |
A server MUST hold device-code polls to interval (slow_down), and MUST
bound the other grants per account and per source, counting against an account
only a request that verified as that account’s. A ceiling keyed by account never
counts another account’s requests. A ceiling that can count only by source,
creating authorizations or failed attempts, counts everyone at that address, so
it MUST be sized for a shared login node, and SHOULD count failures by the
proof’s key before the address alone.
4.4.8. POST /v1/auth/revoke#
Ends the session the caller presents, and nothing else. No body, {}.
Response 204. Idempotent: revoking an ended session is 204 too. A
refusal is application/problem+json.
4.4.9. POST /v1/auth/browser#
A page for a person’s browser. Every portal page a client opens comes from here;
the one exception is verification_uri, which a person reaches before there
is a token to ask with. The JSON body names the page, with at most one member:
{"job_id": "01J9..."} // the job's page
{"terms_id": "acme-nda"} // a terms document's page, to read and decide
{"artifact_id": "01J9..."} // asking for an artifact's approval
{"resource": "acme"} // a resource's page, named by entitlement-denied or upload-forbidden
{} // the portal's home
resource is the resource an entitlement-denied carried, at create,
on a job’s error, at a fetch or on a live log, or the one an
upload-forbidden carried on a job’s error, which names it only where the
caller holds a grant of it. On that page a person who holds the resource may ask
to upload their own copy, where the deployment grants such a permission, or reads
why not; whether a grant allows an upload is never on the wire, so the client only
opens the page. A name is unique across kinds
on a deployment, so no kind is sent. The page is answered for every name the
deployment’s catalogue holds, and says why where there is nothing to ask for: the
grant held, a request already made, or a resource that cannot be granted. A
client asks for it from an interactive session and opens it, printing it where
no browser opens; a CI session asks for none.
Where any of a job’s artifacts the caller can see has can_request_access
true, the job’s page offers a request for each of them, so a client with
several to ask for may open the job’s page once rather than each artifact’s.
Response 200, with Cache-Control: private, no-store:
{"url": "https://sc.example.com/portal/enter?token=...", // REQUIRED
"expires_at": "2026-10-01T18:04:30Z"} // REQUIRED, nullable
A time in expires_at makes url a single-use sign-in that lands on the
page, opened at once. null makes it the page itself, which the portal signs
a browser in to as it would any visit, and which a client may print or keep.
url is on the portal’s configured origin, never one taken from a request
header.
Status |
|
When |
|---|---|---|
|
|
more than one member, or one not defined here; or an id or a |
|
|
a CI session; or an artifact whose |
|
|
a well-formed id naming a job, artifact or document the caller cannot see;
or a |
4.5. The server and the account#
4.5.1. GET /v1#
What the deployment runs and how it is used. No credential.
{
"api_version": "v1", // REQUIRED. Changes only on a break
"software": { // REQUIRED. Three buckets, each an open map
"python": {"siliconcompiler": ["0.39.1", "0.39.0"]}, // must land in one image
"tools": {"openroad": ["2.0.1"]}, // resolved per node
"interpreter": {"python": ["3.12.4"]} // for nodes running the user's Python
},
"grant_types_supported": ["urn:ietf:params:oauth:grant-type:device_code",
"refresh_token"], // REQUIRED
"limits": { // REQUIRED, every member
"max_job_nodes": 1000,
"max_upload_bytes": 1073741824,
"artifact_retention_seconds": 2592000,
"pending_uploads": null,
"concurrent_jobs": null,
"concurrent_log_streams": 8,
"max_archive_members": 100000,
"max_archive_expanded_bytes": 10737418240,
"max_download_bytes": null,
"abandon_after_seconds": 86400,
"max_staging_seconds": 3600
},
"features": ["logs.stream"], // REQUIRED. [] is legal
"identity_assurance": "verified", // REQUIRED. "verified" | "self_asserted"
"terms_url": "https://...", // OPTIONAL. The service terms, readable unauthenticated
"notices": [ // REQUIRED. [] is the normal answer
{"level": "info", // "info" | "warning"
"message": "Maintenance 27 Sep 02:00-06:00 UTC; submissions will queue.",
"starts_at": "2026-09-27T02:00:00Z", // nullable: already in effect
"ends_at": "2026-09-27T06:00:00Z"} // nullable: until further notice
]
}
software has exactly the three buckets, each present and possibly
{}. Inside each, a name maps to a non-empty array of versions, most preferred first. Apythonkey is a distribution name normalised under PEP 503, atoolskey is lowercase, andsiliconcompileris required inpython. Every version listed MUST be runnable. A client SHOULD compare its own versions against the list before it creates a job; the server decides at create.limits are the deployment’s defaults. A caller’s effective values are in
GET /v1/me, which is what is enforced.nullis allowed formax_download_bytes,pending_uploadsandconcurrent_jobs, and a numericpending_uploadsorconcurrent_jobsMUST be enforced.features holds only registered strings. An absent string and an unrecognised one both mean do not rely on it, and each has a runtime refusal,
501 feature-unsupported, for a client whose copy ofGET /v1is stale:String
The deployment
logs.streamserves one node’s live output through
.../logslogs.stream.jobalso serves one stream for a whole running job; never advertised without
logs.streamprojectsgroups jobs into projects: a create may name
project, andGET /v1/jobswidens to the caller’s projectspython.envinstalls a job’s Python packages while it stages (Python packages)
jobs.reuseanswers a create whose
run_hashmatches one of the caller’s own finished jobs with that job,200, rather than a new oneidentity_assurance is advisory. Only
verifiedasserts that the identities the deployment reports are verified; a client chooses its login bygrant_types_supported, never by this.notices are shown to a person, once per session and whenever they ask for the server’s status; a client never branches on
message.
4.5.2. GET /v1/healthz#
Liveness, with no credential. 200 for pass and warn, 503 for
fail, as application/health+json with Cache-Control: no-store. The
body is {"status": "pass"}, "warn" or "fail", and nothing else.
warn is optional: a server MAY answer it for a degraded dependency and need
not. A server that cannot read its own store answers fail. Downtime is announced in GET /v1’s notices,
not here.
4.5.3. GET /v1/me#
Who the caller is, what they may use, and what stands in the way. It reports; the server decides again at every gate.
{
"id": "01J9...", // REQUIRED. A job's owner.id is this value
"issuer": "https://idp.example.com", // REQUIRED. "local" where nobody is authenticated
"projects": [ // REQUIRED. [] for none. A CI credential bound to a
// project lists that project alone, [] once its
// person has left it
{"slug": "tapeout-alpha", "name": "Tapeout Alpha", "role": "owner", // "owner" | "member"
"archived_at": null}], // REQUIRED, nullable
"authorized": { // OPTIONAL. Absent, never {}, where there are no grants
"pdks": [{"name": "acme", "expires_at": "2027-01-01T00:00:00Z",
"blocked_by": ["acme-nda"], // OPTIONAL. Unaccepted agreements, by terms id
"via": ["self", "project:tapeout-alpha"]}],
"tools": [],
"libraries": [],
"fpgas": [],
"capabilities": [{"name": "python-packages", "expires_at": null, "via": ["self"]}]
},
"limits": { // REQUIRED, every member. The caller's effective values
"max_download_bytes": null,
"concurrent_jobs": null,
"concurrent_nodes": 200,
"pending_uploads": null,
"max_job_nodes": 500,
"devices": 10,
"max_staging_seconds": 3600,
"artifact_retention_seconds": 2592000
},
"usage": { // REQUIRED. Reported, not enforced, but concurrent_jobs
"compute_seconds": {"used": 18000, "total": 972000, "limit": 360000,
"window": "calendar_month", "resets_at": "2026-11-01T00:00:00Z"},
"license_seconds": {"acme_sim": {"used": 3600, "total": null, "limit": null,
"window": "calendar_month", "resets_at": "2026-11-01T00:00:00Z"}},
"storage_bytes": {"used": 5368709120, "total": null, "limit": null,
"window": null, "resets_at": null},
"concurrent_jobs": 0
},
"session": { // REQUIRED. The session this request was made in
"kind": "interactive", // "interactive" | "ci"
"scope": "jobs:read jobs:write ...",
"device_id": "01J9...", // null for a CI session
"access_expires_at": "2026-10-27T12:15:00Z",
"refresh_expires_at": "2026-11-03T12:00:00Z", // null without a refresh token
"session_expires_at": "2026-11-26T12:00:00Z"
},
"can_submit": false, // REQUIRED
"blocked_type": "https://sc.example.com/server-errors/terms-not-accepted",
// OPTIONAL. Only while can_submit is false
"terms": [ // REQUIRED. [] for none
{"id": "acme-nda", // opaque; never branched on
"title": "Acme PDK NDA", // display only
"scope": {"applies_to": "resource", "resources": {"pdks": ["acme"]}},
// "service", or "resource" with resources
"version": "2026-05-01",
"accepted_at": null, // nullable
"declined_at": null, // nullable
"can_decide": true, // a version is unaccepted and can be accepted now
"upcoming": null} // nullable: {"version", "effective_at", "accepted_at"}
]
}
authorized is an open map keyed by each resource kind’s plural; a client ignores a kind it does not know. Every entry’s
viais non-empty,selffirst, then eachproject:<slug>sorted by slug.expires_atis required, andnullmeans never. A client MUST NOT match these names against a job’s resources itself; create does. A capability’s name is the exception: the three,python-packages,python-wheelsandpython-sdist, are registered, so a client MAY check one before create.limits shares six keys with
GET /v1.concurrent_nodesanddevicesare per account only.devicesis enforced when a login is approved, andconcurrent_nodesis reported only.usage is reporting, except
concurrent_jobs, the live count an enforcedlimits.concurrent_jobsis measured against. A metered key carriesused(this window),total(all time, ornull),limit,windowandresets_at.license_secondsis a map of that shape per tool, and{}conforms: a server that meters no licences sends it.can_submit is
falsefor exactly two causes, named byblocked_type: an unacceptedservicedocument (terms-not-accepted), or an account not yet provisioned to run jobs here (account-not-provisioned). Where both apply it namesterms-not-accepted.terms lists the documents that apply to the caller: the service’s, and an agreement on each resource they hold. A client branches on
scope.applies_to, never onid, and opens a document’s page by askingPOST /v1/auth/browserwith itsid. A client never accepts a document on a person’s behalf. An upcoming version MAY be accepted before it takes effect.
4.5.4. Devices#
A device is a machine that can act as the caller: one key, enrolled by a login.
GET /v1/devices, {}, answers 200:
{"items": [
{"id": "01J9...", // REQUIRED
"name": "laptop", // REQUIRED. device_label, renamed in the portal
"current": true, // REQUIRED. Is this the calling device
"machine_id_source": "linux_machine_id", // REQUIRED
"enrolled_at": "2026-09-01T10:00:00Z", // REQUIRED
"last_seen_at": "2026-10-27T09:12:44Z"} // REQUIRED. The last login or refresh
]}
A login sets last_seen_at, so it is never null once a login has
finished. The list takes no ?limit= or ?cursor= and is ordered newest
enrolled_at first, with id as the tie-breaker.
GET /v1/devices/{id} answers the same object. DELETE /v1/devices/{id}
revokes every session of that device and answers 204; it is idempotent and
disturbs no other device. Either answers 404 for a device that is not the
caller’s, and the read answers 404 for one that is revoked, as it is absent
from the list; DELETE on it again stays 204. A revoked device can enrol again, with the same key, as a new device
with a new id; the revoked id never authenticates again and is no longer
listed.
4.6. Jobs#
4.6.1. The submit sequence#
POST /v1/jobs 201, created
POST /v1/jobs/{id}/upload-grant 200, a presigned PUT; awaiting_input
PUT <the presigned URL> the bytes, never through the API
POST /v1/jobs/{id}/submit 202, staging
A client SHOULD create the job before it packs the archive, so a refusal at create costs no packing, and packs and hashes the archive before it asks for the grant, which binds both. A client whose grant expired asks for another on the same job rather than creating a second one.
4.6.2. Job states#
created -> awaiting_input -> staging -> queued -> running -+-> completed
+-> failed
+-> cancelling -> cancelled
created, awaiting_input -> cancelled a cancel; nothing was running
created, awaiting_input -> abandoned not submitted in time
staging, queued, running -> cancelling a cancel
staging -> rejected refused on what the archive holds
staging -> failed staging-failed or staging-timed-out
queued -> failed run-interrupted: the scheduler lost it;
run-failed: a deployment limit ended it
staging -> awaiting_input the one edge back: sources asked for
completedis the only state that means success.A client reads
terminal, never the state’s name, to know whether a job is over, and polls while it isfalse.stagingis where the server reads the archive, checks it, fetches what it supplies, builds Python environments and dispatches.state_reasonMAY name the phase. A staging job counts againstconcurrent_jobs.rejectedmeans refused before it ran, for something the user can change.failedfromstagingis the server’s own failure (staging-failed) or the caller’smax_staging_seconds(staging-timed-out).cancellingis entered by cancelling astaging,queuedorrunningjob, and its one exit iscancelled.abandonedis a job left unsubmitted forabandon_after_secondsafter it enteredcreatedorawaiting_input; a job holding an unexpired upload grant is never abandoned. It stays distinct fromcancelled.Deletion is not a state:
deleted_atis set beside the state the job ended in.
Node states are a second closed set, each with its own terminal:
State |
Terminal |
Meaning |
|---|---|---|
|
no |
admitted, not dispatched |
|
no |
with the scheduler |
|
no |
dispatched, and fetching what it runs in, such as an image |
|
no |
|
|
yes |
finished |
|
yes |
|
|
yes |
by a condition, or a cache hit |
|
yes |
the job ended before the node finished |
A node turns terminal only once its artifacts are listed, never leaves a terminal state, and a terminal job has only terminal nodes. A server maps SiliconCompiler’s own node statuses onto this set and passes none through.
4.6.3. POST /v1/jobs#
Creates a job. Send a fresh Idempotency-Key. The top-level members are
authoritative; descriptor is the client’s advance notice, which create
decides on and staging checks against the manifest.
{
"design": "picorv32", // REQUIRED
"jobname": "run42", // REQUIRED
"project": "rocket-v2", // OPTIONAL. A project slug; absent for a personal job
"run_hash": "sha256:9f2c...", // OPTIONAL. For jobs.reuse; 1-128 printable ASCII
"continues_from": [ // OPTIONAL. Nodes whose results come from an earlier job
{"step": "place", "index": "0", "job_id": "01J8..."}],
"python_packages": { // OPTIONAL. What the run's Python imports
"requirements": ["numpy==1.26.4"],
"constraints": ["scapy==2.5.0"]},
"descriptor": { // OPTIONAL, and every member in it
"flow": "asicflow", // the flowgraph's name
"node_count": 42, // the nodes this job runs
"needs": ["python.env"], // feature strings the job relies on
"requested_versions": { // lists of PEP 440 specifier sets; any one satisfies
"python": {"siliconcompiler": ["==0.39.1"]}, // all by one image
"tools": {"openroad": [">=24.3.2011"], "yosys": []}, // per node; [] is any version
"interpreter": {"python": ["==3.12.*"]}}, // only where a node runs the user's Python
"sources": [ // what the client expects the server to supply
{"keypath": ["library", "acme_ip", "dataroot", "root"],
"source": "git+ssh://github.com/acme/ip.git", // userinfo removed
"ref": "v1.2"},
{"keypath": ["tool", "acme_sim", "task", "run", "dataroot", "scripts"],
"private": true}] // never uploaded, never asked for
}
}
Response 201, with Location: /v1/jobs/{id}: the job object in created, carrying upload_sources where the server
asks the client for sources it will not fetch. Where the deployment has
jobs.reuse and run_hash matches one of the caller’s own unarchived,
undeleted jobs that completed (or failed with run-failed) on the
server-supplied inputs a new job would get now, the answer is 200 with that
job, and nothing is created. A replayed create is 201.
project is a slug of 2 to 63 characters of
a-z,0-9and-, starting and ending with a letter or digit. A server withoutprojectsMUST refuse it,501 feature-unsupported, rather than ignore it.continues_from holds at most 1,000 entries.
requested_versions carries requirements, in the buckets of
GET /v1’ssoftware, normalised the same way.pythonnames exactly:siliconcompiler; the distribution providing each executed node’s task class; each framework a task declares, such as cocotb; and each distribution whose installed-package dataroot the server supplies. Each is pinned at the client’s version, except a framework, which carries the range SiliconCompiler declares for it. A development version is sent as a prefix,==0.38.10.*, which admits its pre-releases. A client normalises each tool’s specifier to PEP 440 and drops one it cannot. A server MUST NOT ignore a listed name, picks the job’s image frompythonalone, and among images that satisfy it, prefers the ordersoftwarepublishes. A server that runs every node in the job’s image picks it from all three buckets instead, and refusessoftware-unavailablewhere no one image meets them all. Across the buckets, at most 500 names and 1,000 specifier sets, each at most 200 characters.interpreter is sent only for a job with a node that runs the user’s own Python, such as a cocotb testbench: the major and minor version the client runs.
sources names each dataroot by its keypath, either
["library", <name>, "dataroot", <root>]or["tool", <tool>, "task", <task>, "dataroot", <root>]; any other shape is400. A source carrying userinfo is400, naming the keypath and never the value.privateistruefor a dataroot whose resolver scheme ends in+private. An alias, a dataroot registered asdataroot://<name>/<path>, is judged and named by the dataroot its chain lands on in the same section: asourcesentry names that dataroot’s keypath, source and ref, never the alias’s, and one entry covers every alias of it. At most 1,000 entries.needs names a feature the job relies on, a string of the feature grammar,
[a-z0-9][a-z0-9._-]{0,63}. A string outside it is400; one inside it that the server does not advertise, or does not know, is501at create. At most 100 strings.
Status |
|
When |
|---|---|---|
|
|
a missing |
|
|
an unaccepted service document, or agreement on a resource the job names |
|
|
no grant for a tool, resource or capability the job names |
|
|
the account cannot run jobs here yet |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
no image satisfies |
|
|
a private dataroot nothing can supply |
|
|
a |
|
|
|
|
|
|
A create never fetches anything. It looks up what the server already holds.
4.6.4. POST /v1/jobs/{id}/upload-grant#
Issues, or re-issues, the grant to upload one archive.
{"size_bytes": 270532608, // REQUIRED. Bound into the signature
"digest": "sha256:<hex>"} // REQUIRED. The archive's SHA-256
Response 200:
{"method": "PUT",
"url": "https://storage.example.com/...?X-Amz-Signature=...",
"headers": {"content-length": "270532608"}, // send exactly these
"expires_at": "2026-09-14T16:19:05Z"}
The first grant for an archive fixes its size and digest, and a re-issue MUST repeat both. A job has one archive, and one more each time it is sent back for sources.
sha256is the only algorithm, always written with its prefix.max_upload_bytesbounds a job’s archives together, and MUST NOT exceed what onePUTcan carry: there is no multipart upload and no resume. A failed upload starts over.The grant bounds when the
PUTmay start, not how long its bytes are kept, and lives long enough to movemax_upload_bytes.
Refusals: 403 not-permitted for a job the caller can read and does not own;
409 job-state-conflict for a job not in created or awaiting_input, or
a re-issue with a different size or digest; 413 upload-too-large, limit:
"max_upload_bytes".
4.6.5. POST /v1/jobs/{id}/submit#
The job is ready to run. {}, with a fresh Idempotency-Key.
Response 202: the job object, in staging. Submit checks the upload
against the grant’s digest and nothing else of the archive; everything else is
checked while the job stages. A refusal of the request itself leaves the job in
awaiting_input, its upload kept, so the client can submit again:
Status |
|
When |
|---|---|---|
|
|
the caller does not own the job |
|
|
as at create |
|
|
no upload, or past |
|
|
the upload does not match the grant’s digest |
|
|
|
The run executes under the job’s design and jobname, and where and how
its nodes run is the deployment’s choice. A manifest setting that would change
either, such as an incrementing job name or a scheduler queue, is overridden
rather than refused.
4.6.6. The archive#
The upload is a gzip-compressed tar, application/gzip. The first archive
holds only:
the manifest, at the root;
sc_collected_files/, the files the client collected;sc_collected_files/python/, one wheel per Python distribution no index can supply (Python packages);<step>/<index>/outputs/for each node the run reads and does not run.
Anything else is unrequested_member. A directory entry is a member like any
other, so an ancestor entry such as syn/ or syn/0/ is too. A follow-up archive holds only what the
server asked for.
A file is uploaded or supplied by name, never found by path. The server MUST NOT resolve a file the client left out by looking at the same path on its own disk, and never expands an environment variable. Each file is judged by its own dataroot:
The file’s dataroot |
The file is |
|---|---|
a local path, a path rooted in an environment variable the client expands, or no dataroot |
uploaded |
a Python package installed editable |
uploaded |
a Python package installed normally, named in |
supplied by the server, at that version |
a Python package installed normally, not named there |
uploaded |
a remote source – |
supplied by source and ref, from the server’s allowlist, or asked for |
any owner’s |
sent as |
a dataroot whose scheme ends in |
supplied by the server from its own copy or its source, and never uploaded |
an alias, |
as the dataroot its chain lands on, which names it; uploaded where the chain loops or names no dataroot of its section |
An alias, a dataroot registered as dataroot://<name>/<path>, is judged and
named by the dataroot its chain lands on in the same section: a sources
entry names that dataroot’s keypath, source and ref, never the alias’s, and one
entry covers every alias of it.
Of those, a client uploads only values under keys some task in the flow
requires. Each node in the manifest carries the require set the client
computed for it by setting the task up, and a node the client could not set up
carries none; while any node’s set is unknown, nothing is filtered. The server
reads the set from the manifest and MUST NOT run a task’s setup itself.
Links. A link MUST resolve inside the archive. A client stores a file once and points every other link at that copy.
No credential in a URL. Every URL, in
sourcesand in each dataroot’s path in every manifest uploaded, goes with its userinfo removed and its query values masked. An archive carrying userinfo iscredential, and is not kept.The archive’s limits are enforced on the bytes actually extracted:
max_archive_membersandmax_archive_expanded_bytes; only regular files, directories and links; no absolute path and no..; and nothing extracted with the archive’s ownership, setuid, setgid or device bits.A job needs nobody at it. A node with
[option,breakpoint]set isbreakpoint, and a node whose task opens a viewer – anOpenTask, which includes everyShowTask– isinteractive_task. AScreenshotTaskis allowed.A node’s task class MUST be one the job’s SiliconCompiler installation provides; one that is not is
software-unavailable,reason: "unknown_class". A runner never replaces a task class with its base class.
4.6.7. Staging#
While a job stages, the server, in order: extracts the archive whose SHA-256 is the grant’s digest and nothing else; reads the manifest, with the SiliconCompiler the job resolved to, in a sandbox holding no credential, no network and no PDK data; and runs every check against what that read reports and against the archive’s bytes, never against the descriptor. What the manifest says never widens what a job may reach or who may fetch its results.
A refusal found while staging ends the job rejected, with the refusal as its
error:
Found |
Refusal |
|---|---|
extracting |
|
before fetching an earlier job’s results |
|
reading the manifest |
|
checking what it read |
|
installing Python packages |
|
The server’s own failures end the job failed instead, with
staging-failed: an index or registry that does not answer, an image the
manifest is read in that cannot be pulled, a dispatch the scheduler refuses. So
does running past the caller’s max_staging_seconds, with
staging-timed-out.
upload-forbidden is policy: the archive carries something controlled that
the caller may not upload, found by what the manifest calls it or by its bytes.
It names a member only after the archive passed the extraction checks:
member count, expanded bytes, ratio, traversal, and an archive read to its end.
The link, device and unrequested-member checks come later, while staging. A
controlled resource is recognised by being marked private, by a missing grant
(entitlement-denied at create) or, where neither says so, by its contents at
upload. A rejected upload is otherwise kept as an input artifact, except
one refused upload-forbidden, credential, or for carrying a private
dataroot’s values. An upload the extraction checks refuse is deleted and not
listed either, since nothing has checked it for credentials.
4.6.8. Sources the server asks for#
A server fetches only from its own allowlist, with no credential, never from a
link-local or private address, and checks every URL it contacts, each redirect,
submodule and LFS endpoint included. What it will not fetch, it asks the client
for, in upload_sources on the job object:
"upload_sources": [
{"kind": "dataroot", "keypath": ["library", "lambda_io", "dataroot", "lambdapdk"]},
{"kind": "python", "name": "cocotbext-wishbone"}]
At create, a lookup answers with what the server already knows it will not supply, and the client puts those in the first archive.
While staging, a fetch that fails for good – refused, not found – sends the job back to
awaiting_inputnaming only what failed. A transient failure is retried by the server, not asked for. The client asks for a grant for an archive of those alone, uploads it and submits again with a freshIdempotency-Key. The send-back is never refused forpending_uploads, andabandon_after_secondsruns again from it.A private dataroot is never asked for. A server that cannot supply one refuses it at create, or rejects the job
resource-unavailablewhile staging.A client that cannot supply what it is asked for cancels the job, with a
reasonnaming each item and why, rather than upload part of it.
4.6.9. Continuing from an earlier job#
A run that starts part-way through its flow ([option,from]) reads the
results of nodes it does not run. Each such node’s results come from the upload,
as <step>/<index>/outputs/, or from an earlier job named in
continues_from; one in neither is missing_member, and one in both is
taken from the upload.
The named job MUST be the caller’s own, the one that ran the node, not deleted,
with the node completed and its outputs and manifest neither deleted nor
withheld. The client takes the id from where it fetched the manifest, never
from the manifest. Create checks each entry and staging checks again; a failure
is prior-results-unavailable with step, index and a reason:
not_found, not_owner, deleted, not_completed, expired,
withheld or unsupported. A deployment that continues no earlier job
answers unsupported at create, whatever the entry names; the node’s outputs
can still come in the upload. At create it also carries job_id, the id the
request sent.
While the job stages it is the job’s error, which every reader of the job
reads, so it names no job: step and index name the node whose results
were found unusable, the entry’s own or one upstream of it in the same earlier
job. Before staging fetches anything of an earlier job, it holds the owner to
the grants and agreements that job’s results derive from, as a download of them
would, but asks no approval; and where that job holds content supplied from a
copy tied to no resource, whose results nobody may have, it rejects the job
artifact-not-approved, with nothing to ask for. The job’s nodes and
artifacts cover only what it runs.
4.6.10. Python packages#
A node that runs the user’s own Python – a cocotb testbench – may need
packages. A deployment that installs them while a job stages advertises
python.env; a job that lists packages or uploads a wheel names it in
descriptor.needs. A job whose only Python is the user’s own modules needs
neither: those travel as ordinary collected files.
python_packages has
requirements, the distributions the run’s Python imports, andconstraints, the installed versions of what they and the wheels depend on. Every entry is exactlyname==version, the name PEP 503-normalised and the version a full PEP 440 one; each name appears once across both, and together they hold at most 1,000 entries and 64 KiB. They leave out everyrequested_versions.pythonname, the standard library, and every distribution sent as a wheel.A wheel goes in
sc_collected_files/python/, named as a wheel is, for a distribution installed editable, from a local path or file, or from version control. It is pure (none-any, no.so,.pydor.dylib), holds no.pth,sitecustomize.py,usercustomize.pyor<name>.data/, and no top-level module named as one of the standard library’s (sys.stdlib_module_names:encodings/,os.py,json/__init__.py, a.pycor an extension module of that name; matched at the wheel’s root, case-sensitively, sojsonschema/andmypkg/json.pypass), since the environment is on the tool’sPYTHONPATHahead of the standard library and such a module would run in its place. No line of itsentry_points.txt, but a group’s[header]and a#comment, holds/,\or..: pip writes each script by joining its name to the scripts directory, and every pip before 26.1.2 joins it unchecked, so a script named../lib/python/sitecustomize.pywould run at every start of Python. It depends on no URL, and overlaps nothing listed or in the image. Otherwise it isarchive-rejected,reason: "python_package".A version no index has sends the job back with
{"kind": "python", "name": ...}, and the client answers with a wheel at the listed version.What a caller may do is a capability, where the deployment grants them:
python-packagesto list packages,python-wheelsto upload wheels, andpython-sdistto have one built from source on the server. Missing, each isentitlement-deniedwithresource_kind: "capability".A package is installed at the version listed, or where that version does not install for the node’s platform, the newest of its release line, recorded in
resolved_versions. The environment is on the tool’sPYTHONPATHonly, never SiliconCompiler’s own.
4.6.11. GET /v1/jobs#
The caller’s jobs and their projects’ jobs, newest first:
{"items": [<job objects, without nodes>]}, paginated. Every query parameter
is optional:
Parameter |
Returns |
|---|---|
|
jobs in that state |
|
|
|
jobs with exactly that value; |
|
jobs in that project. On a server without projects, |
|
|
|
|
|
pagination, each at most once |
A deleted job is in neither view.
4.6.12. GET /v1/jobs/{id}#
Response 200, and while the job is not terminal, Retry-After:
{
"id": "01J9...", // REQUIRED
"state": "running", // REQUIRED
"terminal": false, // REQUIRED. What a client polls on
"transitions": [ // REQUIRED. Every state entered, oldest first
{"state": "created", "at": "2026-10-27T09:00:00Z"},
{"state": "staging", "at": "2026-10-27T09:00:20Z"},
{"state": "queued", "at": "2026-10-27T09:01:02Z"},
{"state": "running", "at": "2026-10-27T09:01:05Z"}], // an entry MAY carry reason
// "state_reason": "...", // OPTIONAL. Display only; the phase while staging
"design": "picorv32", // REQUIRED
"jobname": "run42", // REQUIRED
"flow": "asicflow", // REQUIRED, nullable. null until the manifest is read
"owner": {"id": "01J9...", "name": "Alice"}, // REQUIRED. Compare id, never name; name is
// display only, bounded and scrubbed like detail
"project": null, // REQUIRED, nullable. null on a personal job
"created_at": "2026-10-27T09:00:00Z", // REQUIRED
"submitted_at": "2026-10-27T09:00:20Z", // REQUIRED, nullable
"started_at": "2026-10-27T09:01:05Z", // REQUIRED, nullable
"finished_at": null, // REQUIRED, nullable. May stay null once terminal
"archived_at": null, // REQUIRED, nullable. Set in the portal
"deleted_at": null, // REQUIRED, nullable
"deleted_reason": null, // REQUIRED, nullable. Who deleted it, as prose
"error": null, // REQUIRED. A problem object when failed or rejected
"nodes": [ // REQUIRED. Omitted from GET /v1/jobs
{"step": "place", "index": "0",
"state": "completed", "terminal": true,
"started_at": "2026-10-27T09:03:00Z", "finished_at": "2026-10-27T09:07:12Z",
"exit_code": 0, // nullable; display only
"error": null}], // a problem object when the node failed
"resolved_versions": { // OPTIONAL. What the server picked, by bucket
"python": {"siliconcompiler": ["0.39.1"]},
"tools": {"openroad": ["2.0.1"]}},
// "upload_sources": [...], // OPTIONAL. Only while the server is asking
// "continues_from": [...], // OPTIONAL. As sent at create, but "job_id" is
// null where the reader cannot read that job
"progress": {"total_count": 42, "completed_count": 17, "failed_count": 0,
"skipped_count": 0, "cancelled_count": 0} // REQUIRED
}
error on a job, and on a node, is a problem object with its type’s members, and SHOULD carry
detail.detailnever shows a reader tool output the log would withhold from them, a server path outside the job’s build directory, or anything shaped like a credential. A failed node carriesrun-interruptedwhere the environment ended it (preemption, a lost compute node, an image that would not pull) and resubmitting unchanged may work, orrun-failedwhere it would fail the same way, a time or memory limit included.A job turns terminal only once every artifact it will list is listed.
exit_code is 0 to 255, a signal N reported as 128+N, and
nullwhere the tool never exited.resolved_versions holds exact versions, absent where nothing was resolved, such as a deployment running jobs on the host rather than in images.
upload_sources is absent, never
[], unless the server is asking.nodes and progress count only the nodes this job runs, and
nodesis never emptied as artifacts expire.Who may act. Any member of the job’s project reads it; only its owner, or an
ownerof its project for cancel and delete, may write to it. A job the caller cannot read is404, never403.
4.6.13. POST /v1/jobs/{id}/cancel#
Stops a job. The body is optional:
{"reason": "superseded by run43"} // OPTIONAL. At most 300 characters, no control characters
Response 202: the job, now cancelling from staging, queued
or running, or cancelled from created or awaiting_input.
Idempotent: cancelling a cancelling job, or a terminal one that is not
deleted, is 202 with the job as it is. A deleted job answers only a read of
itself and DELETE again, so cancelling one is 404 not-found. The reason is recorded on the transition and on each node it stopped,
whole. A reason too long is 400, never cut short. A caller that can read the
job and may not cancel it is 403 not-permitted.
4.6.14. DELETE /v1/jobs/{id}#
Deletes a job’s data. {}.
Response 204. Idempotent. The job MUST be terminal, or it is
409 job-state-conflict: the caller cancels a job and deletes it once it has
ended, and DELETE never cancels it. Afterwards the job object stays
readable, with its transitions, deleted_at and a deleted_reason the
server writes naming who acted, and everything under it is 404. No API call
erases the server’s own records of who did what and of every disclosure. A replayed create or submit still answers as it
first did. A caller that can read the job and may not delete it is
403 not-permitted.
4.7. Live logs#
4.7.1. GET /v1/jobs/{id}/logs#
Redirects to a live log stream, and never carries log bytes itself: a finished
node’s log is its logs artifact. With ?step= and ?index= it is one
node’s stream; with neither, the whole job’s; one without the other is 400.
Response 303 to the stream host, or a refusal. For one node, the first
row that matches:
Case |
Answer |
|---|---|
the deployment does not have |
|
the caller lacks a grant on a resource in the job’s set |
|
the caller has accepted no version of an agreement on one |
|
the job has no node with that |
|
terminal, with a |
|
terminal, with a |
|
terminal, with no log |
|
running, on a deployment that approves |
|
running |
|
not started |
|
For the whole job: the same first three rows, then 303 to a stream that
ends at once where the job is terminal; 409 not-ready where no node has
started; 403 artifact-not-approved where the deployment has
logs.stream.job and the row above for a running node applies to the job;
303 where the deployment has logs.stream.job; otherwise
501 feature-unsupported, feature: "logs.stream.job", on which a client
opens one stream per running node. A refusal names the broadest capability
missing.
4.7.2. The stream#
Following the 303 is a new request with no credential. What answers is
text/event-stream, or a refusal, such as 429 limit-exceeded with
limit: "concurrent_log_streams", since a slot is held only while a stream is
open.
event: log
id: 8f3a1c04
data: {"step":"place","index":"0","stream":"stdout","logged_at":"2026-10-27T09:04:01Z","text":"..."}
event: node_state
data: {"step":"place","index":"0","state":"completed","terminal":true,"artifact_id":"01J9..."}
event: end
data: {"reason":"terminal","artifact_id":"01J9..."}
id is on
logevents only, opaque, and whatLast-Event-IDresumes from. On a job stream it is job-wide, does not grow with the node count, and a resume never skips alogevent on any node; an id the host cannot place restarts the stream from the beginning.node_state carries
terminaland, once terminal, the node’slogsartifact_id. It has noid, so a resumed stream repeats it, and a client treats it as idempotent.end.reason is
terminal, the node or job is over, orexpired. A stream ends no later than the access token that obtained it; the client then asks.../logsagain with a fresh token and sendsLast-Event-IDto the new target. On a node’s stream,endcarries thelogsartifact_id.Order is kept within a node; across nodes it is arrival order. A stream sends a keep-alive more often than any proxy in front of it times out.
Log text is the job’s own output. A client strips control characters from it, and from every other string the server sends, before writing it to a terminal, keeping newline, tab and colour sequences.
A live stream is gated like the archive: the caller holds every resource in the
job’s set and has accepted an agreement on each. Which artifact kinds need an
approval is each deployment’s policy, and on one that approves logs a live
stream is refused as the table above says.
4.8. Artifacts#
4.8.1. GET /v1/jobs/{id}/artifacts#
A job’s results, filterable by kind, step and index, and paginated.
{"items": [
{"id": "01J9...", // REQUIRED
"step": "place", // REQUIRED. null for a job-level artifact
"index": "0", // REQUIRED. null for a job-level artifact
"kind": "node", // REQUIRED
"media_type": "application/gzip", // REQUIRED
"size_bytes": 184320, // REQUIRED
"digest": "sha256:...", // REQUIRED
"created_at": "2026-10-27T09:07:12Z", // REQUIRED
"retained_until": "2026-11-26T09:07:12Z", // REQUIRED, nullable. Kept at least until then
"deleted_at": null, // REQUIRED, nullable. The bytes are gone
"deleted_cause": null, // REQUIRED, nullable. "expired" | "removed"
"deleted_reason": null, // REQUIRED, nullable. Prose, where a person removed it
"fetchable": true, // REQUIRED. For this caller; never cached across callers
"access_requested_at": null, // REQUIRED, nullable. The caller's pending request
"blocked_by": ["acme-nda"], // OPTIONAL. Unaccepted agreements, by terms id
"can_request_access": false} // REQUIRED. Only an approval is missing, and the caller's
// person can ask for it: true for a CI session too
]}
Every artifact is stored and served gzip-compressed. The listing carries at most
one artifact of each kind per node, and one job-level artifact of each kind,
except input, one per upload. No kind is guaranteed, and a listing with only
a manifest, or none, is conforming.
diagnostics is never listed, and ?kind=diagnostics is accepted and
answers an empty list.
|
What it is |
|---|---|
|
an archive the client uploaded, job-level, one per upload with the digest
its grant bound; or, bound to a node, that node’s |
|
the run’s record: a node’s, or the job’s final one, job-level |
|
a node’s log files, as a tar; or, job-level, SiliconCompiler’s |
|
the server’s record of staging the job, for its submitter |
|
the deployment’s own record, for its operators; never listed and never fetchable |
|
a node’s metrics and reports, as a tar |
|
a node’s deliverables, as a tar |
|
everything a node produced, as a tar |
|
the whole node directory, as a tar; fetchable exactly when every artifact of the node it holds is |
|
an |
A tar bound to a node holds paths relative to the node’s directory. It keeps a
link inside the job as a link to the file’s real home, usually an upstream
node’s outputs/, and drops one that leaves the job, so a node’s archive
resolves fully only beside the nodes it links to. A client SHOULD fetch node
where it is fetchable, and the other kinds otherwise.
fetchable: false says whether there is a way to yes: blocked_by means
accept those documents, can_request_access: true means ask, at the page
POST /v1/auth/browser answers for the artifact, and neither means there is
none. A CI session cannot ask itself, since POST /v1/auth/browser refuses
it, but its person asks from an interactive session or the portal, and the
approval covers the CI session. Until the server records what each artifact
derives from, an artifact is gated on the job’s whole set of resources, so a log
is gated as the GDS is. deleted_cause says whether retention reclaimed the bytes or a person
removed them, and a client reports the two differently.
4.8.2. GET /v1/jobs/{id}/artifacts/{artifact_id}#
Response 303 to a URL for the bytes, for one object and short-lived.
A client compares what arrives with the listing’s
size_bytesanddigestbefore it uses it, and discards it on a mismatch.A client extracts only inside the job’s local directory: no path outside it, no link resolving outside it, no device or FIFO, and none of the archive’s ownership, setuid or setgid bits. It writes nothing outside the job’s directory whatever a listing says, and imports and runs nothing the results contain.
Bytes served on the deployment’s own origin never render as active content.
Where the artifact is not fetchable, the refusal follows the first condition that holds:
Condition |
Answer |
|---|---|
deleted |
|
withheld; an |
|
a |
its worst member’s: withheld or deleted, then a missing grant, then an
agreement, then an approval, then |
only an approval is missing |
|
a resource it derives from is not granted to the caller |
|
an agreement on one is unaccepted |
|
still being described, and none of the refusals above applies |
|
fetchable, and over the caller’s |
|
4.9. Errors#
4.9.1. Problem details#
A refusal is an RFC 9457 body, application/problem+json:
{
"type": "https://sc.example.com/server-errors/entitlement-denied",
// REQUIRED. What a client branches on
"title": "Not entitled to this resource", // REQUIRED. Fixed per type
"status": 403, // REQUIRED. Absent on a type that is never a response
"detail": "The descriptor names a PDK this account holds no grant for.",
// OPTIONAL. Names fields, never echoes values
"instance": "/v1/jobs", // OPTIONAL; a server SHOULD send it
"resource_kind": "pdk", // the type's own members
"resource": "acme",
"trace_id": "4bf92f3577b34da6a3ce929d0e0e4736" // OPTIONAL; a server SHOULD send it
}
type is the contract.
titleanddetailare prose and may change. Aftertype, a client MAY branch onreasonwhere the type defines one, and ignores a member it does not know.A refusal is retried by waiting only where it carries
Retry-After.Not every failure is typed. A proxy or the framework can answer first, and
400,405,415and406MAY arrive without a problem body. A client readsContent-Type, treats any other non-2xx as an untyped failure of its status class, and never assumestypeexists. A5xxneed not be typed; a client honours itsRetry-After.An unrouted path is typed. A path under
/v1that no route serves is404 not-foundinproblem+json, like any other404, and is not one of the untyped four.A resource the caller cannot read is
404, never403, so a refusal confirms nothing. A write on a job the caller can read and may not act on is403 not-permitted.
POST /v1/auth/device and POST /v1/auth/token answer what their OAuth
processing refuses in the OAuth shape, RFC 6749 Section 5.2:
{"error", "error_description"}, with reason where one applies. Their
transport refusals – 426 insecure-transport, 429 rate-limited, 415
and 405 – are problem bodies, as everywhere. A client at those two reads
Content-Type first.
4.9.2. The registry#
Every type is <origin>/server-errors/<slug>, an absolute URI on the
origin of the deployment that answers. A client recognises a type by its slug
alone: a type whose scheme is http or https and whose path is exactly
/server-errors/<slug>, with a registered slug, on any host and port. Any other
type is an untyped failure, acted on by its status. The registry is
closed: a server returns no other. A type with no status is never an HTTP
response, only the type of a job’s or node’s error. The members listed
are required on that type.
The type is also the deployment’s own page documenting the failure, so a
client MAY show it to a person as the place to read about it, and still branches
on its slug. No Link: rel="help" is sent for it. sc-server serves its
pages at /server-errors/. Another server can render the same set with
python -m siliconcompiler.remote.server.routes.errorpages <outdir>, with the
server extra installed.
type |
Status |
Members |
Title |
|
403 |
Your account is not set up on this deployment |
|
|
422 |
|
Archive rejected |
|
403 |
Artifact not approved |
|
|
422 |
The manifest contradicts the descriptor |
|
|
403 |
|
Download too large |
|
401 |
DPoP nonce required |
|
|
403 |
|
Not entitled to this resource |
|
501 |
|
This deployment does not support that |
|
422 |
Idempotency key reused with a different request |
|
|
426 |
Upgrade required |
|
|
403 |
Insufficient scope |
|
|
400 |
Invalid cursor |
|
|
401 |
Invalid DPoP proof |
|
|
400 |
Invalid request |
|
|
401 |
Invalid access token |
|
|
409 |
The job is not in a state that allows this |
|
|
429 |
|
Limit exceeded |
|
405 |
Method not allowed |
|
|
403 |
|
Too many nodes in this flow |
|
406 |
Not acceptable |
|
|
404 |
Not found |
|
|
403 |
Not permitted on this job |
|
|
409 |
|
Not ready yet |
|
422 |
|
Those earlier results cannot be used |
|
429 |
Too many requests |
|
|
422 |
|
This server does not hold that resource |
|
422 |
|
Could not resolve what this flow needs |
|
none |
The run failed |
|
|
none |
The run was interrupted |
|
|
401 |
|
Session ended |
|
422 |
|
No image provides that software |
|
none |
The server could not get this job ready |
|
|
none |
|
The job took too long to get ready |
|
403 |
|
Terms not accepted |
|
415 |
Unsupported media type |
|
|
422 |
Upload digest does not match |
|
|
422 |
|
Upload of that resource is not allowed |
|
413 |
Upload too large |
Four slugs are retired and never reused: unsatisfiable-request,
version-skew, too-many-attempts and scheduler-lost.
Some types carry a reason:
archive-rejected:member_count,expanded_bytes,ratio,link_member,device_member,traversal,missing_manifest,invalid_manifest,credential,unrequested_member,missing_member,python_package,breakpoint,interactive_taskandextension, for a member extension the deployment does not admit.session-ended:revoked,reused,deactivatedorexpired.software-unavailable:unavailable;combination, where each python requirement resolves alone and no image holds them together;uninstallable;unknown_class. Itsunresolvedlists{"kind", "name", "requirement", "available"},kindbeingpython,tools,interpreter,classorpackage, andavailablethe versions a live image holds.prior-results-unavailable: as in Continuing from an earlier job.job-state-conflict:in_progress.
limit on limit-exceeded names a published key: pending_uploads,
concurrent_jobs and concurrent_log_streams today, and usage’s
compute_seconds, storage_bytes and license_seconds, registered and
not yet raised. rate-limited is a deployment’s own request rate, not a
published limit. resource_kind is pdk, tool, library, fpga
or capability.
4.10. The bundled server#
python3 -m siliconcompiler.remote.server (For Developers: Custom Servers) implements
enough of this API to test the client against and to run jobs on one machine or
a small Slurm cluster. It authenticates nobody: it offers client_credentials
and refresh_token, publishes identity_assurance: "self_asserted", and
binds each local subject to its first key. Of the features it serves
logs.stream. It does not offer the device grant, projects, terms,
entitlements or approvals, python.env, job reuse or continues_from: a
create naming an earlier job is prior-results-unavailable with
reason: "unsupported". It serves the error type pages at /server-errors/.