POST
https://api.prysm1.com/v2/code · Requires authenticationdepth policy several diverse
coders run in parallel and the best candidate is kept. The response carries the files, the
final review verdict, and a PrysmProof v2 that binds the task to the
code it produced.
You pick the objective with a policy; PRYSM picks the coder and the critic (or you force
them). See How Code Mode works for the full model.
Authorization
Your secret key as a bearer token:
Bearer prysm_sk_...Body
The coding task in natural language, e.g. “Write a thread-safe LRU cache in Python with tests”.
Target language (
python, typescript, rust, …). Auto-detected from the task if omitted.The objective dial:
efficiency (one cheap coder), depth (cross several diverse coders
in parallel and keep the best), or balanced.Force the model that writes the code. Ignored if it isn’t a known catalog model.
Force the critic model that reviews the code. Ignored if it isn’t a known catalog model.
Total iterations: the first generation plus up to
max_iters - 1 repairs.Set
false for a single shot — one coder, one draft, no critic loop.Maximum tokens per underlying model call.
Sampling temperature passed to the underlying models. Lower is steadier for code.
A soft budget hint, in USD. The repair loop stops early once the estimated spend
approaches this cap.
Include the per-stage execution trace in
prysm.stages. Set false for a leaner response.Response
Unique code-run id, e.g.
prysm-a1b2c3d4.Always
code.Unix timestamp (seconds).
The task that was solved.
The target language (detected or forced).
The policy that ran:
efficiency, balanced, or depth.Plain-English explanation of how the run was carried out.
Whether the final review passed.
How many generate→review cycles ran.
The generated files.
The final critic verdict, or
null when review was false.Aggregate token usage across every model call.
The Code Mode extension block.
Errors
| Status | error | Meaning |
|---|---|---|
400 | no_task | task was empty or whitespace. |
401 | — | Missing or invalid API key. |
502 | no_code_produced | Keys are configured but no model produced usable code. |
502 | code_error | The engine raised while generating or reviewing. |
503 | no_provider_available | No provider API keys are configured on the server. |