{"x402Version":2,"service":{"name":"Klima Retirement Aggregator","description":"Programmatic carbon-credit retirement via Klima Protocol on Base. Single multiplexed URL exposes 5 actions: discover (list credits), quote (live price), quoteByBudget (size against a USDC budget), prepare (encode calldata; free), retire ($0.01 USDC via x402, batch-callable).","operator":"KlimaDAO","homepage":"https://github.com/Carbonmark/x402-klima-RA-new","documentation":"https://github.com/Carbonmark/x402-klima-RA-new/blob/main/Readme.MD","facilitator":"https://facilitator.payai.network"},"endpoints":[{"url":"https://x402.klimalabs.com/api","method":"POST","description":"Klima Retirement Aggregator action multiplexer. POST a JSON body with an `action` field.","actions":[{"name":"discover","fee":"0","description":"List available carbon classes and credits with registry/vintage/Puro metadata. Optionally pass `creditToken` to do a focused lookup that returns the credit's current `isPuro` status and informational batchId.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"discover"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["action"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"carbonClasses":{"type":"array","items":{"type":"object","properties":{"carbonClassId":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"region":{"anyOf":[{"type":"string"},{"type":"null"}]},"methodologies":{"type":"array","items":{}},"isRegistered":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"priceUsdcPerTon":{"anyOf":[{"type":"object","properties":{"priceUsdc":{"type":"string"},"symbol":{"type":"string"}},"required":["priceUsdc","symbol"],"additionalProperties":false},{"type":"null"}]},"credits":{"type":"array","items":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"creditsDetailed":{"type":"array","items":{"type":"object","properties":{"tokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenStandard":{"anyOf":[{"type":"string"},{"type":"null"}]},"tokenId":{"type":"number"},"registry":{"anyOf":[{"type":"string"},{"type":"null"}]},"projectId":{"anyOf":[{"type":"string"},{"type":"null"}]},"vintage":{"anyOf":[{"type":"number"},{"type":"null"}]},"batchId":{"anyOf":[{"type":"string"},{"type":"null"}]},"isPuro":{"type":"boolean"}},"required":["tokenAddress","tokenStandard","tokenId","registry","projectId","vintage","batchId","isPuro"],"additionalProperties":false}},"minRetirementTonnes":{"type":"string"},"minRetirementTonnesFormatted":{"type":"string"},"minRetirementNote":{"type":"string"}},"required":["carbonClassId","name","category","country","region","methodologies","isRegistered","priceUsdcPerTon","credits","creditsDetailed","minRetirementTonnes","minRetirementTonnesFormatted","minRetirementNote"],"additionalProperties":false}},"contracts":{"type":"object","properties":{"retirementAggregator":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"klimaProtocolAAM":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"kVCM":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"USDC":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}},"required":["retirementAggregator","klimaProtocolAAM","kVCM","USDC"],"additionalProperties":false},"supportedInputTokens":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string"},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"decimals":{"type":"number"}},"required":["symbol","address","decimals"],"additionalProperties":false}},"supportedCreditTypes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"standard":{"type":"string"},"bridge":{"type":"string"},"status":{"type":"string"}},"required":["type","standard","bridge"],"additionalProperties":false}},"x402FacilitatorVersion":{"type":"number"},"note":{"type":"string"},"creditLookup":{"type":"object","properties":{"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"batchId":{"type":"string"},"isPuro":{"type":"boolean"},"note":{"type":"string"}},"required":["creditToken","batchId","isPuro","note"],"additionalProperties":false}},"required":["carbonClasses","contracts","supportedInputTokens","supportedCreditTypes","x402FacilitatorVersion","note"],"additionalProperties":false}},{"name":"quote","fee":"0","description":"Live on-chain price quote for a (creditToken, amount, inputToken, carbonClass) combination. Returns atomic + decimal-formatted price/maxInput.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"quote"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"anyOf":[{"type":"string","minLength":1},{"type":"number"}]},"tokenId":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"required":["action","chainId","creditToken","inputToken","carbonClass","amount"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tonnes":{"type":"string"},"tonnesFormatted":{"type":"string"},"price":{"type":"string"},"priceFormatted":{"type":"string"},"suggestedMaxInput":{"type":"string"},"suggestedMaxInputFormatted":{"type":"string"},"pricePerTonne":{"type":"string"},"pricePerTonneFormatted":{"type":"string"},"maxPricePerTonne":{"type":"string"},"maxPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"},"x402FacilitatorVersion":{"type":"number"}},"required":["tonnes","tonnesFormatted","price","priceFormatted","suggestedMaxInput","suggestedMaxInputFormatted","pricePerTonne","pricePerTonneFormatted","maxPricePerTonne","maxPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","slippageBps","humanSummary","x402FacilitatorVersion"],"additionalProperties":false}},{"name":"quoteByBudget","fee":"0","description":"Convert a USDC budget into a feasible retirement tonnage. Probes the AMM floor and scales the recommendation to fit the budget.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"quoteByBudget"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"tokenId":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"budget":{"anyOf":[{"type":"string","minLength":1},{"type":"number"}]},"budgetAtomic":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]}},"required":["action","chainId","creditToken","inputToken","carbonClass"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"feasible":{"type":"boolean","const":true},"recommendedAmount":{"type":"string"},"recommendedAmountFormatted":{"type":"string"},"expectedTonnes":{"type":"string"},"expectedTonnesFormatted":{"type":"string"},"expectedCost":{"type":"string"},"expectedCostFormatted":{"type":"string"},"expectedMaxCost":{"type":"string"},"expectedMaxCostFormatted":{"type":"string"},"unitPricePerTonne":{"type":"string"},"unitPricePerTonneFormatted":{"type":"string"},"maxUnitPricePerTonne":{"type":"string"},"maxUnitPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"budgetAtomic":{"type":"string"},"budgetFormatted":{"type":"string"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"},"x402FacilitatorVersion":{"type":"number"}},"required":["feasible","recommendedAmount","recommendedAmountFormatted","expectedTonnes","expectedTonnesFormatted","expectedCost","expectedCostFormatted","expectedMaxCost","expectedMaxCostFormatted","unitPricePerTonne","unitPricePerTonneFormatted","maxUnitPricePerTonne","maxUnitPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","budgetAtomic","budgetFormatted","slippageBps","humanSummary","x402FacilitatorVersion"],"additionalProperties":false},{"type":"object","properties":{"feasible":{"type":"boolean","const":false},"reason":{"type":"string"},"minRetirementTonnes":{"type":"string"},"minRetirementTonnesFormatted":{"type":"string"},"minRetirementCost":{"type":"string"},"minRetirementCostFormatted":{"type":"string"},"minRetirementMaxCost":{"type":"string"},"minRetirementMaxCostFormatted":{"type":"string"},"unitPricePerTonne":{"type":"string"},"unitPricePerTonneFormatted":{"type":"string"},"maxUnitPricePerTonne":{"type":"string"},"maxUnitPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"budgetAtomic":{"type":"string"},"budgetFormatted":{"type":"string"},"message":{"type":"string"},"x402FacilitatorVersion":{"type":"number"}},"required":["feasible","reason","minRetirementTonnes","minRetirementTonnesFormatted","minRetirementCost","minRetirementCostFormatted","minRetirementMaxCost","minRetirementMaxCostFormatted","unitPricePerTonne","unitPricePerTonneFormatted","maxUnitPricePerTonne","maxUnitPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","budgetAtomic","budgetFormatted","message","x402FacilitatorVersion"],"additionalProperties":false}]}},{"name":"prepare","fee":"0","description":"Encode calldata + ERC-20 approval instructions for a single retirement. Off-chain only — does not broadcast.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"prepare"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"anyOf":[{"type":"string","minLength":1},{"type":"number"}]},"tokenId":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"maxInputTokenIn":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"details":{"type":"object","properties":{"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"retiringEntityString":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryString":{"type":"string"},"retirementMessage":{"type":"string"},"beneficiaryLocation":{"type":"string"},"consumptionCountryCode":{"type":"string"},"consumptionPeriodStart":{"anyOf":[{"type":"string"},{"type":"number"}]},"consumptionPeriodEnd":{"anyOf":[{"type":"string"},{"type":"number"}]}},"additionalProperties":false}},"required":["action","chainId","creditToken","inputToken","carbonClass","amount"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"quote":{"type":"object","properties":{"tonnes":{"type":"string"},"tonnesFormatted":{"type":"string"},"price":{"type":"string"},"priceFormatted":{"type":"string"},"suggestedMaxInput":{"type":"string"},"suggestedMaxInputFormatted":{"type":"string"},"pricePerTonne":{"type":"string"},"pricePerTonneFormatted":{"type":"string"},"maxPricePerTonne":{"type":"string"},"maxPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"}},"required":["tonnes","tonnesFormatted","price","priceFormatted","suggestedMaxInput","suggestedMaxInputFormatted","pricePerTonne","pricePerTonneFormatted","maxPricePerTonne","maxPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","slippageBps","humanSummary"],"additionalProperties":false},"approvalRequired":{"type":"boolean","const":true},"approvalInstructions":{"type":"object","properties":{"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"spender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string"},"amountFormatted":{"type":"string"},"note":{"type":"string"}},"required":["token","spender","amount","amountFormatted","note"],"additionalProperties":false},"x402FacilitatorVersion":{"type":"number"}},"required":["to","data","chainId","quote","approvalRequired","approvalInstructions","x402FacilitatorVersion"],"additionalProperties":false}},{"name":"retire","fee":"0.01 USDC","description":"x402-gated. Encode batchCall calldata for one or many retirements. Settles $0.01 USDC via the configured facilitator.","inputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","const":"retire"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"retirements":{"minItems":1,"type":"array","items":{"type":"object","properties":{"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"inputToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"carbonClass":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"anyOf":[{"type":"string","minLength":1},{"type":"number"}]},"tokenId":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"maxInputTokenIn":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}]},"details":{"type":"object","properties":{"retiringAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"retiringEntityString":{"type":"string"},"beneficiaryAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"beneficiaryString":{"type":"string"},"retirementMessage":{"type":"string"},"beneficiaryLocation":{"type":"string"},"consumptionCountryCode":{"type":"string"},"consumptionPeriodStart":{"anyOf":[{"type":"string"},{"type":"number"}]},"consumptionPeriodEnd":{"anyOf":[{"type":"string"},{"type":"number"}]}},"additionalProperties":false}},"required":["creditToken","inputToken","carbonClass","amount"]}}},"required":["action","chainId","retirements"]},"outputSchema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x[a-fA-F0-9]*$"},"chainId":{"anyOf":[{"type":"number","const":8453},{"type":"number","const":84532}]},"retirementCount":{"type":"number"},"quotes":{"type":"array","items":{"type":"object","properties":{"tonnes":{"type":"string"},"tonnesFormatted":{"type":"string"},"price":{"type":"string"},"priceFormatted":{"type":"string"},"suggestedMaxInput":{"type":"string"},"suggestedMaxInputFormatted":{"type":"string"},"pricePerTonne":{"type":"string"},"pricePerTonneFormatted":{"type":"string"},"maxPricePerTonne":{"type":"string"},"maxPricePerTonneFormatted":{"type":"string"},"inputTokenSymbol":{"type":"string"},"inputTokenDecimals":{"type":"number"},"slippageBps":{"type":"number"},"humanSummary":{"type":"string"},"creditToken":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"maxInputTokenIn":{"type":"string"},"maxInputTokenInFormatted":{"type":"string"}},"required":["tonnes","tonnesFormatted","price","priceFormatted","suggestedMaxInput","suggestedMaxInputFormatted","pricePerTonne","pricePerTonneFormatted","maxPricePerTonne","maxPricePerTonneFormatted","inputTokenSymbol","inputTokenDecimals","slippageBps","humanSummary","creditToken","maxInputTokenIn","maxInputTokenInFormatted"],"additionalProperties":false}},"approvalRequired":{"type":"boolean","const":true},"approvalInstructions":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"spender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"amount":{"type":"string"},"amountFormatted":{"type":"string"},"note":{"type":"string"}},"required":["token","spender","amount","amountFormatted","note"],"additionalProperties":false}},"note":{"type":"string"},"x402FacilitatorVersion":{"type":"number"}},"required":["to","data","chainId","retirementCount","quotes","approvalRequired","approvalInstructions","note","x402FacilitatorVersion"],"additionalProperties":false}}],"accepts":[{"scheme":"exact","network":"eip155:84532","amount":"10000","asset":"0x036CbD53842c5426634e7929541eC2318f3dCF7e","description":"Base Sepolia USDC"},{"scheme":"exact","network":"eip155:8453","amount":"10000","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","description":"Base mainnet USDC"}]},{"url":"https://x402.klimalabs.com/api/health","method":"GET","description":"Liveness probe. Always 200, no payment required.","fee":"0"}]}