• Spam
    • Dermatologists don't like her!
    • Hello, open to this?
    • I need help please wire me $1000 right now
    • Hot new investment, don’t miss this!
    • Nice to know you ;)
    • Please help me?
  • Not Spam
    • Your parcel will be delivered today
    • Review changes to our Terms and Conditions
    • Weekly sync notes
    • Re: Follow up from today’s meeting
    • Pre-read for tomorrow


Confirm your email address


Confidence level

Not Spam


API Request

1import cohere
2from cohere.classify import Example
3co = cohere.Client('{apiKey}')
4response = co.classify(
5  model='embed-english-v2.0',
6  inputs=["Confirm your email address", "hey i need u to send some $"],
7  examples=[Example("Dermatologists don\'t like her!", "Spam"), Example("Hello, open to this?", "Spam"), Example("I need help please wire me $1000 right now", "Spam"), Example("Hot new investment, don’t miss this!", "Spam"), Example("Nice to know you ;)", "Spam"), Example("Please help me?", "Spam"), Example("Your parcel will be delivered today", "Not spam"), Example("Review changes to our Terms and Conditions", "Not spam"), Example("Weekly sync notes", "Not spam"), Example("Re: Follow up from today’s meeting", "Not spam"), Example("Pre-read for tomorrow", "Not spam")])
8print('The confidence levels of the labels are: {}'.format(response.classifications))