Text Processing API
Base Path: /api/v1/text-processing
These endpoints stream responses using Server-Sent Events (SSE). Your client should listen for a data event containing the final JSON payload.
POST /ai-detect
- Description: Analyzes text to determine the probability that it was generated by an AI model.
- Credit Cost: 1
- Use Case: Integrate into a content management system to flag submissions that may be AI-generated for editorial review, helping to maintain content authenticity.
- Request Body:
{"text": "string"}
Python
make_api_request("POST", "/text-processing/ai-detect", json_payload={"text": "This text might be AI generated."})POST /clone-writing-style
- Description: Analyzes a sample text and generates new content in the same style.
- Credit Cost: 5
- Use Case: Create marketing copy that matches your brand’s established tone of voice by providing a sample of past successful content.
- Request Body:
{"sample_text": "string", "new_text_prompt": "string"}
Python
make_api_request("POST", "/text-processing/clone-writing-style", json_payload={"sample_text": "...", "new_text_prompt": "..."})POST /humanize
- Description: Makes AI-generated text sound more natural and less robotic.
- Credit Cost: 3
- Use Case: Refine AI-generated blog post drafts or product descriptions to make them more engaging and relatable to a human audience.
- Request Body:
{"text": "string", "target_audience": "string"}
Python
make_api_request("POST", "/text-processing/humanize", json_payload={"text": "...", "target_audience": "general"})POST /grammar-check
- Description: Corrects grammatical errors in the provided text.
- Credit Cost: 2
- Use Case: Build a writing assistant application that provides real-time grammar and spelling suggestions to users as they type.
- Request Body:
{"text": "string"}
Python
make_api_request("POST", "/text-processing/grammar-check", json_payload={"text": "he walk to store."})POST /summarize
- Description: Creates a concise summary of a longer piece of text.
- Credit Cost: 4
- Use Case: Automatically generate executive summaries for long business reports or abstracts for academic papers.
- Request Body:
{"text": "string", "max_length": integer}
Python
make_api_request("POST", "/text-processing/summarize", json_payload={"text": "...", "max_length": 150})POST /paraphrase
- Description: Rewrites text while retaining the original meaning.
- Credit Cost: 3
- Use Case: Avoid plagiarism by rephrasing source material for research papers or generate multiple unique versions of a product description for A/B testing.
- Request Body:
{"text": "string", "creativity": float}
Python
make_api_request("POST", "/text-processing/paraphrase", json_payload={"text": "...", "creativity": 0.8})