No built-in auth
API routes currently do not require API keys, JWTs, or wallet signatures.
Stable error envelope
Errors return a consistent JSON body with
code and message.Gateway required
Put auth and throttling in front of this API for production workloads.
Error payload shape
HTTP status mapping
| Condition | HTTP | Example codes |
|---|---|---|
| Bad input or invalid hex | 400 | BAD_REQUEST |
| Validation failure | 422 | VALIDATION_ERROR |
| ENS/SuiNS record not found | 404 | ENS_NAME_NOT_FOUND, SUINS_NAME_NOT_FOUND |
| IPFS gateway/download failure | 502 | IPFS_ERROR |
| Unhandled internal failure | 500 | INTERNAL_ERROR |
Real response examples
- 400 bad request
- 404 name not found
- 502 IPFS error
Production hardening path
Where error codes come from
Where error codes come from
ApiError maps from SpecterError in specter-api/src/error.rs and produces the final JSON envelope.Why 422 and 400 both exist
Why 422 and 400 both exist
Validation errors from typed domain checks use
422, while malformed request values and parse failures use 400.