AI
Pass

AI Text Expander Agent Skill - AI Pass API

AI Text Expander Agent Skill - AI Pass API

Add text expansion capabilities to your AI agent. Expand triggers into full paragraphs with AI Pass API.

Quick Start

curl -X POST https://aipass.one/apikey/v1/chat/completions \
  -H "Authorization: Bearer $AIPASS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4.1-mini",
    "messages": [
      {"role": "system", "content": "Expand the trigger into a complete paragraph"},
      {"role": "user", "content": "Expand: followup"}
    ],
    "temperature": 1,
    "max_tokens": 16000
  }'

Expand Trigger

expand_trigger() {
    local trigger="$1"
    local tone="${2:-casual}"
    
    curl -s -X POST https://aipass.one/apikey/v1/chat/completions \
        -H "Authorization: Bearer $AIPASS_API_KEY" \
        -H "Content-Type: application/json" \
        -d "{
            \"model\": \"openai/gpt-4.1-mini\",
            \"messages\": [
                {
                    \"role\": \"system\",
                    \"content\": \"You are a text expansion assistant. Expand the trigger into a complete paragraph. Tone: $tone.\"
                },
                {
                    \"role\": \"user\",
                    \"content\": \"Expand: $trigger\"
                }
            ],
            \"temperature\": 1,
            \"max_tokens\": 16000
        }" | python3 -c "import json,sys; print(json.load(sys.stdin)['choices'][0]['message']['content'])"
}

expand_trigger "followup" "formal"

Python

import requests

class TextExpanderAgent:
    def __init__(self, api_key=None):
        self.api_key = api_key or os.environ.get("AIPASS_API_KEY")
        self.headers = {
            "Authorization": f"Bearer {self.api_key}",
            "Content-Type": "application/json"
        }

    def expand(self, trigger, tone="casual"):
        response = requests.post(
            "https://aipass.one/apikey/v1/chat/completions",
            headers=self.headers,
            json={
                "model": "openai/gpt-4.1-mini",
                "messages": [
                    {
                        "role": "system",
                        "content": f"Expand the trigger into a complete paragraph. Tone: {tone}."
                    },
                    {
                        "role": "user",
                        "content": f"Expand: {trigger}"
                    }
                ],
                "temperature": 1,
                "max_tokens": 16000
            }
        )
        return response.json()["choices"][0]["message"]["content"]

agent = TextExpanderAgent()
print(agent.expand("thanks", "formal"))

Cost

~$0.0002 per expansion