Skip to main content
The Nexus Text Generation endpoint lets you produce high-quality written content programmatically. You send a prompt along with optional parameters to control the output length, language, tone, and generation mode. Nexus AI returns the generated text alongside token usage information so you can monitor consumption against your plan. Endpoint
POST https://api.verbosec.com/v1/text/generate

Request parameters

prompt
string
required
The input prompt that guides text generation. Be as specific as possible — a detailed prompt produces more accurate and useful output.
max_tokens
integer
The maximum number of tokens to include in the generated response. Defaults to 1000. Setting a lower value reduces cost and latency; setting a higher value allows for longer outputs.
language
string
The BCP-47 language code for the output language — for example, "en", "fr", or "es". Defaults to "en".
tone
string
The writing tone applied to the output. Accepted values are "formal", "casual", and "academic". Defaults to "formal".
mode
string
The generation mode that controls how Nexus AI processes the prompt. Accepted values are "write" (generate new content), "rewrite" (rewrite provided content), and "paraphrase" (rephrase in different words). Defaults to "write".

Example request

generate-text.sh
curl -X POST https://api.verbosec.com/v1/text/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Write a 500-word blog post about sustainable travel",
    "max_tokens": 700,
    "language": "en",
    "tone": "casual"
  }'

Example response

response.json
{
  "id": "gen_abc123",
  "text": "Sustainable travel is more than a trend...",
  "tokens_used": 682,
  "language": "en",
  "created_at": "2025-01-15T10:30:00Z"
}

Response fields

id
string
A unique identifier for this generation request. Use this ID to reference the result in support requests or logs.
text
string
The generated text content produced by Nexus AI in response to your prompt.
tokens_used
integer
The number of tokens consumed by this request, counting both the input prompt and the generated output.
language
string
The language code of the generated output, reflecting the language parameter you passed in the request.
created_at
string
An ISO 8601 timestamp indicating when the generation was completed.

Plagiarism check

Run a plagiarism check on any text to detect potential matches against publicly available web content. This endpoint is useful for verifying generated content or reviewing submitted material before publication. Endpoint
POST https://api.verbosec.com/v1/plagiarism/check

Request parameters

text
string
required
The text content you want to check for plagiarism. Submit the full content as a plain string.

Example request

check-plagiarism.sh
curl -X POST https://api.verbosec.com/v1/plagiarism/check \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Artificial intelligence is transforming how businesses operate, enabling automation of complex tasks that previously required human judgment."
  }'

Example response

plagiarism-response.json
{
  "id": "plag_rst567",
  "score": 0.12,
  "verdict": "mostly_original",
  "matches": [
    {
      "url": "https://example.com/article-about-ai",
      "similarity": 0.12,
      "excerpt": "enabling automation of complex tasks that previously required human judgment"
    }
  ],
  "created_at": "2025-01-15T10:35:00Z"
}

Response fields

id
string
A unique identifier for this plagiarism check request.
score
float
An overall similarity score between 0.0 (fully original) and 1.0 (identical match). Values below 0.2 are generally considered acceptable for most publishing contexts.
verdict
string
A human-readable summary of the result. Possible values are "original", "mostly_original", "mixed", and "plagiarised".
matches
array
An array of match objects describing the specific passages that were flagged.
created_at
string
An ISO 8601 timestamp indicating when the check was completed.

Error responses

Returned when the prompt field is absent from the request body.
400-response.json
{
  "error": {
    "code": "missing_required_field",
    "message": "The 'prompt' field is required."
  }
}
Returned when your API key is missing or invalid. See the Authentication guide for help.
401-response.json
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid or missing API key."
  }
}
Returned when you have exceeded your plan’s request quota. Wait the number of seconds indicated in the Retry-After response header before retrying.
429-response.json
{
  "error": {
    "code": "rate_limit_exceeded",
    "message": "You have exceeded your plan's rate limit. Please wait before retrying."
  }
}