import requests
url = "https://application_id.applications.lucidworks.com/ai/prediction/keyword-extraction/{MODEL_ID}"
payload = {
"batch": [{ "text": "Joseph Robinette Biden Jr.is an American politician who is the 46th and current president of the United States. Ideologically a moderate member of the Democratic Party, he previously served as the 47th vice president from 2009 to 2017 under President Barack Obama and represented Delaware in the United States Senate from 1973 to 2009.Born in Scranton, Pennsylvania, Biden moved with his family to Delaware in 1953. He studied at the University of Delaware before earning his law degree from Syracuse University. He was elected to the New Castle County Council in 1970 and to the U.S. Senate in 1972. As a senator, Biden drafted and led the effort to pass the Violent Crime Control and Law Enforcement Act and the Violence Against Women Act. He also oversaw six U.S. Supreme Court confirmation hearings, including the contentious hearings for Robert Bork and Clarence Thomas. Biden ran unsuccessfully for the Democratic presidential nomination in 1988 and 2008. In 2008, Obama chose Biden as his running mate, and Biden was a close counselor to Obama during his two terms as vice president. In the 2020 presidential election, Biden and his running mate, Kamala Harris, defeated incumbents Donald Trump and Mike Pence. Biden is the second Catholic president in U.S. history (after John F. Kennedy), and his politics have been widely described as profoundly influenced by Catholic social teaching." }],
"useCaseConfig": { "maxKeywords": 100 }
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"predictions": [
{
"tokensUsed": {
"promptTokens": 369,
"completionTokens": 1000,
"totalTokens": 1369
},
"keywords": [
"Biden",
"United States",
"President",
"Democratic Party",
"Senate",
"Delaware",
"Obama",
"Supreme Court",
"Crime",
"Law Enforcement",
"Violence",
"Women",
"Robert Bork",
"Clarence Thomas",
"Kamala Harris",
"Donald Trump",
"Mike Pence",
"Catholic",
"Social teaching",
"Kennedy",
"Pennsylvania",
"University",
"Law degree",
"New Castle County",
"U.S. history",
"Presidential election",
"Vice president",
"Nomination",
"Running mate",
"Hearing",
"Confirmation",
"Act",
"Hearing",
"Election",
"History",
"Family",
"Scranton",
"Syracuse University",
"County Council",
"Hearing",
"Confirmation",
"Supreme Court",
"Robert Bork",
"Clarence Thomas",
"Kamala Harris",
"Donald Trump",
"Mike Pence",
"Catholic",
"Social teaching",
"Kennedy",
"Pennsylvania",
"University",
"Law degree",
"New Castle County",
"U.S. history",
"Presidential election",
"Vice president",
"Nomination",
"Running mate",
"Hearing",
"Confirmation",
"Act",
"Election",
"History",
"Family",
"Scranton",
"Syracuse University",
"County Council",
"Biden",
"United States",
"President",
"Democratic Party",
"Senate",
"Delaware",
"Obama",
"Supreme Court",
"Crime",
"Law Enforcement",
"Violence",
"Women",
"Robert Bork",
"Clarence Thomas",
"Kamala Harris",
"Donald Trump",
"Mike Pence",
"Catholic",
"Social teaching",
"Kennedy",
"Pennsylvania",
"University",
"Law degree",
"New Castle County",
"U.S. history",
"Presidential election",
"Vice president",
"Nomination",
"Running mate",
"Hearing",
"Confirmation",
"Act"
],
"response": "keywords:\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Hearing\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Hearing\n- Confirmation\n- Supreme Court\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n-"
}
]
}In the keyword-extraction use case, the LLM ingests text and returns a JSON response that contains a list of keywords extracted from the text. No options can be configured.
import requests
url = "https://application_id.applications.lucidworks.com/ai/prediction/keyword-extraction/{MODEL_ID}"
payload = {
"batch": [{ "text": "Joseph Robinette Biden Jr.is an American politician who is the 46th and current president of the United States. Ideologically a moderate member of the Democratic Party, he previously served as the 47th vice president from 2009 to 2017 under President Barack Obama and represented Delaware in the United States Senate from 1973 to 2009.Born in Scranton, Pennsylvania, Biden moved with his family to Delaware in 1953. He studied at the University of Delaware before earning his law degree from Syracuse University. He was elected to the New Castle County Council in 1970 and to the U.S. Senate in 1972. As a senator, Biden drafted and led the effort to pass the Violent Crime Control and Law Enforcement Act and the Violence Against Women Act. He also oversaw six U.S. Supreme Court confirmation hearings, including the contentious hearings for Robert Bork and Clarence Thomas. Biden ran unsuccessfully for the Democratic presidential nomination in 1988 and 2008. In 2008, Obama chose Biden as his running mate, and Biden was a close counselor to Obama during his two terms as vice president. In the 2020 presidential election, Biden and his running mate, Kamala Harris, defeated incumbents Donald Trump and Mike Pence. Biden is the second Catholic president in U.S. history (after John F. Kennedy), and his politics have been widely described as profoundly influenced by Catholic social teaching." }],
"useCaseConfig": { "maxKeywords": 100 }
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"predictions": [
{
"tokensUsed": {
"promptTokens": 369,
"completionTokens": 1000,
"totalTokens": 1369
},
"keywords": [
"Biden",
"United States",
"President",
"Democratic Party",
"Senate",
"Delaware",
"Obama",
"Supreme Court",
"Crime",
"Law Enforcement",
"Violence",
"Women",
"Robert Bork",
"Clarence Thomas",
"Kamala Harris",
"Donald Trump",
"Mike Pence",
"Catholic",
"Social teaching",
"Kennedy",
"Pennsylvania",
"University",
"Law degree",
"New Castle County",
"U.S. history",
"Presidential election",
"Vice president",
"Nomination",
"Running mate",
"Hearing",
"Confirmation",
"Act",
"Hearing",
"Election",
"History",
"Family",
"Scranton",
"Syracuse University",
"County Council",
"Hearing",
"Confirmation",
"Supreme Court",
"Robert Bork",
"Clarence Thomas",
"Kamala Harris",
"Donald Trump",
"Mike Pence",
"Catholic",
"Social teaching",
"Kennedy",
"Pennsylvania",
"University",
"Law degree",
"New Castle County",
"U.S. history",
"Presidential election",
"Vice president",
"Nomination",
"Running mate",
"Hearing",
"Confirmation",
"Act",
"Election",
"History",
"Family",
"Scranton",
"Syracuse University",
"County Council",
"Biden",
"United States",
"President",
"Democratic Party",
"Senate",
"Delaware",
"Obama",
"Supreme Court",
"Crime",
"Law Enforcement",
"Violence",
"Women",
"Robert Bork",
"Clarence Thomas",
"Kamala Harris",
"Donald Trump",
"Mike Pence",
"Catholic",
"Social teaching",
"Kennedy",
"Pennsylvania",
"University",
"Law degree",
"New Castle County",
"U.S. history",
"Presidential election",
"Vice president",
"Nomination",
"Running mate",
"Hearing",
"Confirmation",
"Act"
],
"response": "keywords:\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Hearing\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Hearing\n- Confirmation\n- Supreme Court\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n- Donald Trump\n- Mike Pence\n- Catholic\n- Social teaching\n- Kennedy\n- Pennsylvania\n- University\n- Law degree\n- New Castle County\n- U.S. history\n- Presidential election\n- Vice president\n- Nomination\n- Running mate\n- Hearing\n- Confirmation\n- Act\n- Election\n- History\n- Family\n- Scranton\n- Syracuse University\n- County Council\n- Biden\n- United States\n- President\n- Democratic Party\n- Senate\n- Delaware\n- Obama\n- Supreme Court\n- Crime\n- Law Enforcement\n- Violence\n- Women\n- Robert Bork\n- Clarence Thomas\n- Kamala Harris\n-"
}
]
}Bearer token used for authentication. Format: Authorization: Bearer ACCESS_TOKEN.
application/json
"application/json"
Unique identifier for the model.
The batch of key:value pairs used as inputs in the prediction. Up to 32 inputs per request are allowed.
32Show child attributes
Show child attributes
Provides fields and values that specify ranges for tokens. Fields used for specific use cases and models are specified. The default values are used if other values are not specified.
Show child attributes
OK
Show child attributes
Was this page helpful?