Docs/APIs/Word Opposites

Word Opposites

Get opposites of a word

OperationalCredits 20 per callp50 631msText ProcessingStar

Overview

Word Opposites sends your `word` to a Gemini language model with an instruction to act as a JSON API that returns up to five opposites. The model output is constrained to a schema holding a single array of strings, which becomes `opposites`. `word` echoes your input exactly as sent, without trimming or case changes.

The instruction also tells the model to answer in English regardless of the input language, never to return a string that is not a real English word, and to return an empty array when the input is not a real word or has no meaningful opposite. In practice that means a typo or a term like "table" can legitimately come back with `opposites: []`, which you should treat as "no antonym available" rather than as an error. If the model omits the array, the API still returns `opposites` as an empty array.

The model runs at a low sampling temperature of 0.3, so results for common words are fairly stable, but the list is not drawn from a fixed thesaurus and order or wording can vary between calls. Entries are not deduplicated or ranked by the API. Answers can include both strict antonyms and looser contrasting words, as with "cool" for "hot". Multi-word phrases are accepted as input, but answers are most reliable for single common words.

If the model's safety filter blocks the input, the request fails with a 400 error that carries the block reason. There are no plan-dependent fields.

Live Test Word Opposites API →

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

GEThttps://api.apiverve.com/v1/wordopposite
curl "https://api.apiverve.com/v1/wordopposite?word=hot" \
  -H "x-api-key: your_api_key_here"

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
wordRequiredstringThe word to get the opposites for

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "status": "ok",
  "error": null,
  "data": {
    "word": "hot",
    "opposites": [
      "cold",
      "cool",
      "chilly",
      "frozen",
      "frigid"
    ]
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
wordstring"hot"The input word analyzed for opposite words
oppositesarray[cold, ...]List of antonym words with similar opposite meaning

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

Use cases

Crossword Clue Generation
Clue authors and puzzle builders retrieve contrasting terms to construct clever definitions and dual-word crossword grids automatically.
Creative Copy Inversion
Generate punchy before-and-after advertising hooks by querying contrasting vocabulary for draft product headlines and promotional slogans.
Sentiment Polarity Testing
To calibrate lexicon-based sentiment models, data teams test opposing word pairs against text classification pipelines.
Digital Workbook Drills
When students complete a reading unit, education software pulls contrasting terms to build antonym matching drills and practice questions.

Other ways to use Word Opposites

Set up Word Opposites on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKit →Reference →
Google Sheets or ExcelA =VERVE() formula fills a column — no script, no export, recalculates in place.VerveSheets →Reference →

More in Text Processing:

Was this page helpful?