Usage counts and bills can drift apart. Your AI plans the feature so each answer is counted once and billed right.
What happened
Perplexity's blog post shows Computer building an answer API and opening a pull request on GitHub. The post says the agent then deploys it and tracks usage, speed and billing with Datadog and Stripe. The user reviews and merges the pull request.
Download the .zip. In Settings, find Skills, choose Upload skill and pick the file. Code execution has to be turned on.
Claude Code
Run this in your terminal:mkdir -p ~/.claude/skills/build-an-ai-answer-feature-with-usage-billing && curl -fsSL https://botcurrent.com/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md -o ~/.claude/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md
Codex
Run this in your terminal:mkdir -p ~/.agents/skills/build-an-ai-answer-feature-with-usage-billing && curl -fsSL https://botcurrent.com/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md -o ~/.agents/skills/build-an-ai-answer-feature-with-usage-billing/SKILL.md
We check every skill file before we offer it. This one is the prompt above in skill form.
Passed Skill file is well formed
Passed Runs its own code or programs
Passed Connects to the internet from code
Passed Touches passwords, keys or private files
Passed Deletes or overwrites things in bulk
Passed Hidden or scrambled code
Passed Tries to override your instructions
Passed Invisible characters in the text
Passed Sends your data somewhere else
Passed Can pay or buy without asking you
Passed Downloads or installs other software
Passed Has a password or key written into it
Passed Asks for admin (sudo) rights
Files scanned: SKILL.md. Links to: botcurrent.com, www.perplexity.ai. Fingerprint: 902f28736c39. What we check
Tried it? Did it work for you?
Tell us what went wrong and we’ll fix the prompt: email us.
Votes count only if you allowed optional analytics.
What you'll get
A plan and a patch for the answer feature, with usage logging, billing checks and tests.
You'll need
What the feature should answer, and for whom
Your pricing rule, such as per answer or per month
The code that handles accounts and billing, with keys removed
Before you switch it on
Acts with your OK
If you give this job to an agent that works in your accounts:
Access it needs
Your code repository, deploy tools and billing dashboards
Keep on “ask me first”
Sending or posting anything, paying or buying, sharing your address or ID, deleting anything
Heads up: Billing code needs a second person's review. Check usage counts against your billing tool in test mode before real customers pay.
More details: full instructions, sources and safeguards
Before you begin
Keep provider cost, usage and customer charges distinct. No credentials, paid services, live payment events, changed billing rules or deployment. Missing contracts block affected branches; user reviews every later repository or production action.
Use this in your own AI tool
Copy the starter, then open your own AI tool.
Paste it with only the permitted inputs. Check privacy settings and tool compatibility first.
Review the draft and held questions. Any later action needs separate approval.
What you need
Authorized repository snapshot, interfaces and dependency constraints
Approved answer, entitlement, billing-unit, cancellation and error contracts
Mock provider/payment examples, event schema and explicit execution/review boundaries
Start here
01Map completed answer delivery to the owner-approved billable event; hold unclear entitlement, cancellation or error rules.
02Write the scoped candidate implementation using mocked providers/payment events and explicit duplicate-event handling.
03Return complete files or an unapplied patch with latency/usage/billing checks labelled unrun and a reviewer handoff.
Advanced prompt availability
Advanced prompt
No accepted companion is available for this record. The original material below retains its original status.
Technical setup & run design — optional
Starter
Separate short starter version composed-v1. Untested.
Advanced prompt
No accepted advanced companion is available. Legacy material remains in the original notes with its status.
Compatibility
Unknown; check the actual tool, account and permissions.
Run design
No reviewed run design. No runtime or schedule is activated by BotCurrent.
Setup and access
Proposed inputs
Name
Feature contract
Owner
Product owner
Minimum scope
Answer behaviour, limits, entitlement rules and user-visible errors
Quality check
Define what constitutes a completed and billable request.
Name
Repository and measurement design
Owner
Engineering owner
Minimum scope
Approved interfaces, test accounts and event schema
Quality check
Keep provider cost, customer usage and billing amounts distinct.
Access and setup — proposed or unknown
Proposed minimum
Work in an authorized development copy with mocked providers and payment events.
Compatibility unknowns
Unknown: API access, framework versions, billing integration and deployment compatibility.
External actions requiring approval
Creating credentials, changing billing rules, deploying or sending live payment events.
Source evidence, attribution & limitations
Full source evidence
Official recipe · Coding orchestration
Original task title: Build a metered AI-answer feature
Editorial candidate. This is source-backed reporting or a documented workflow. BotCurrent has not independently tested this task. A proposed Canadian adaptation is not evidence of a Canadian deployment or compliance certification.
Editorial classification; no execution or compatibility test is implied.
No tool mapping reviewed for this task.
Source-backed example. Practical decision guidance is proposed and untested; this is not a full implementation guide.
The problem
An AI-answer feature needs implementation, usage tracking and billing visibility before a team can evaluate its behavior in production.
Suggested task
Implement an answer API through a pull request and user-controlled deployment, then monitor usage, latency and billing.
What you could produce
An answer-feature pull request and usage, latency and billing observations.
Where these suggestions come from
Core problem: Our interpretation of the task
Agent job: Our interpretation of the task
Expected output: Our interpretation of the task
Relevant job roles: Our interpretation of the task
Benefit type: Our interpretation of the task
Suggestions and their limits
Describes the task’s purpose and intended output; measured benefit, safe unsupervised operation and successful delivery are not established by this framing.
Editorial synthesis based on the linked source. This framing does not add evidence of successful delivery or results.
Before you try it · suggestions untested
Case-specific decision guidance and first checks are original proposals. The linked source supports the attributed task; this added guidance has not been executed.
An AI-answer endpoint can work in a demo while its usage meter misses retries, streaming failures or requests that never reach billing. If product and payment records disagree, users may be charged incorrectly or the team may misunderstand operating costs.
This job could make implementation, metering and observability reviewable together. A clear event model would help engineers distinguish answer delivery, chargeable usage and provider cost before a user-controlled release.
Why an agent / simpler alternative
Useful judgment
Connect API behaviour with usage events and propose tests for retries and partial failures.
Simpler alternative
Use a fixed internal prototype without billing when the team only needs to evaluate answer quality.
Unsuitable when
The feature requires live charges, credential creation or production deployment without explicit authorization.
Expected deliverable and review checks
Proposed artifact
Reviewable implementation proposal with metering model, failure tests and staged observability checks.
Critical checks
A retried request cannot create duplicate chargeable usage.
Failed or cancelled answers follow the agreed billing rule and remain diagnosable.
Missing output evidence
No new run or output inspection in this editorial layer; see linked source-specific limits.
First check — proposed, unexecuted
Status
proposed_unexecuted
Synthetic fixture
Synthetic events include one successful answer, its repeated delivery event and a cancelled stream.
Acceptance checks
The success consumes entitlement once.
The cancelled stream follows an explicit rule rather than an accidental default.
Stop conditions
Live credentials, real charges or production deployment is needed.
An answer-feature pull request and usage, latency and billing observations.
What you need: Supply an authorized repository and billing rules. Reported tools: Computer; Perplexity Agent API; GitHub; Next.js; Supabase; Vercel; Datadog; Stripe. Proposed setup: confirm current access, versions and costs before using live services.
Implement an answer API through a pull request and user-controlled deployment, then monitor usage, latency and billing.
Proposed check: repeat a successful mock delivery event and count it once; check a cancelled stream separately against the agreed billing rule.
PR review and merge are assigned to the user. Proposed safeguard: approve credential setup, payment commitments and production release separately.
Official recipe. BotCurrent has not tested this workflow.
Related tasks
Suggestions share task wording or context; compatibility and execution remain unverified.
Allow optional analytics to help us improve BotCurrent? We use PostHog to see which pages and buttons people use, including recordings with anything you type hidden. Searches and saved items are excluded. Privacy details