AI
Pass

AI Essay Writer Agent Skill — AI Pass API

AI Essay Writer Agent Skill — AI Pass API

Add essay generation capability to your AI agent. This skill generates structured, academic-quality essays from topics or thesis statements.

Skill Overview

  • Name: essay-writer
  • Description: Generate structured essays from topic or thesis
  • Model: gpt-5-mini
  • API: AI Pass chat completions

Skill File

---
name: essay-writer
description: Generate structured essays from a topic or thesis statement
version: 1.0.0
---

Setup

export AIPASS_API_KEY="$AIPASS_API_KEY"

Usage

write_essay(topic, style="argumentative", word_count=800, level="undergraduate")

Implementation

import requests, os

def write_essay(
    topic: str,
    style: str = "argumentative",
    word_count: int = 800,
    level: str = "undergraduate",
    extra_instructions: str = ""
) -> str:
    system = (
        f"You are an expert academic writer. Write a well-structured {style} essay at {level} level. "
        f"Target length: {word_count} words. "
        "Structure: Introduction with clear thesis, body paragraphs, conclusion. "
        "Write in natural, engaging prose. Output the essay only."
    )
    
    user = f"Topic/Thesis: {topic}"
    if extra_instructions:
        user += f"\n\nInstructions: {extra_instructions}"
    
    r = requests.post(
        "https://aipass.one/apikey/v1/chat/completions",
        headers={
            "Authorization": f"Bearer {os.environ['AIPASS_API_KEY']}",
            "Content-Type": "application/json"
        },
        json={
            "model": "gpt-5-mini",
            "temperature": 1,
            "max_tokens": 16000,
            "messages": [
                {"role": "system", "content": system},
                {"role": "user", "content": user}
            ]
        }
    )
    return r.json()["choices"][0]["message"]["content"]

Examples

# Standard argumentative essay
essay = write_essay(
    topic="Social media has a net negative impact on democracy",
    style="argumentative",
    word_count=1000,
    level="undergraduate"
)

# Short informational piece
essay = write_essay(
    topic="How does machine learning work?",
    style="informational",
    word_count=500,
    level="high school"
)

# Professional analysis
essay = write_essay(
    topic="The future of remote work in post-pandemic enterprises",
    style="analytical",
    word_count=1200,
    level="professional",
    extra_instructions="Focus on technology sector. Include data-driven insights."
)

Supported Styles

argumentative · informational · analytical · narrative · persuasive · compare-contrast

Supported Levels

high school · undergraduate · graduate · professional

API Reference

Endpoint: POST https://aipass.one/apikey/v1/chat/completions

Get API key: aipass.one/panel/developer.html

Live App

AI Essay Writer

Skill File

---
name: essay-writer
description: Generate structured essays from topic or thesis
version: 1.0.0
---
Setup: export AIPASS_API_KEY="$AIPASS_API_KEY"
Model: gpt-5-mini, temperature:1, max_tokens:16000
Styles: argumentative, informational, analytical, narrative, persuasive, compare-contrast
Levels: high school, undergraduate, graduate, professional
Download Skill File