200 with individual task failures, and a specification status request can return HTTP 200 with status: "failed".
HTTP errors
General API errors usually include
error and may include message. Browser submission gates use a machine-readable code:
Input validation errors may include a zero-based
taskIndex and a field. Validation rejects the whole batch before charging or starting work. Invalid tasks and explicit permanent URL/DNS failures are not retried in another sandbox; transient execution failures can still be retried.
These codes belong to Browser Agents. Do not assume an Architect 402 has a browser gate code.
Streaming failures
Once SSE response headers have been sent, a failure arrives as anevent: error frame, even though the HTTP status is 200. The browser SDKs raise an exception for these frames. A disconnected stream or EOF without done does not establish success; fetch the run by its saved ID.
The existing-run stream’s done payload contains only the batch status. Fetch the final result after it. The submission stream’s done payload contains the full batch. See streaming.
Retry submissions
For REST browser requests, send a stableIdempotency-Key header. If a run with the same caller/key already exists from the last 24 hours, the API returns that run as JSON instead of creating a new one—even if the retry requested streaming. Keep the payload the same and use a new key for intentional new work. The API does not compare payloads for you.
Do not rely on this lookup as a lock for simultaneous duplicate requests. Serialize retries of the same logical submission.
Specification generation has no documented idempotency key. If a request times out, check history before generating again. A retry can create another specification and consume more credits.
SDK exceptions
Both SDKs provideAuthenticationError, RateLimitError, and PredevAPIError. Browser gate codes also map to SubscriptionRequiredError, InsufficientCreditsError, QueueFullError, and BatchTooLargeError. Billing exceptions may include actionUrl in Node or action_url in Python.
The Node base exception exposes message; Python exceptions can be read with str(error). Neither SDK exposes a statusCode / status_code property on its base exception. Use direct HTTP when your application needs the original status, headers, and full response body.
