IBM Granite Code ($0.025)
ibm_granite_codeGenerate, review, refactor, or explain code using IBM Granite instruct models. Also supports test generation and documentation. Billed per call via x402.
Instructions
Code generation, review, refactoring, and explanation via IBM Granite instruct models. Provide a task type and code/prompt; receive the generated or reviewed code with explanation. No IBM Cloud account required — pay $0.025 USDC per call via x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | Code task: generate (new code from description), review (bugs/security), refactor (quality), explain (plain language), test (unit tests), or document (add docstrings). | |
| prompt | Yes | For "generate": describe what to build. For all others: paste the code to process. | |
| context | No | Additional context: architecture notes, constraints, or example usage. | |
| language | No | Target programming language (e.g. "TypeScript", "Python", "Rust"). Optional for explain/review. |