Skip to main content
Home / Free guided trial

Try one small coding task before you commit

A no-dependency fixture gives you a concrete task to run with the access path you already have. The result is your own observation, not a claim about model performance.

1. Get the task

Download the worksheet and create the two files in a new directory. The starter has an intentional defect: its tests should fail before a solution is made. It uses Node's built-in test runner, so there are no packages to install.

The task asks for a small correction to a token-cost function: price uncached and cached input at their separate documented rates, validate finite non-negative whole numbers, and reject cached input that exceeds total input.

Download worksheet

2. Run and review it

  1. Run the starter tests and confirm that they fail as described.
  2. Use the included prompt with a tool you can access, or solve it yourself.
  3. Read the changed file and run the tests yourself.
  4. Treat a passing run as evidence only that this fixture's acceptance requirements were met.
This guide has no model credentials and has not run this task against any model. It does not publish a score, speed comparison, or cost result.

3. Keep a local record

Optional fields help you retain your own setup and outcome. API token observations are exported as entered; subscription quota observations stay separate and are never converted to a dollar value.

GUIDED TRIAL · UNMEASURED

Record one small coding task

Run the intentionally failing starter, then review the result yourself. This worksheet is a repeatable practice task, not a model benchmark or a claim that this guide tested a model.

Values stay in this browser session. This page has no account, server submission, cookies, local storage, or analytics for this trial. Do not enter API keys, private prompts, or repository content.
View task prompt
You are working in a tiny JavaScript fixture with Node's built-in node:test.
Implement src/total-cost.mjs so totalCost({ inputTokens, cachedInputTokens,
outputTokens }) returns the per-request USD token cost using these rates per
one million tokens: $4 for uncached input, $0.20 for cached input, and $20 for
output. Cached input is part of total input, so only inputTokens -
cachedInputTokens receives the uncached input rate.

Rules:
- inputTokens, cachedInputTokens, and outputTokens must each be finite,
  non-negative whole numbers.
- cachedInputTokens must not exceed inputTokens.
- Throw a helpful Error when a rule is violated.
- Keep the public function name and input object shape unchanged.
- Add focused tests only if they add a distinct edge case.
- Run `node --test test/total-cost.test.mjs` and report the result.
Do not use external packages or change the task into a different project.