Aller au contenu
agentsub
Esc
↑↓naviguer↵ouvrir⌘Japerçu

Quote an offer

POST/v1/quotes
Authorization
AuthorizationBearer token (JWT) · headerrequired

Verified AgentID agent JWT (iss https://auth.agentid.com) or an agentsub OAuth access token (typ at+jwt, iss https://api.agentsub.dev, scope agentsub:agent). The agent's human owner must exist in Clerk with the same verified email.

Header parameters
Idempotency-Keystringrequired

Required only where this parameter is listed. Same payload/key recovers prior operation; secret replays omit plaintext.

matches ^[A-Za-z0-9._:-]{1,200}$
Request body
requiredapplication/json
offerIdstringrequired
Responses
200

Quote for the offer

offerIdstring
amountUcMicrocredits

Integer microcredits as a decimal string. 1 credit = 1,000,000 microcredits = $0.01 USD.

matches ^[0-9]+$
currencystring
amountUsdCentsinteger
expiresAtinteger
401

unauthorized problem; live 401s advertise WWW-Authenticate: Bearer resource_metadata=...

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
404

not_found problem

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
503

Runtime or provider configuration unavailable (runtime_configuration_required, signing_configuration_required, runtime_unavailable, workspace_unavailable, provider_configuration_required)

typestringrequired
titlestringrequired
statusintegerrequired
codestringrequired
Request
curl -X POST 'https://api.agentsub.dev/v1/quotes' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Idempotency-Key: string' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "offerId": "string"
}'
Response
{
  "offerId": "string",
  "amountUc": "string",
  "currency": "usd",
  "amountUsdCents": 0,
  "expiresAt": 0
}