Skip to main content

Create Text Completion

Generate text from a simple prompt without conversation state.
This endpoint is 100% OpenAI SDK compatible. Just change the base URL!

Endpoint

Required Scopes

  • text:write - Create text completions

Request Body

Response

Examples

Basic Completion

Blog Post Generation

Generate structured blog content:

Social Media Content

Generate Twitter threads:

Press Release

Generate professional press releases:

Campaign Slogans

Brainstorm creative slogans:

Fundraising Email

Generate compelling fundraising content:

With Theory of Change

Align content with strategic framework:
Theory Positions:
  • Voluntarism {x: -1, y: -1} - Grassroots mobilization
  • Structuralism {x: 1, y: -1} - Policy/systems change
  • Subjectivism {x: -1, y: 1} - Cultural transformation
  • Theurgism {x: 1, y: 1} - Faith-based activism
See the Theory of Change Guide for details.

Temperature Control

Adjust creativity vs. consistency:

Max Tokens Control

Limit output length:

Error Responses

400 Bad Request

401 Unauthorized

402 Payment Required

429 Too Many Requests

Pricing

Text completions are billed per token at $0.08 per 1,000 tokens. Token Estimation:
  • ~750 words = 1,000 tokens
  • Blog post (500 words): ~667 tokens = $0.05
  • Tweet (280 chars): ~70 tokens = $0.006
  • Press release (400 words): ~533 tokens = $0.04
Example costs:

Rate Limits

Best Practices

1. Be Specific in Prompts

2. Control Output Length

3. Adjust Temperature for Use Case

  • Factual content (temperature: 0.2-0.5) - Facts, explanations, guides
  • Balanced content (temperature: 0.7-1.0) - Blog posts, emails, articles
  • Creative content (temperature: 1.2-1.8) - Slogans, poetry, brainstorming

4. Use Theory Position for Strategic Alignment

5. Handle Errors Gracefully

Next Steps

Completions Overview

Learn about text completions

Theory of Change

Align AI with your strategic approach

Chat API

Use Chat API for conversations

Error Handling

Handle errors gracefully