Plan a validated 3D carton packing arrangement for a set of items into one or more carton
Plan a validated 3D carton packing arrangement for a set of items into one or more carton types, and return per-carton placements, a packing sequence, actual/dimensional/billable weight, a utilization and support/containment audit, and downloadable artifacts (a packing list, the full JSON report, and an SVG/PNG preview)
50000 (raw units)
price
2
calls / 30d
1
unique payers
2026-09-11
updated
Provider
pack.api.williamrobinson.dev · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:8453",
"payTo": "0x26026370fe8b2bb17af9092a17691c76519366da",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "50000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"cartons": [
{
"available": 10,
"cost": 0.9,
"id": "small-box",
"innerDimensions": [
30,
22,
18
],
"label": "Small shipping box",
"maxWeight": 10,
"tareWeight": 0.3
},
{
"available": 6,
"cost": 1.6,
"id": "medium-box",
"innerDimensions": [
32,
24,
18
],
"label": "Medium shipping box",
"maxWeight": 20,
"tareWeight": 0.6
}
],
"dimensionalDivisor": 5000,
"items": [
{
"dimensions": [
24,
16,
4
],
"fragile": false,
"id": "book-hardcover",
"label": "Hardcover book",
"quantity": 4,
"rotation": "any",
"weight": 0.9
},
{
"dimensions": [
12,
9,
9
],
"fragile": true,
"id": "ceramic-mug",
"label": "Ceramic mug",
"maxLoad": 0.5,
"quantity": 6,
"rotation": "upright",
"weight": 0.35
},
{
"dimensions": [
16,
8,
2
],
"fragile": false,
"group": "accessories",
"id": "phone-case",
"label": "Phone case",
"quantity": 12,
"rotation": "any",
"weight": 0.08
}
],
"objective": "fewest-cartons",
"units": {
"length": "cm",
"weight": "kg"
}
},
"bodyType": "json",
"method": "POST",
"type": "http"
},
"output": {
"example": {
"artifacts": [
{
"href": "https://pack.api.williamrobinson.dev/v1/pack/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/packing.json",
"mediaType": "application/json",
"name": "packing.json",
"sha256": "9aa3b44351258c944cb058f841c09472e7cc42a98680aee5143e7364bd3574f0",
"sizeBytes": 13262
},
{
"href": "https://pack.api.williamrobinson.dev/v1/pack/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/packing-list.csv",
"mediaType": "text/csv; charset=utf-8",
"name": "packing-list.csv",
"sha256": "7b6c12248cb09a3ed2686df7a51ee9b0d9230c2408fa54f52ab6aae38dd9e1c9",
"sizeBytes": 1350
},
{
"href": "https://pack.api.williamrobinson.dev/v1/pack/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/preview.svg",
"mediaType": "image/svg+xml",
"name": "preview.svg",
"sha256": "02ccb2861525080545ac832126de2caafd76602889adc84ae2461c3e6856d362",
"sizeBytes": 13630
},
{
"href": "https://pack.api.williamrobinson.dev/v1/pack/artifacts/0123456789abcdef0123456789abcdef0123456789abcdef/preview.png",
"mediaType": "image/png",
"name": "preview.png",
"sha256": "23ec4b3ae13740d31f17e13ff20b32dce5907cc8f0ba8802a1b3b8b19e0265d3",
"sizeBytes": 124475
}
],
"cartons": [
{
"actualWeight": 4.7,
"billableWeight": 4.7,
"cartonId": "medium-box",
"checks": [
{
"code": "containment",
"detail": "Every placement's origin and size stays within the carton's inner dimensions.",
"status": "passed"
},
{
"code": "no_overlap",
"detail": "No two placements in this carton occupy overlapping volume.",
"status": "passed"
},
{
"code": "support",
"detail": "Every placement meets the 0.6 minimum support ratio.",
"status": "passed"
},
{
"code": "fragile_on_top",
"detail": "No placement rests on a fragile item.",
"status": "passed"
},
{
"code": "carton_weight",
"detail": "Total contents weight is within the carton's maximum.",
"status": "passed"
},
{
"code": "max_load",
"detail": "No placement carries more weight above it than its declared maxLoad.",
"status": "passed"
},
{
"code": "dimensional_weight_computed",
"detail": "Dimensional and billable weight match volume/divisor and max(actual, dimensional).",
"status": "passed"
},
{
"code": "carton_identity",
"detail": "Reported carton innerDimensions match the referenced carton type.",
"status": "passed"
},
{
"code": "orientation",
"detail": "Every placement's size and orientation match the item's dimensions and rotation policy.",
"status": "passed"
},
{
"code": "support_ratio_reported",
"detail": "Every placement's reported supportRatio matches the recomputed value.",
"status": "passed"
}
],
"contentsWeight": 4.1,
"dimensionalWeight": 2.7648,
"id": "C1",
"innerDimensions": [
32,
24,
18
],
"placements": [
{
"itemId": "book-hardcover",
"orientation": 0,
"origin": [
0,
0,
0
],
"size": [
24,
16,
4
],
"step": 1,
"supportRatio": 1,
"unit": 2
},
{
"itemId": "book-hardcover",
"orientation": 5,
"origin": [
24,
0,
0
],
"size": [
4,
24,
16
],
"step": 2,
"supportRatio": 1,
"unit": 0
},
{
"itemId": "book-hardcover",
"orientation": 5,
"origin": [
28,
0,
0
],
"size": [
4,
24,
16
],
"step": 3,
"supportRatio": 1,
"unit": 1
},
{
"itemId": "ceramic-mug",
"orientation": 0,
"origin": [
0,
0,
4
],
"size": [
12,
9,
9
],
"step": 4,
"supportRatio": 1,
"unit": 2
},
{
"itemId": "ceramic-mug",
"orientation": 0,
"origin": [
12,
0,
4
],
"size": [
12,
9,
9
],
"step": 5,
"supportRatio": 1,
"unit": 4
},
{
"itemId": "ceramic-mug",
"orientation": 0,
"origin": [
0,
9,
4
],
"size": [
12,
9,
9
],
"step": 6,
"supportRatio": 0.777778,
"unit": 0
},
{
"itemId": "ceramic-mug",
"orientation": 0,
"origin": [
12,
9,
4
],
"size": [
12,
9,
9
],
"step": 7,
"supportRatio": 0.777778,
"unit": 1
}
],
"volumeUtilization": 0.614583
},
{
"actualWeight": 3.16,
"billableWeight": 3.16,
"cartonId": "medium-box",
"checks": [
{
"code": "containment",
"detail": "Every placement's origin and size stays within the carton's inner dimensions.",
"status": "passed"
},
{
"code": "no_overlap",
"detail": "No two placements in this carton occupy overlapping volume.",
"status": "passed"
},
{
"code": "support",
"detail": "Every placement meets the 0.6 minimum support ratio.",
"status": "passed"
},
{
"code": "fragile_on_top",
"detail": "No placement rests on a fragile item.",
"status": "passed"
},
{
"code": "carton_weight",
"detail": "Total contents weight is within the carton's maximum.",
"status": "passed"
},
{
"code": "max_load",
"detail": "No placement carries more weight above it than its declared maxLoad.",
"status": "passed"
},
{
"code": "dimensional_weight_computed",
"detail": "Dimensional and billable weight match volume/divisor and max(actual, dimensional).",
"status": "passed"
},
{
"code": "carton_identity",
"detail": "Reported carton innerDimensions match the referenced carton type.",
"status": "passed"
},
{
"code": "orientation",
"detail": "Every placement's size and orientation match the item's dimensions and rotation policy.",
"status": "passed"
},
{
"code": "support_ratio_reported",
"detail": "Every placement's reported supportRatio matches the recomputed value.",
"status": "passed"
}
],
"contentsWeight": 2.56,
"dimensionalWeight": 2.7648,
"id": "C2",
"innerDimensions": [
32,
24,
18
],
"placements": [
{
"itemId": "book-hardcover",
"orientation": 0,
"origin": [
0,
0,
0
],
"size": [
24,
16,
4
],
"step": 8,
"supportRatio": 1,
"unit": 3
},
{
"itemId": "phone-case",
"orientation": 1,
"origin": [
24,
0,
0
],
"size": [
8,
16,
2
],
"step": 9,
"supportRatio": 1,
"unit": 0
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
0,
16,
0
],
"size": [
16,
8,
2
],
"step": 10,
"supportRatio": 1,
"unit": 1
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
16,
16,
0
],
"size": [
16,
8,
2
],
"step": 11,
"supportRatio": 1,
"unit": 2
},
{
"itemId": "phone-case",
"orientation": 1,
"origin": [
24,
0,
2
],
"size": [
8,
16,
2
],
"step": 12,
"supportRatio": 1,
"unit": 3
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
0,
16,
2
],
"size": [
16,
8,
2
],
"step": 13,
"supportRatio": 1,
"unit": 4
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
16,
16,
2
],
"size": [
16,
8,
2
],
"step": 14,
"supportRatio": 1,
"unit": 5
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
0,
0,
4
],
"size": [
16,
8,
2
],
"step": 15,
"supportRatio": 1,
"unit": 6
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
16,
0,
4
],
"size": [
16,
8,
2
],
"step": 16,
"supportRatio": 1,
"unit": 7
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
0,
8,
4
],
"size": [
16,
8,
2
],
"step": 17,
"supportRatio": 1,
"unit": 8
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
16,
8,
4
],
"size": [
16,
8,
2
],
"step": 18,
"supportRatio": 1,
"unit": 9
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
0,
16,
4
],
"size": [
16,
8,
2
],
"step": 19,
"supportRatio": 1,
"unit": 10
},
{
"itemId": "phone-case",
"orientation": 0,
"origin": [
16,
16,
4
],
"size": [
16,
8,
2
],
"step": 20,
"supportRatio": 1,
"unit": 11
},
{
"itemId": "ceramic-mug",
"orientation": 0,
"origin": [
0,
0,
6
],
"size": [
12,
9,
9
],
"step": 21,
"supportRatio": 1,
"unit": 5
},
{
"itemId": "ceramic-mug",
"orientation": 0,
"origin": [
12,
0,
6
],
"size": [
12,
9,
9
],
"step": 22,
"supportRatio": 1,
"unit": 3
}
],
"volumeUtilization": 0.473958
}
],
"checks": [
{
"code": "units_accounted",
"detail": "Every requested unit is accounted for as packed or unpacked.",
"status": "passed"
},
{
"code": "group_colocated",
"detail": "Every group's units share a single carton or are entirely unpacked.",
"status": "passed"
},
{
"code": "no_duplicate_units",
"detail": "No (item, unit) pair is placed more than once.",
"status": "passed"
},
{
"code": "carton_supply",
"detail": "Cartons used stay within each type's available supply and the job cap.",
"status": "passed"
}
],
"expiresAt": "2026-01-04T03:04:05.000Z",
"limitations": [
"Packing assumes rigid, axis-aligned rectangular items and cartons; irregular shapes, cushioning, dunnage, and pallets are not modeled.",
"Support and load-bearing checks use a simplified base-area-overlap and weight-propagation model, not a physics simulation; shifting in transit and dynamic loads are not modeled.",
"No carrier rate tables, zone pricing, or multi-drop sequencing are applied; the dimensional divisor is the only volumetric-weight input.",
"The arrangement returned is the best validated arrangement this solver found within its restart budget, not a proven optimum.",
"Geometry is computed on an internal 0.1 mm / 1 g working grid (dimensions and weights round half up to that grid); a positive value below the grid is rejected rather than silently rounded to zero, and per-axis rounding of up to 0.05 mm can accumulate across a long run of items.",
"Dimensional weight is computed from each carton's declared usable interior, not its exterior dimensions, so a carrier billing on exterior size may charge slightly more than reported here."
],
"recommendations": [],
"status": "passed",
"summary": {
"averageUtilization": 0.5442705,
"cartonsUsed": 2,
"totalActualWeight": 7.86,
"totalBillableWeight": 7.86,
"totalCost": 3.2,
"unitsPacked": 22,
"unitsRequested": 22
},
"tools": {
"solver": "pack-solver/1.0"
},
"truncated": false,
"units": {
"length": "cm",
"weight": "kg"
},
"unpacked": [],
"warnings": []
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"$defs": {
"dimensions3": {
"description": "[length, width, height] in the request's length unit; each value is positive and at most the equivalent of 10 m.",
"items": {
"exclusiveMinimum": 0,
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"rotation": {
"enum": [
"any",
"upright",
"none"
],
"type": "string"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"cartons": {
"items": {
"additionalProperties": false,
"properties": {
"available": {
"minimum": 1,
"type": "integer"
},
"cost": {
"minimum": 0,
"type": "number"
},
"id": {
"pattern": "^[A-Za-z0-9_.:-]{1,64}$",
"type": "string"
},
"innerDimensions": {
"$ref": "#/properties/input/properties/body/$defs/dimensions3"
},
"label": {
"maxLength": 120,
"minLength": 1,
"type": "string"
},
"maxWeight": {
"description": "In the request's weight unit. The gram-equivalent (value converted via units.weight) must not exceed 1000000000 g (~1000 t); enforced exactly server-side.",
"exclusiveMinimum": 0,
"maximum": 1000000000,
"type": "number"
},
"tareWeight": {
"description": "In the request's weight unit. The gram-equivalent (value converted via units.weight) must not exceed 1000000000 g (~1000 t); enforced exactly server-side.",
"maximum": 1000000000,
"minimum": 0,
"type": "number"
}
},
"required": [
"id",
"innerDimensions",
"maxWeight"
],
"type": "object"
},
"maxItems": 20,
"minItems": 1,
"type": "array"
},
"dimensionalDivisor": {
"default": 5000,
"description": "Volumetric divisor in cm^3/kg (5000 = UPS/FedEx/USPS/DHL as of 2026).",
"maximum": 20000,
"minimum": 1000,
"type": "number"
},
"items": {
"items": {
"additionalProperties": false,
"properties": {
"dimensions": {
"$ref": "#/properties/input/properties/body/$defs/dimensions3"
},
"fragile": {
"type": "boolean"
},
"group": {
"pattern": "^[A-Za-z0-9_.:-]{1,64}$",
"type": "string"
},
"id": {
"pattern": "^[A-Za-z0-9_.:-]{1,64}$",
"type": "string"
},
"label": {
"maxLength": 120,
"minLength": 1,
"type": "string"
},
"maxLoad": {
"description": "In the request's weight unit. The gram-equivalent (value converted via units.weight) must not exceed 1000000000 g (~1000 t); enforced exactly server-side.",
"maximum": 1000000000,
"minimum": 0,
"type": "number"
},
"quantity": {
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"rotation": {
"$ref": "#/properties/input/properties/body/$defs/rotation"
},
"weight": {
"description": "In the request's weight unit. The gram-equivalent (value converted via units.weight) must not exceed 1000000000 g (~1000 t); enforced exactly server-side.",
"maximum": 1000000000,
"minimum": 0,
"type": "number"
}
},
"required": [
"id",
"dimensions",
"weight",
"quantity"
],
"type": "object"
},
"maxItems": 200,
"minItems": 1,
"type": "array"
},
"objective": {
"default": "fewest-cartons",
"enum": [
"fewest-cartons",
"lowest-billable-weight",
"lowest-cost"
],
"type": "string"
},
"units": {
"additionalProperties": false,
"properties": {
"length": {
"enum": [
"mm",
"cm",
"in"
],
"type": "string"
},
"weight": {
"enum": [
"g",
"kg",
"oz",
"lb"
],
"type": "string"
}
},
"required": [
"length",
"weight"
],
"type": "object"
}
},
"required": [
"units",
"items",
"cartons"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"$defs": {
"check": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"detail": {
"maxLength": 2048,
"type": "string"
},
"status": {
"enum": [
"passed",
"failed",
"not_checked"
],
"type": "string"
}
},
"required": [
"code",
"status",
"detail"
],
"type": "object"
},
"dimensions3": {
"description": "[length, width, height] in the request's length unit; each value is positive and at most the equivalent of 10 m.",
"items": {
"exclusiveMinimum": 0,
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
},
"placement": {
"additionalProperties": false,
"properties": {
"itemId": {
"type": "string"
},
"orientation": {
"maximum": 5,
"minimum": 0,
"type": "integer"
},
"origin": {
"$ref": "#/properties/output/properties/example/$defs/point3"
},
"size": {
"$ref": "#/properties/output/properties/example/$defs/dimensions3"
},
"step": {
"minimum": 1,
"type": "integer"
},
"supportRatio": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"unit": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"itemId",
"unit",
"step",
"origin",
"size",
"orientation",
"supportRatio"
],
"type": "object"
},
"point3": {
"description": "[x, y, z] min-corner coordinates in the request's length unit, relative to the carton's inner floor corner.",
"items": {
"minimum": 0,
"type": "number"
},
"maxItems": 3,
"minItems": 3,
"type": "array"
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"artifacts": {
"items": {
"additionalProperties": false,
"properties": {
"href": {
"format": "uri",
"type": "string"
},
"mediaType": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"name": {
"enum": [
"packing.json",
"packing-list.csv",
"preview.svg",
"preview.png"
],
"type": "string"
},
"sha256": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"sizeBytes": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"name",
"mediaType",
"sizeBytes",
"sha256",
"href"
],
"type": "object"
},
"maxItems": 4,
"type": "array"
},
"cartons": {
"items": {
"additionalProperties": false,
"properties": {
"actualWeight": {
"minimum": 0,
"type": "number"
},
"billableWeight": {
"minimum": 0,
"type": "number"
},
"cartonId": {
"type": "string"
},
"checks": {
"items": {
"$ref": "#/properties/output/properties/example/$defs/check"
},
"type": "array"
},
"contentsWeight": {
"minimum": 0,
"type": "number"
},
"dimensionalWeight": {
"minimum": 0,
"type": "number"
},
"id": {
"type": "string"
},
"innerDimensions": {
"$ref": "#/properties/output/properties/example/$defs/dimensions3"
},
"placements": {
"items": {
"$ref": "#/properties/output/properties/example/$defs/placement"
},
"maxItems": 100,
"type": "array"
},
"volumeUtilization": {
"maximum": 1,
"minimum": 0,
"type": "number"
}
},
"required": [
"id",
"cartonId",
"innerDimensions",
"placements",
"contentsWeight",
"actualWeight",
"dimensionalWeight",
"billableWeight",
"volumeUtilization",
"checks"
],
"type": "object"
},
"maxItems": 100,
"type": "array"
},
"checks": {
"items": {
"$ref": "#/properties/output/properties/example/$defs/check"
},
"type": "array"
},
"expiresAt": {
"format": "date-time",
"type": "string"
},
"limitations": {
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 16,
"type": "array"
},
"recommendations": {
"items": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"message": {
"maxLength": 2048,
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"maxItems": 100,
"type": "array"
},
"status": {
"enum": [
"passed",
"failed"
],
"type": "string"
},
"summary": {
"additionalProperties": false,
"properties": {
"averageUtilization": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"cartonsUsed": {
"minimum": 0,
"type": "integer"
},
"totalActualWeight": {
"minimum": 0,
"type": "number"
},
"totalBillableWeight": {
"minimum": 0,
"type": "number"
},
"totalCost": {
"minimum": 0,
"type": "number"
},
"unitsPacked": {
"minimum": 0,
"type": "integer"
},
"unitsRequested": {
"minimum": 0,
"type": "integer"
}
},
"required": [
"unitsRequested",
"unitsPacked",
"cartonsUsed",
"totalActualWeight",
"totalBillableWeight",
"totalCost",
"averageUtilization"
],
"type": "object"
},
"tools": {
"additionalProperties": false,
"properties": {
"solver": {
"type": "string"
}
},
"required": [
"solver"
],
"type": "object"
},
"truncated": {
"type": "boolean"
},
"units": {
"additionalProperties": false,
"properties": {
"length": {
"enum": [
"mm",
"cm",
"in"
],
"type": "string"
},
"weight": {
"enum": [
"g",
"kg",
"oz",
"lb"
],
"type": "string"
}
},
"required": [
"length",
"weight"
],
"type": "object"
},
"unpacked": {
"items": {
"additionalProperties": false,
"properties": {
"itemId": {
"type": "string"
},
"reason": {
"maxLength": 2048,
"type": "string"
},
"units": {
"minimum": 1,
"type": "integer"
}
},
"required": [
"itemId",
"units",
"reason"
],
"type": "object"
},
"maxItems": 100,
"type": "array"
},
"warnings": {
"items": {
"maxLength": 4096,
"type": "string"
},
"maxItems": 100,
"type": "array"
}
},
"required": [
"status",
"tools",
"units",
"summary",
"cartons",
"unpacked",
"checks",
"warnings",
"recommendations",
"limitations",
"truncated",
"expiresAt",
"artifacts"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
},
"builder-code": {
"info": {
"s": [
"cdp_sdk_server"
]
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"properties": {
"a": {
"description": "App builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"s": {
"description": "Service builder codes",
"items": {
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
},
"maxItems": 11,
"type": "array"
},
"w": {
"description": "Wallet builder code",
"pattern": "^[a-z0-9_]{1,32}$",
"type": "string"
}
},
"type": "object"
}
},
"eip2612GasSponsoring": {},
"erc20ApprovalGasSponsoring": {},
"payment-identifier": {
"info": {
"required": true
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"id": {
"maxLength": 128,
"minLength": 16,
"pattern": "^[a-zA-Z0-9_-]+$",
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"required"
],
"type": "object"
}
}
}Use it
curl
curl "https://pack.api.williamrobinson.dev/v1/pack/plan" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://pack.api.williamrobinson.dev/v1/pack/plan");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://pack.api.williamrobinson.dev/v1/pack/plan")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/8217.json, and this resource appears in /discovery/resources and /discovery/search.