Skip to main content

Iroha

Iroha is Rustellar's specialized AI model for creative storytelling and narrative generation.

Overview

Iroha is built on the Mamba architecture, a state-of-the-art model specifically tuned for generating engaging, contextually rich narratives. Named after the Japanese word for "colors," Iroha brings vibrant creativity to story generation.

Key Features

Story Generation Excellence

Iroha excels at:

  • Creative fiction writing
  • Character dialogue generation
  • Plot development and narrative arcs
  • World-building and descriptions
  • Script and screenplay writing

Technical Specifications

SpecificationValue
ArchitectureMamba
Context Window16,384 tokens
Maximum Output8,192 tokens
Languages95+ languages with literary focus
Training CutoffJanuary 2025

Use Cases

Novel Writing Assistant

import requests

# 小説執筆アシスタントの設定
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a creative writing assistant. "
"Write engaging, vivid narratives with rich descriptions "
"and compelling character development."
},
{
"role": "user",
"content": "Write the opening chapter of a sci-fi novel about "
"a colony on Mars discovering ancient ruins."
}
],
"temperature": 0.9, # 高い創造性のため高めに設定
"max_tokens": 2000
}
)

print(response.json()['choices'][0]['message']['content'])

Character Dialogue Generator

# キャラクター対話生成の例
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a dialogue writer. Create natural, "
"character-driven conversations that reveal personality "
"and advance the plot."
},
{
"role": "user",
"content": "Write a tense dialogue between a detective and a "
"suspect in a noir crime story. The detective suspects "
"the person but has no proof."
}
],
"temperature": 0.85, # 自然な対話のため高めに設定
"max_tokens": 1500
}
)

print(response.json()['choices'][0]['message']['content'])

Interactive Story Generation

# インタラクティブストーリーの例
def continue_story(story_context, user_choice):
"""
ユーザーの選択に基づいてストーリーを継続
"""
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are an interactive story narrator. "
"Continue the story based on the user's choices, "
"maintaining consistency and dramatic tension."
},
{
"role": "assistant",
"content": story_context
},
{
"role": "user",
"content": f"The protagonist chooses to: {user_choice}. "
"Continue the story."
}
],
"temperature": 0.9,
"max_tokens": 1000
}
)

return response.json()['choices'][0]['message']['content']

# 使用例
initial_story = """
You stand at the entrance of a dark cave.
Strange sounds echo from within.
A mysterious light flickers in the depths.
"""

next_part = continue_story(
initial_story,
"enter the cave cautiously with torch in hand"
)

print(next_part)

Screenplay Writing

# 脚本執筆の例
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a professional screenplay writer. "
"Write in proper screenplay format with scene headings, "
"action lines, and dialogue."
},
{
"role": "user",
"content": "Write a dramatic scene where two estranged siblings "
"meet for the first time in ten years at their "
"childhood home."
}
],
"temperature": 0.8,
"max_tokens": 2000
}
)

print(response.json()['choices'][0]['message']['content'])

Performance Characteristics

Response Speed

Iroha prioritizes quality over speed:

  • Short narratives (< 500 tokens): 1-2 seconds
  • Medium stories (500-1500 tokens): 3-6 seconds
  • Long-form content (1500+ tokens): 6-15 seconds

Creativity Metrics

Iroha demonstrates exceptional performance in:

  • ✅ Narrative coherence across long texts
  • ✅ Character voice consistency
  • ✅ Descriptive and atmospheric writing
  • ✅ Plot development and pacing
  • ✅ Creative metaphors and imagery

Best Practices

Temperature Settings for Storytelling

Optimize temperature for different narrative styles:

# 構造化されたプロット(低〜中温度)
# 推奨: 0.6 - 0.8
{
"temperature": 0.7,
"use_cases": ["Structured plots", "Technical writing", "Scripts"]
}

# クリエイティブな描写(中〜高温度)
# 推奨: 0.8 - 1.0
{
"temperature": 0.9,
"use_cases": ["Creative fiction", "Poetry", "Character-driven narratives"]
}

# 実験的・抽象的表現(高温度)
# 推奨: 1.1 - 1.5
{
"temperature": 1.3,
"use_cases": ["Experimental fiction", "Stream of consciousness", "Abstract narratives"]
}

System Message for Genre Consistency

Define genre and style in system messages:

# ジャンル別システムメッセージの例

# ファンタジー
fantasy_system = {
"role": "system",
"content": "You are a fantasy author in the style of epic fantasy. "
"Use rich, archaic language and vivid world-building. "
"Focus on heroic themes and magical elements."
}

# ミステリー
mystery_system = {
"role": "system",
"content": "You are a mystery writer. Craft suspenseful narratives "
"with subtle clues and red herrings. Maintain tension and "
"reveal information strategically."
}

# SF
scifi_system = {
"role": "system",
"content": "You are a science fiction author. Ground your stories "
"in plausible science while exploring imaginative concepts. "
"Focus on technological and societal implications."
}

# ロマンス
romance_system = {
"role": "system",
"content": "You are a romance novelist. Write emotionally engaging "
"stories focused on character relationships and personal growth. "
"Balance tension with heartwarming moments."
}

Long-Form Story Generation

For multi-chapter works, use conversation history:

def generate_multi_chapter_story(premise, num_chapters=5):
"""
複数章からなるストーリーを生成
"""
messages = [
{
"role": "system",
"content": "You are a novelist. Write cohesive multi-chapter "
"stories with consistent characters and plot development."
},
{
"role": "user",
"content": f"Write a {num_chapters}-chapter story based on this "
f"premise: {premise}. Start with Chapter 1."
}
]

chapters = []

for i in range(num_chapters):
# 各章を生成
response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": messages,
"temperature": 0.9,
"max_tokens": 2000
}
)

chapter_content = response.json()['choices'][0]['message']['content']
chapters.append(chapter_content)

# 会話履歴に追加
messages.append({"role": "assistant", "content": chapter_content})

# 次の章をリクエスト(最終章でない場合)
if i < num_chapters - 1:
messages.append({
"role": "user",
"content": f"Continue with Chapter {i + 2}."
})

return chapters

# 使用例
story_chapters = generate_multi_chapter_story(
"A time traveler accidentally changes a small detail in the past, "
"leading to unexpected consequences in the present.",
num_chapters=3
)

for i, chapter in enumerate(story_chapters, 1):
print(f"\n=== Chapter {i} ===\n")
print(chapter)

Maintaining Character Consistency

Use detailed character profiles:

# キャラクター一貫性を保つためのプロンプト設計
character_profile = """
Character Profile:
- Name: Sarah Chen
- Age: 28
- Occupation: Marine biologist
- Personality: Curious, cautious, empathetic
- Speaking style: Precise, uses scientific terms, but warm
- Background: Grew up near the ocean, lost her father to a diving accident
- Current goal: Discover a new species of deep-sea creature
"""

response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": f"You are writing a story. Maintain strict character "
f"consistency with this profile:\n\n{character_profile}"
},
{
"role": "user",
"content": "Write a scene where Sarah discovers something "
"unexpected during a deep-sea dive."
}
],
"temperature": 0.85,
"max_tokens": 1500
}
)

print(response.json()['choices'][0]['message']['content'])

Pricing

Iroha uses token-based pricing:

Token TypePrice per 1M tokens
Input$0.75
Output$2.00

See our Pricing page for more details.

Comparison with Helix v1

FeatureIrohaHelix v1
Best forStory generationGeneral conversation
ArchitectureMambaTransformer
Context Window16,384 tokens8,192 tokens
Maximum Output8,192 tokens4,096 tokens
CreativityHighModerate
Response SpeedModerateFaster

Limitations

While Iroha excels at creative writing, be aware of these limitations:

  1. Speed: Slower than Helix v1 due to creative optimization
  2. Factual Tasks: Not optimized for factual Q&A or technical documentation
  3. Code Generation: Limited capability for programming tasks
  4. Structured Data: Better suited for prose than structured output
  5. Consistency: May occasionally introduce plot inconsistencies in very long narratives

Creative Writing Tips

Prompting for Better Stories

# ❌ 悪い例: 曖昧で方向性がない
"Write a story."

# ✅ 良い例: 具体的で詳細
"Write a 1500-word mystery story set in 1920s Paris. "
"The protagonist is a jazz singer who witnesses a crime. "
"Use first-person perspective and maintain a noir atmosphere. "
"Include vivid descriptions of the jazz club setting."

Using Examples for Style Transfer

# スタイル例を提供
style_example = """
The rain fell like forgotten memories, each drop a whisper of what once was.
Marcus stood beneath the awning, watching the city blur into watercolor grays.
"""

response = requests.post(
"https://api.rustellar.com/v1/chat/completions",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"model": "iroha",
"messages": [
{
"role": "system",
"content": "You are a literary fiction writer. Match the "
"writing style of the provided example."
},
{
"role": "user",
"content": f"Here's an example of the writing style to match:\n\n"
f"{style_example}\n\n"
f"Now write a paragraph about a character entering "
f"an old bookstore, using the same atmospheric style."
}
],
"temperature": 0.85,
"max_tokens": 500
}
)

print(response.json()['choices'][0]['message']['content'])

Support

For technical support or questions about Iroha: