Generate a vocabulary list
API version 2026-10-affable-towhee
post https://api.getlingara.com/v1/vocab/stream
Streams a list of words at the requested level. The stream sends started with the list's details, one item event per word, then done. Until the list is ready it sends keepalive comments only.
Scopes vocab:generate
Parameters
Lingara-Versionheaderstringoptional- The API version to answer this request under. Without it, an access token gets the version its client is pinned to, and a request with no token gets the current version. The version still in development is reached only by naming it here. An unknown version answers
400with codeapi_version_unknown.GET /v1/versionslists the versions.
Request body application/json
levelintegerrequiredsource_langstringrequiredtarget_langstringrequiredcountinteger | nulloptional
Responses
200 The list, one word per event
Stream events text/event-stream
Sends a keepalive comment every 15 seconds.
-
startedVocabStarted -
metaVocabMetarequiredlevelintegerrequiredsource_langstringrequiredtarget_langstringrequiredframeworkstringrequiredcountintegerrequiredai_generatedbooleanrequired
-
itemVocabItem -
wordstringrequiredpronunciationstring | nulloptionalreadingstring | nulloptionaltranslationstringrequiredexampleVocabExample | nulloptionalsentencestringrequiredtranslationstringrequired
image_urlstring | nulloptional
-
doneDone Ends the stream -
errorStreamError Ends the stream -
Arrives inside the 200 response. The status line has already been sent, so a failure after the stream opens is reported as this event.
codestringrequiredmessagestringrequiredplan_idstring | nulloptional
Errors
402application/json- A metered client's call was refused before it spent anything.
spend_cap_reached: the client or its account has reached its monthly spending limit; raise the limit on the Integrations page.metered_billing_inactive: usage billing is not active for this account; set it up, or update the payment method, on the Integrations page. 410application/json- The API version this request is answered under has been discontinued. Send a supported version in
Lingara-Version, or re-pin the client. 4XXapplication/json- The request was refused.
codesays why, anderrorsays it in words. 503application/json · text/plain- The service is temporarily unavailable; retry after the number of seconds in
Retry-After. During maintenance the body is plain text rather than the error envelope. 5XXapplication/json- The request was refused.
codesays why, anderrorsays it in words.
codestringrequiredWhy the request was refused, as a stable code to branch on: for example
insufficient_scope(403),rate_limited(429) and, for a metered client,spend_cap_reached(402) andmetered_billing_inactive(402).errorstringrequired
Example
Prefer a library? See the Libraries section.
Example stream
event: started
data: {"meta":{"level":2,"source_lang":"en","target_lang":"zh","framework":"HSK","count":2,"ai_generated":true}}
event: item
data: {"word":"你好","pronunciation":"nǐ hǎo","translation":"hello","example":{"sentence":"你好,我叫小明。","translation":"Hello, my name is Xiaoming."}}
event: item
data: {"word":"谢谢","pronunciation":"xiè xie","translation":"thank you"}
event: done
data: {}