API & SDKs
SDK examples
Typed clients for TypeScript, Python, and PHP.
Official SDKs wrap the HTTP API with typed clients, automatic retries, and region-aware defaults.
Invoke a function
tsExample
import { Relay } from '@relay-edge/sdk';
const relay = new Relay();
const result = await relay.functions.invoke('hello-edge', {
body: { name: 'Ada' },
});
console.log(result.json());Error handling
tsinvoke.ts
try {
await relay.functions.invoke('hello-edge', { body });
} catch (RelayApiError error) {
console.error(error.code, error.requestId);
}Info
SDKs retry 429 and 503 responses with exponential backoff. Disable retries for non-idempotent side effects.
