> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mnrl.app/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Coder: Generate code instantly for any language

> Use Monorail AI Coder to write, debug, convert, or explain code in any programming language or framework. Get instant, working code solutions from AI.

The AI Coder tool generates working code for any programming language or framework. Whether you need a complete function, a solution to a specific problem, or help understanding existing code, describe what you need in plain language and let the AI do the heavy lifting.

## Using AI Coder

<Steps>
  <Step title="Open Coder in your dashboard">
    Click **Coder** in the sidebar of your Monorail AI dashboard.
  </Step>

  <Step title="Describe the code you need">
    Write a clear description of what you want — be specific about the language, functionality, and any constraints or requirements.
  </Step>

  <Step title="Select an AI model">
    Choose the model you want to use for code generation.
  </Step>

  <Step title="Click Generate">
    Submit your request and wait for the AI to produce the code.
  </Step>

  <Step title="Review and use the output">
    Read through the generated code, copy it to your project, and test it in your environment.
  </Step>
</Steps>

## What you can use Coder for

* Write functions, classes, or complete scripts
* Debug or fix errors in existing code
* Convert code from one language to another
* Explain what a piece of code does
* Generate boilerplate or scaffolding
* Write unit tests for existing code

<Tip>
  Paste your existing code or error message into the prompt for debugging help. Include the language and any relevant context like the framework you're using.
</Tip>

## Credit usage

Coder uses the same text generation models as Chat and Writer. Credit cost depends on the model you select and the length of the output. Longer or more complex code generations consume more tokens.

See the [Credits](/credits) page for a full breakdown of model rates.
