- REST API base URL:
https://api.judt.ai(OpenAPI description athttps://api.judt.ai/api/openapi.json) - MCP server URL:
https://api.judt.ai/mcp - Authorization server and dashboard:
https://judt.ai(agent instructions athttps://judt.ai/auth.md)
Authentication details
Send an API key or an OAuth access token in theAuthorization header of each request:
API keys
- Format:
judt_followed by 43 characters. - Organization-wide keys: The keys that you create on the API keys page. They can access all Apps in the organization, create new Apps (
POST /api/apps), and create App tokens (POST /api/tokens). - App tokens: Bound to one App. You create an App token with
POST /api/tokens(valid for60to86400seconds).GET /api/appsreturns only that App.POST /api/appsandPOST /api/tokensreturn403 app_scoped_token.- Requests to
/api/apps/{id}for a different App return404 not_found. GET /api/templatesandGET /api/modelsremain available.
OAuth scopes, endpoints, and lifetimes
An agent gets an OAuth 2.0 token through MCP OAuth (authorization code grant), self-registration (service_auth), or the device authorization grant (RFC 8628). For the full procedure, see https://judt.ai/auth.md.
- Metadata endpoints:
- Protected resource metadata (RFC 9728):
https://api.judt.ai/.well-known/oauth-protected-resource(API) andhttps://api.judt.ai/.well-known/oauth-protected-resource/mcp(MCP server). - Authorization server metadata (RFC 8414):
https://judt.ai/.well-known/oauth-authorization-server. - Personal Agent Protocol (Poppy 0.1) metadata:
https://judt.ai/.well-known/poppy.json.
- Protected resource metadata (RFC 9728):
- OAuth endpoints:
- Agent self-registration:
POST https://judt.ai/api/auth/agent/identity - Client registration (RFC 7591):
POST https://judt.ai/api/auth/oauth2/register - Device code (RFC 8628):
POST https://judt.ai/api/auth/device/code - Token and refresh:
POST https://judt.ai/api/auth/oauth2/token - Revocation:
POST https://judt.ai/api/auth/oauth2/revoke
- Agent self-registration:
- Resource parameters (RFC 8707): Send one
resourceparameter for each server that you use (resource=https://api.judt.aifor the REST API,resource=https://api.judt.ai/mcpfor the MCP server). If you do not sendresource, the token works only onhttps://api.judt.ai. - Token lifetimes:
- Access token: 1 hour (
3600seconds). - Refresh token: 30 days (
2592000seconds). Each refresh response returns a newrefresh_token. Keep the new token and discard the old token.
- Access token: 1 hour (
- DPoP key binding (RFC 9449): If you send a
DPoPproof header when you request or refresh a token, the token is bound to your key. Send each API or MCP request withAuthorization: DPoP ACCESS_TOKENand a newDPoPproof header.
Organization roles
Each API key and OAuth token acts as you in one organization and has your role in that organization:Sandboxes, retries, and time limits
- Sandboxes:
POST /api/appsreserves the App’s address, but it does not start a sandbox. A request that uses files, Git, commands, commits, restores, previews, or deployments starts the sandbox first. The sandbox stops automatically when it is idle. - Idempotency and retries: Each write request runs under an
Idempotency-Key, and each response returns the key in a header. You can send your own key (up to 200 printable characters), or the API creates one. For 30 days, a retry with the same key and input returns the first request’s result instead of repeating the work.PUTandDELETEon a Secret do not use a key.503or504: The API recorded the action, but the action is not finished. Retry with the sameIdempotency-Keyto get the result. A new key runs the action again.4xxor502: The result is final. Correct the cause before you send a new request.
- Time limits:
- File writes, commits, restores, and
POST /api/apps/{id}/stop:120seconds (plus up to120seconds if the request starts a stopped sandbox). - Commands (
POST /api/apps/{id}/commands):timeout_seconds(up to120seconds), plus60seconds to stop the command and save its output. - Publishing, unpublishing, deleting an App, and changing production settings:
540seconds.
- File writes, commits, restores, and
Pagination
A list returns one page, in the form{"results": [], "has_more": false, "next_cursor": null}. To get the next page, send next_cursor as the cursor query parameter while has_more is true. Use limit to set the page size. The default is 50, and the maximum is 100.
Errors
When a request fails, the API returns a JSON body in this format:code value does not change. Check code, not message. The detail field is optional.
Authentication and authorization errors
When the server rejects a credential, it returns a JSON error body and sets theWWW-Authenticate header. A 401 response includes the resource_metadata URL in WWW-Authenticate (RFC 9728).