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

# Understanding Credit Usage

> Learn how credits are consumed, why some tasks use more credits than others, and how to optimize your credit usage.

# Understanding Credit Usage

Every AI task performed in Runable consumes credits.

The number of credits used depends on the **complexity of the task**, the **AI models involved**, and the **computing resources required** to complete it.

Understanding how credits work can help you build more efficiently and reduce unnecessary retries.

***

# How Credit Usage Works

Think of credits as paying for computation—not individual prompts.

A prompt that requires the AI to:

* read many files
* generate thousands of lines of code
* produce high-quality images
* render videos
* analyze large datasets

will naturally consume more credits than a small UI update.

***

# What Affects Credit Usage?

Several factors influence how many credits a task consumes.

<CardGroup cols={2}>
  <Card title="Task Complexity" icon="brain">
    Larger and more complex requests require more AI computation.
  </Card>

  <Card title="Files Modified" icon="folder">
    Updating many files typically consumes more credits than changing a single component.
  </Card>

  <Card title="AI Models" icon="cpu">
    Different AI models require different amounts of computing power.
  </Card>

  <Card title="Images & Videos" icon="image">
    Generating visual content generally requires more resources than generating text.
  </Card>

  <Card title="Reasoning" icon="lightbulb">
    Tasks requiring deep analysis or planning may consume additional credits.
  </Card>

  <Card title="Retries" icon="rotate-cw">
    Multiple generations or repeated refinements consume additional credits.
  </Card>
</CardGroup>

***

# Credit Usage Examples

| Task                         | Relative Credit Usage |
| ---------------------------- | --------------------- |
| Small text update            | 🟢 Low                |
| Update one React component   | 🟢 Low                |
| Create a landing page        | 🟡 Medium             |
| Build a dashboard            | 🟡 Medium             |
| Generate an image            | 🟠 Medium–High        |
| Generate a presentation      | 🟠 Medium–High        |
| Build a complete application | 🔴 High               |
| Generate a video             | 🔴 Very High          |

<Info>
  These examples are intended to illustrate relative complexity. Actual credit usage varies depending on the specific task and output.
</Info>

***

# Why Did My Simple Request Use Many Credits?

A request may appear simple but require significant work behind the scenes.

For example:

```text theme={null}
Remove the timer from my app.
```

The AI might need to:

* locate the timer implementation
* understand component relationships
* update state management
* modify multiple files
* rebuild affected UI
* verify dependencies

Although the prompt is short, the underlying work can be substantial.

***

# Why Did the AI Stop Midway?

Some tasks require more credits than are currently available.

If your available credits are exhausted during execution:

* the task may stop before completion
* the AI may request additional credits
* partial results may still be available

This commonly occurs with:

* large applications
* video generation
* long documents
* complex research
* multi-file refactoring

***

# Why Videos Use More Credits

Video generation is one of the most computationally intensive features available.

It involves:

* script generation
* scene planning
* image synthesis
* animation
* rendering
* audio processing
* subtitles

As a result, videos typically consume more credits than text or code generation.

***

# Why Large Applications Cost More

Building or modifying a large application may require the AI to:

* analyze project architecture
* understand dependencies
* update many files
* preserve existing functionality
* generate new code
* validate changes

The more context the AI needs to process, the more computation is required.

***

# Save Credits with Better Prompts

Specific prompts help the AI understand exactly what you need.

Instead of:

```text theme={null}
Improve my app.
```

Try:

```text theme={null}
Update only the Dashboard page.

Do not modify routing, authentication, or backend logic.

Improve spacing and typography only.
```

Focused prompts often reduce unnecessary iterations and make the development process more efficient.

***

# Break Large Tasks into Smaller Steps

Instead of asking:

```text theme={null}
Rewrite my application.
```

Try:

1. Update Navbar
2. Improve Dashboard
3. Add Settings
4. Optimize Mobile Layout
5. Improve Performance

Smaller tasks are easier to review and generally produce more predictable results.

***

# Tips for Efficient Credit Usage

<CardGroup cols={2}>
  <Card title="Be Specific">
    Detailed prompts reduce unnecessary retries.
  </Card>

  <Card title="Use Existing Context">
    Reference your current project instead of describing everything again.
  </Card>

  <Card title="One Feature at a Time">
    Smaller tasks are usually more efficient than large rewrites.
  </Card>

  <Card title="Review Before Regenerating">
    Improve your prompt before generating again.
  </Card>

  <Card title="Upload References">
    Reference images and files improve accuracy.
  </Card>

  <Card title="Avoid Rebuilding Entire Projects">
    Modify existing features whenever possible.
  </Card>
</CardGroup>

***

# Frequently Asked Questions

<AccordionGroup>
  <Accordion title="Why did one prompt consume more credits than another?">
    Credit usage depends on the amount of AI computation required—not simply the number of words in your prompt.
  </Accordion>

  <Accordion title="Does a short prompt always use fewer credits?">
    No.

    A short request can still require significant code generation or reasoning.
  </Accordion>

  <Accordion title="Why did my task stop before finishing?">
    Your available credits may have been exhausted before the task completed.
  </Accordion>

  <Accordion title="Does generating videos cost more than text?">
    Generally, yes.

    Video generation requires significantly more computational resources than text generation.
  </Accordion>

  <Accordion title="How can I reduce credit usage?">
    * Write detailed prompts
    * Break large tasks into smaller steps
    * Avoid unnecessary retries
    * Use reference files when available
  </Accordion>
</AccordionGroup>

***

# Summary

Credit usage is determined by the amount of AI computation required to complete your request.

Providing clear instructions, breaking large tasks into smaller steps, and reviewing results before regenerating can help you make the most of your available credits.

***

## Related Guides

* How Credits Work
* Prompt Engineering Guide
* AI Limitations
* Image Generation
* Common Mistakes
