[Integrations](https://spiral.ai/integrations) › [opencode](https://spiral.ai/integrations/opencode) › [Llama 3 8B Lunaris](https://spiral.ai/integrations/opencode/llama-3-8b-lunaris)

# How to Use Llama 3 8B Lunaris in opencode

Llama 3 8B Lunaris is a generalist and roleplay merge suited to character dialogue and scene drafts. Its creator recommends Llama 3 Instruct formatting, temperature 1.4, and minimum probability 0.1.

|  |  |
| --- | --- |
| Model | Llama 3 8B Lunaris |
| Available through | OpenRouter |
| Category | LLM |
| Price | Up to $0.00027 per run at the default inputs. $0.052 per 1M input tokens, $0.065 per 1M output tokens. |
| Returns | text, json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Llama 3 8B Lunaris in opencode

- Use Llama 3 8B Lunaris to draft 12 greetings from the NPC briefs in this project. Keep each under 20 words and group them by character for review.
- Read the project's story outline, then use Llama 3 8B Lunaris to draft a 300-word opening scene. Follow the existing viewpoint and stop before the player makes a decision.
- Use Llama 3 8B Lunaris to draft a tavern conversation from the project's character notes. Request six exchanges, preserve established names, and flag any proposed lore additions.
- Use Llama 3 8B Lunaris with temperature 1.4 and min_p 0.1 to draft three merchant refusals from the project's NPC brief. Keep each refusal under 40 words.
- Use Llama 3 8B Lunaris to draft a 150-word passage and three player choices for the project's first quest. Show the proposed text alongside the existing dialogue format for review.

## How to set up Llama 3 8B Lunaris in opencode

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the server**: Leave out `--global` to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

```bash
opencode mcp add spiral --global --url https://api.spiral.ai/mcp
```

2. **Sign in**: Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, `/mcps` starts the same sign-in.

```bash
opencode mcp auth spiral
```

3. **Check it**: Spiral shows as connected.

```bash
opencode mcp list
```

### Use the Spiral skill

1. **Send opencode this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Llama 3 8B Lunaris**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "openrouter",
    "model": "sao10k/l3-lunaris-8b",
    "input": {
      "messages": [
        {
          "role": "system"
        }
      ]
    }
  }'
```

Then paste one of the prompts above: opencode finds Llama 3 8B Lunaris on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/opencode

## Llama 3 8B Lunaris tools and prices

- [Sao10K: Llama 3 8B Lunaris](https://spiral.ai/tools/openrouter/sao10k/l3-lunaris-8b) (OpenRouter): Up to $0.00027 per run at the default inputs. $0.052 per 1M input tokens, $0.065 per 1M output tokens.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| seed |  | — |  |
| stop |  | — |  |
| min_p | 0 to 1 | — |  |
| top_k | 0 to … | — |  |
| top_p | 0 to 1 | — |  |
| logprobs |  | — |  |

## What can you do with Llama 3 8B Lunaris in opencode?

Draft game dialogue and interactive fiction from your project's character briefs with Lunaris. Use the coding agent to check the generated text against your project's lore and dialogue conventions.

### Interactive character conversations

Give Lunaris a character brief and opening situation, then request one reply at a time while you control the other character.

### Game NPC dialogue

Draft greetings, refusals, and quest hints using an NPC's motives and vocabulary. Review the lines against the game's established lore.

### Short fiction scenes

Turn a scene outline into a compact draft with a specified viewpoint, conflict, and ending beat.

### Branching narrative drafts

Request a short story passage followed by three choices, each with a distinct consequence for the next scene.

### Character voice experiments

Rewrite a fictional exchange with different levels of formality, suspicion, or humor to compare possible character voices.

### Tabletop encounter preparation

Draft an encounter opening, an NPC's secret, and a few lines of dialogue from a compact campaign brief.

## Overview

- [OpenRouter](https://spiral.ai/providers/openrouter)
- [All opencode guides](https://spiral.ai/integrations/opencode)

## Llama 3 8B Lunaris in other agents

- [Amp](https://spiral.ai/integrations/amp/llama-3-8b-lunaris)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/llama-3-8b-lunaris)
- [Claude](https://spiral.ai/integrations/claude-desktop/llama-3-8b-lunaris)
- [Claude Code](https://spiral.ai/integrations/claude-code/llama-3-8b-lunaris)
- [Cline](https://spiral.ai/integrations/cline/llama-3-8b-lunaris)
- [Codex](https://spiral.ai/integrations/codex/llama-3-8b-lunaris)
- [Cursor](https://spiral.ai/integrations/cursor/llama-3-8b-lunaris)
- [Devin](https://spiral.ai/integrations/devin/llama-3-8b-lunaris)
- [dots](https://spiral.ai/integrations/dots/llama-3-8b-lunaris)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/llama-3-8b-lunaris)
- [Gemini](https://spiral.ai/integrations/gemini/llama-3-8b-lunaris)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/llama-3-8b-lunaris)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/llama-3-8b-lunaris)
- [goose](https://spiral.ai/integrations/goose/llama-3-8b-lunaris)
- [Grok](https://spiral.ai/integrations/grok/llama-3-8b-lunaris)
- [Grok Build](https://spiral.ai/integrations/grok-build/llama-3-8b-lunaris)
- [Hermes](https://spiral.ai/integrations/hermes/llama-3-8b-lunaris)
- [Instinct](https://spiral.ai/integrations/instinct/llama-3-8b-lunaris)
- [Manus](https://spiral.ai/integrations/manus/llama-3-8b-lunaris)
- [Muse](https://spiral.ai/integrations/muse/llama-3-8b-lunaris)
- [Muse Code](https://spiral.ai/integrations/muse-code/llama-3-8b-lunaris)
- [n8n](https://spiral.ai/integrations/n8n/llama-3-8b-lunaris)
- [Notion](https://spiral.ai/integrations/notion/llama-3-8b-lunaris)
- [OpenClaw](https://spiral.ai/integrations/openclaw/llama-3-8b-lunaris)
- [Perplexity](https://spiral.ai/integrations/perplexity/llama-3-8b-lunaris)
- [Raycast](https://spiral.ai/integrations/raycast/llama-3-8b-lunaris)
- [VS Code](https://spiral.ai/integrations/vscode/llama-3-8b-lunaris)
- [Windsurf](https://spiral.ai/integrations/windsurf/llama-3-8b-lunaris)
- [Zapier](https://spiral.ai/integrations/zapier/llama-3-8b-lunaris)

## More opencode guides

- [Ling 3.1 Flash](https://spiral.ai/integrations/opencode/ling-3-1-flash)
- [Llama 3.1 70B Instruct](https://spiral.ai/integrations/opencode/llama-3-1-70b-instruct)
- [Ling 3.0 Tiny](https://spiral.ai/integrations/opencode/ling-3-0-tiny)
- [Llama 3.1 8B Instruct](https://spiral.ai/integrations/opencode/llama-3-1-8b-instruct)
- [Ling 3.0 Flash VL](https://spiral.ai/integrations/opencode/ling-3-0-flash-vl)
- [Llama 3.1 Euryale 70B v2.2](https://spiral.ai/integrations/opencode/llama-3-1-euryale-70b-v2-2)

## Questions about Llama 3 8B Lunaris in opencode

**Can opencode use Llama 3 8B Lunaris?**

Yes. Add Spiral to opencode as an MCP server, and opencode can find and run Llama 3 8B Lunaris like any built-in tool.

**How much does Llama 3 8B Lunaris cost in opencode?**

Up to $0.00027 per run at the default inputs. $0.052 per 1M input tokens, $0.065 per 1M output tokens. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your opencode plan is separate.

**Do I need an OpenRouter account to use Llama 3 8B Lunaris in opencode?**

No. Spiral runs Llama 3 8B Lunaris on its own OpenRouter account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Llama 3 8B Lunaris in opencode?**

About two minutes: add the server, then sign in, then check it.

**Does opencode wait while Llama 3 8B Lunaris runs?**

Llama 3 8B Lunaris runs in the background. opencode starts the run, checks on it and gives you the text, json when it's ready.

**What should I use Lunaris for?**

The creator describes Lunaris as a generalist and roleplay model. Suggested starting tasks include character conversations, game dialogue, and short fiction drafts.

**Can Lunaris handle a long-running story?**

Its configuration sets an 8,192-token position limit. For an ongoing story, carry forward a short recap, essential character traits, and the current scene instead of the full transcript.

**Which settings should I try first?**

Start with the creator's recommendations: temperature 1.4 and minimum probability 0.1. The recommended prompt format is Llama 3 Instruct.

**How should I prompt Lunaris for roleplay?**

For its stated roleplay focus, try a brief containing the character's goal, voice, setting, and current conflict. Specify who controls each character and request one scene or conversational turn at a time.

**Which language is documented for Lunaris?**

The creator's repository labels Lunaris as English. Use English as the documented starting point and test other languages against your own examples.

