Prepare a site before sign-in
For an agent working for someone who has no account yet. Creates a site from the starter and returns a write token (2 hours: import files and build, 3 builds) and a private claim URL (7 days) the person opens to make the site theirs. The demo it produces is served sandboxed, never indexed, and cannot be published or put on a domain before the claim. No credits, no AI.
POST/v1/guest/sites
No bearer credential. The caller is anonymous and rate limited by address.
The reply holds write_token (2 hours), claim_url (7 days) and next_action. Pass device_code and client_id from an OAuth device request if you want the person to be able to connect the agent when they claim the site. Read the agent instructions for the complete flow.
Nothing can be published, no domain connected and no credit spent, and no model is called. Keep the write token and the claim link private: see Guest sites. On refusal, offer the ordinary sign-up. Do not retry with new identities.
Body
application/jsonrequirednamestringrequiredlength: 1–80 charsslugstringlength: 3–40 charsdevice_codestringlength: 8–200 charsFrom POST /oauth/device_authorization, to let the person connect this agent when they claim the site.
client_idstringlength: 1–512 charsResponse
Prepare a site before sign-in
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_credits
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required
errorobjectrequiredrequest_idstringrequiredPossible codes: resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, result_not_ready, idempotency_key_reused
errorobjectrequiredrequest_idstringrequiredPossible codes: result_expired
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large_for_plan
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequiredPossible codes: service_unavailable
errorobjectrequiredrequest_idstringrequired