POST /v1/composite-executions
PrepareCompositeExecution coordinates independently billable child operations under one customer-owned business execution. Every component keeps its own reservation and settlement evidence; the root key and trace context make the end-to-end flow queryable without collapsing meters.
The server validates credentials, tenant, environment and permissions. This page does not send requests. Replace example values; deployed server validation remains authoritative.
Parameters
No path or query parameters.
Request body
componentsarrayExpand fields
component_keystringStable within the root execution, for example `model`, `image-1` or `video-transcode`. Nexus derives the child execution key from it.
executionobjectExpand fields
billing_meter_codestringcapability_idstringCapability is resolved from a previously fetched published execution profile. Metering validates it against the trusted Offer snapshot and freezes the corresponding revision on the Operation for Trace/audit.
capability_revision_idstringRevision returned by the profile. A fresh execution rejects a stale revision instead of silently adopting a newer price/route policy. An idempotent retry for an already-created execution still returns the original reservation.
customer_account_idstringestimatesarrayExpand fields
meter_codestringquantitystring
execution_keystringmodelstringoffer_idstringoperation_typestringproviderstringProvider must come from a trusted route or Sidecar configuration. It is used to acquire provider-scoped capacity leases before external I/O.
quotasarrayExpand fields
amountstringentitlement_codestringresource_idstringttl_secondsinteger · int32
resource_idstringresource_typestringsubject_idstringsubject_typestringttl_secondsinteger · int32
customer_account_idstringThe billing owner is declared once at the ingress. A component cannot replace it with a different customer account.
execution_keystringStable business id for the whole user-visible run. The component keys are deterministically derived from it and can be safely replayed after a process crash.
root_span_idstringtrace_idstringCanonical W3C identifiers of the caller-owned root span. Normal SDK span reporting carries the durable parent/child topology for each component.
cURL
curl --request POST 'https://nexus-api.rainlib.com/v1/composite-executions' \
--header 'Authorization: Bearer <NEXUS_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"components": [
{
"component_key": "<value>",
"execution": {
"billing_meter_code": "<value>",
"capability_id": "<value>",
"capability_revision_id": "<value>",
"customer_account_id": "<value>",
"estimates": [
{}
],
"execution_key": "<value>",
"model": "<value>",
"offer_id": "<value>",
"operation_type": "<value>",
"provider": "<value>",
"quotas": [
{}
],
"resource_id": "<value>",
"resource_type": "<value>",
"subject_id": "<value>",
"subject_type": "<value>",
"ttl_seconds": 0
}
}
],
"customer_account_id": "<value>",
"execution_key": "<value>",
"root_span_id": "<value>",
"trace_id": "<value>"
}'Response contract
200 · OK
componentsarrayExpand fields
component_keystringexecution_keystringreservationobjectExpand fields
concurrency_leasesarrayExpand fields
dimensionstringdimension_valuestringexpires_atstringidstringpolicy_codestringstatusstring
last_error_codestringnext_reconcile_atstringoperation_idstringprovider_started_atstringquotasarrayExpand fields
entitlement_codestringexpires_atstringidstringrequested_amountstringresource_idstringstatusstring
reconciliation_attemptsinteger · int32reservation_idstringstatusstring
customer_account_idstringexecution_keystringroot_span_idstringtrace_idstring
Generated responses do not enumerate every runtime error. See the integration guide for authentication, conflicts and retries.