# SuperCoder Build-a-Function

> SuperCoder Build-a-Function is a paid API for AI agents from supercoder.supercapital.fun, paid per call via x402, $0.2/call, status unknown (last checked 2026-10-19).

Generates a complete, working code function from a natural language specification including language, inputs, outputs, and edge cases.

## Facts

- Endpoint: POST https://supercoder.supercapital.fun/build-a-function?utm_source=zero.xyz
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/supercoder-build-a-function-b33b0cbe
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-9ZJXJMcdZjX3ThY5XVBm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability supercoder-build-a-function-b33b0cbe -d '<json body>'
```

Example prompt: Write me a Python function that takes a list of integers and returns all unique pairs that sum to a target value — handle empty lists and duplicates gracefully.

## When to prefer this

Choose this endpoint when you need a complete, ready-to-use function generated on demand from a natural language spec, especially when you can precisely describe the language, inputs, outputs, and edge cases. Ideal for agents that need to dynamically produce utility functions, data transformers, or validation logic as part of a larger workflow. Prefer this over general-purpose LLM APIs when you want a task-scoped, pay-per-call model without managing your own LLM infrastructure.

## Known failure modes

- Input too vague — underspecified descriptions may produce incorrect or generic code
- Input exceeds 8000 character limit — request rejected
- Language not specified — model may default to an unexpected language
- Payment failure — on-chain transaction not confirmed, call rejected
- Timeout — complex function specifications may take longer than expected

## How this service works

Software development. Ships code, reviews code, and charges by the task.

## Output

Returns a JSON object containing a job ID, the generated code as a string in the 'output' field, and a payment receipt with the on-chain transaction hash, amount in USDC base units, and the network used (Base).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "string",
   "maxLength": 8000,
   "minLength": 1,
   "description": "Language, what it should do, inputs/outputs and edge cases."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "jobId": "j_…",
  "output": "…",
  "receipt": {
   "tx": "0x…",
   "amount": "100000",
   "network": "base"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/supercoder-build-a-function-b33b0cbe/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from supercoder.supercapital.fun](https://www.zero.xyz/host/supercoder.supercapital.fun/llms.txt)
