{"openapi":"3.1.0","info":{"title":"profils.ai agent API","version":"1","description":"Paid programmatic access. Open an account, fund it once and send Authorization: Bearer <api key>, or pay each request through x402, MPP or L402 and receive a key in the Payment-Account-Key response header."},"servers":[{"url":"https://profils.ai"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key from the signup endpoint"}},"schemas":{"PaymentRequired":{"type":"object","required":["error","message","price","options","account"],"properties":{"error":{"const":"payment_required"},"message":{"type":"string","description":"English explanation for the agent."},"price":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"const":"USD"}}},"balance":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"const":"USD"}}},"resource":{"type":"string"},"options":{"type":"array","items":{"type":"object"}},"account":{"type":"object"},"rejected":{"type":"object","properties":{"rail":{"type":"string"},"reason":{"type":"string"}}}}},"Account":{"type":"object","properties":{"id":{"type":"string"},"balance":{"type":"object","properties":{"amount":{"type":"string"},"currency":{"const":"USD"}}},"createdAt":{"type":"string","format":"date-time"}}}}},"security":[{"apiKey":[]}],"paths":{"/api/agents/accounts":{"post":{"summary":"Open an account and receive an API key, with no human step","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}}}},"security":[],"responses":{"201":{"description":"The API key, shown once, and the empty account"}}}},"/api/agents/balance":{"get":{"summary":"Balance and recent ledger entries","responses":{"200":{"description":"The statement"}}}},"/api/agents/top-ups":{"post":{"summary":"Fund the balance through any payment rail (at least $1 on chain)","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","description":"USD, such as \"5\""}}}}}},"security":[],"responses":{"200":{"description":"The new balance"},"402":{"description":"Payment Required. The JSON body explains the price and every way to pay; headers carry the machine challenges (PAYMENT-REQUIRED for x402, WWW-Authenticate: Payment for MPP, WWW-Authenticate: L402 for Lightning).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}}}}},"/api/agents/keys":{"get":{"summary":"The working API keys of the account, by id and last characters","responses":{"200":{"description":"The keys"}}},"post":{"summary":"Issue another API key for the same balance, shown once, to rotate keys","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string"}}}}}},"responses":{"201":{"description":"The new API key"}}}},"/api/agents/keys/{keyId}":{"delete":{"summary":"Revoke one of the account API keys at once, the calling key included","parameters":[{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Revoked"},"404":{"description":"No working key with this id"}}}},"/api/documents/acte/{id}":{"get":{"summary":"A filed acte (statutes, decisions) as PDF","responses":{"302":{"description":"Redirect to the PDF on the public documents domain"},"402":{"description":"Payment Required. The JSON body explains the price and every way to pay; headers carry the machine challenges (PAYMENT-REQUIRED for x402, WWW-Authenticate: Payment for MPP, WWW-Authenticate: L402 for Lightning).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}}}}},"/api/documents/bilan/{id}":{"get":{"summary":"Annual accounts by their registry PDF id","responses":{"302":{"description":"Redirect to the PDF on the public documents domain"},"402":{"description":"Payment Required. The JSON body explains the price and every way to pay; headers carry the machine challenges (PAYMENT-REQUIRED for x402, WWW-Authenticate: Payment for MPP, WWW-Authenticate: L402 for Lightning).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}}}}},"/api/documents/comptes/{siren}/{closing}/{depot}/{type}":{"get":{"summary":"Annual accounts of one filing, by closing date, filing date and type","responses":{"302":{"description":"Redirect to the PDF on the public documents domain"},"402":{"description":"Payment Required. The JSON body explains the price and every way to pay; headers carry the machine challenges (PAYMENT-REQUIRED for x402, WWW-Authenticate: Payment for MPP, WWW-Authenticate: L402 for Lightning).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}}}}}}}