{"uid":"cap_yrgXXNCbWsb0-7k2VAQoF","slug":"util-beauty-crypto-key-derivation-a95f5f6e","name":"util.beauty Crypto Key Derivation","description":"Metered web utilities for developers and AI agents: browser screenshot and PDF, crypto, DNS and net tools. Pay per request with x402 (USDC on Base) or prepaid API keys.","url":"https://util.beauty/v1/crypto/key_derivation","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"type":"object","properties":{"body":{"type":"object","description":"JSON request body (see OpenAPI for the utility schema).","additionalProperties":true}}},"output":{"type":"object","properties":{"example":{"type":"object","properties":{"ok":{"type":"boolean"},"utility":{"type":"string"},"requestId":{"type":"string"},"chargedCredits":{"type":"number"}},"additionalProperties":true}}}}},"responseSchema":{"type":"json","example":{"ok":true,"utility":"…","requestId":"req_…","chargedCredits":1}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_e_ILV141cDQ77_2uwmZSe","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Derives cryptographic keys from input material using standard key derivation functions, billed per request via USDC micropayment or API key.","exampleAgentPrompt":"Derive a 32-byte key from my master secret using HKDF-SHA256 with the salt 'my-app-salt' and info context 'encryption-key-v1' — bill it via my prepaid API key.","exampleUseCases":[{"title":"Password-based key stretching for encryption","prompt":"I need to turn a user password into a strong 256-bit AES encryption key — can you run PBKDF2-SHA256 with 100,000 iterations and the salt 'user-account-salt' on the password 'correct-horse-battery' and give me the derived key bytes?"},{"title":"Deriving subkeys for multi-purpose secrets","prompt":"I have a master secret and I need to derive two separate subkeys from it — one labeled 'signing-key' and one labeled 'encryption-key' — can you run HKDF on each so I keep them cryptographically separated?"},{"title":"Serverless KDF in an agent workflow","prompt":"My agent pipeline doesn't have a crypto library available — can you call util.beauty's key derivation endpoint to compute an HKDF-SHA256 derived key from the seed 'workflow-master-seed' with info 'session-token' so I can use it to sign a JWT?"}],"resultDescription":"Returns a JSON object with ok (boolean), the utility name, a requestId for tracing, and chargedCredits indicating how many credits were consumed. The derived key material is returned in the utility-specific response fields.","failureModes":["Invalid or missing input key material returns a 400 error with descriptive message","Unsupported KDF algorithm returns an error indicating valid options","Insufficient credits or payment failure returns a 402 Payment Required response","Malformed JSON body returns a 400 parse error","Network timeout results in no charge and a 5xx error"],"whenToPreferThis":"Choose this endpoint when your agent or serverless pipeline needs cryptographic key derivation without bundling a crypto library, or when you want metered pay-per-use billing (USDC via x402 or prepaid key) for occasional KDF operations. Prefer it over running local crypto when operating in sandboxed environments or when auditability via requestId is needed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:32:14.335Z","isFirstParty":false}