コンテンツにスキップ

HTTP Shapes

SDK users usually call VelaClient, but understanding the HTTP shapes is useful when debugging failures or implementing a proxy.

EndpointMethodSDK methodPurpose
/api/connect-sessionsPOSTcreateConnectSession()Create a Hosted Connect session
/api/delegations/statusGETgetDelegationStatus()Status snapshot before readiness / prepare
/api/authorizations/checkPOSTauthorizeExecution()Check execution permission and issue relay access
/api/executions/reportPOSTrecordExecutionResult()Completed / failed audit report
/api/delegations/:id/revokePOSTrevokeDelegation()Revoke delegation
/api/audit-eventsGETlistAuditEvents()Fetch audit events
import type { AuthorizationRequest } from "@vel4ai/contracts";
export const authorizationRequest: AuthorizationRequest = {
appId: "app_1",
customerTenantId: "customer_1",
delegationId: "delegation_1",
estimatedCostUsd: 0.05,
zeroDataRetentionCapable: false,
modelSlot: {
slotId: "chat",
selectionMode: "locked",
requiredModel: "openai/gpt-4o-mini",
},
};
import type { RecordExecutionResultInput } from "@vel4ai/contracts";
export const resultInput: RecordExecutionResultInput = {
appId: "app_1",
customerTenantId: "customer_1",
delegationId: "delegation_1",
executionSessionId: "session_1",
requestedModel: "openai/gpt-4o-mini",
resolvedExecutionTarget: "openai/gpt-4o-mini",
status: "completed",
usageSummary: {
inputTokens: 12,
outputTokens: 24,
totalTokens: 36,
estimatedCostUsd: 0.05,
},
};

createFetchTransport() attaches x-vela-app-id, x-vela-app-token, and the compatibility header x-vela-app-key. Prefer appToken and VELA_APP_TOKEN in new code.