# RQM OpenQASM 3 Repair

> RQM OpenQASM 3 Repair is a paid API for AI agents from jobs.rqmtechnologies.com, paid per call via x402, $0.2/call, status unknown (last checked 2026-09-14).

Repairs a bounded OpenQASM 3 program using a conservative, caller-specified set of allowed repair operations (e.g. adding headers, normalizing whitespace).

## Facts

- Endpoint: POST https://jobs.rqmtechnologies.com/x402/buyer-jobs/openqasm3-repair-v1
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/rqm-openqasm-3-repair-b1c4da09
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gnHJRnIwwls_7OBNEOW0W

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 rqm-openqasm-3-repair-b1c4da09 -d '<json body>'
```

Example prompt: My OpenQASM 3 circuit is missing its version header and has inconsistent whitespace — can you repair it using only 'add_openqasm3_header' and 'normalize_whitespace' as the allowed fixes, without inventing any missing gate logic?

## When to prefer this

Use this endpoint when you have a bounded OpenQASM 3 program that needs only conservative, non-semantic repairs (header addition and/or whitespace normalization) and you explicitly do not want invented or inferred gate logic. Prefer this over a full rewrite or synthesis endpoint when circuit semantics must be preserved exactly. Pair with the RQM Openqasm3 Preflight endpoint to validate before repair.

## Known failure modes

- Missing or invalid source field — returns validation error
- allowed_repairs array empty or exceeds maxItems:2 — schema validation failure
- Circuit has missing semantics that would require invented logic — endpoint refuses and returns an error (by design)
- Source code is not valid OpenQASM 3 at all — may return parse or repair failure
- Payment insufficient or max_total_price exceeded — x402 payment rejection

## How this service works

Openqasm3 Repair: Repair this bounded OpenQASM 3 program only with the supplied conservative repair policy. Use when: Use when a bounded request matches rqm.studio.openqasm3-repair-request.v1 and the caller needs the declared... Returns: repaired or withheld source, exact edit list, post-repair validation verdict. Boundaries: Deterministic bounded local software evidence only; no QPU, provider acceptance, certification, formal-pr...

## Output

A repaired OpenQASM 3 program with only the declared conservative repairs applied (add_openqasm3_header and/or normalize_whitespace), returned as a typed work product conforming to rqm.studio.openqasm3-repair-request.v1. No semantic changes or invented circuit logic are introduced.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "request": {
   "type": "object",
   "title": "RepairRequest",
   "required": [
    "source",
    "allowed_repairs"
   ],
   "properties": {
    "source": {
     "type": "string",
     "title": "Source",
     "minLength": 1
    },
    "allowed_repairs": {
     "type": "array",
     "items": {
      "enum": [
       "add_openqasm3_header",
       "normalize_whitespace",
       "add_stdgates_include",
       "terminate_statements"
      ],
      "type": "string"
     },
     "title": "Allowed Repairs",
     "maxItems": 4,
     "minItems": 1
    }
   },
   "additionalProperties": false
  },
  "schema_version": {
   "const": "rqm.jobs.bazaar-buyer-job-request.v1"
  },
  "idempotency_key": {
   "type": "string",
   "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$",
   "maxLength": 128,
   "minLength": 1
  },
  "max_total_price": {
   "type": "string",
   "pattern": "^(?:0|[1-9]\\d{0,13})(?:\\.\\d{1,6})?$"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/rqm-openqasm-3-repair-b1c4da09/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from jobs.rqmtechnologies.com](https://www.zero.xyz/host/jobs.rqmtechnologies.com/llms.txt)
