openapi: 3.1.0 info: title: API Reference version: "1.0" description: |- The Cohere Platform is centered around models. Each model has a different amount of power (i.e. parameters), to be used for different tasks. Cohere also supports finetuning of baseline models to improve performance on downstream tasks or to teach the model large quantities of information which cannot be extracted with few-shot learning or prompt engineering. summary: Cohere's API contact: name: Cohere Developers url: https://cohere.com/ email: team@cohere.com termsOfService: https://cohere.com/terms-of-use license: name: proprietary url: https://cohere.com/terms-of-use servers: - url: https://api.cohere.com description: production security: - bearerAuth: [] tags: - name: /datasets description: Datasets API - name: /connectors description: Connectors API - name: /embed-jobs description: Embed Jobs API - name: /finetuning description: Finetuning API (Beta) paths: /v1/chat: post: parameters: - $ref: "#/components/parameters/RequestSource" - name: Accepts description: | Pass text/event-stream to receive the streamed response as server-sent events. The default is `\n` delimited events. x-fern-audiences: - public schema: type: string enum: - text/event-stream in: header required: false example: text/event-stream x-fern-audiences: - public summary: Chat operationId: chat x-fern-streaming: stream-description: | Generates a streamed text response to a user message. To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api). stream-condition: $request.stream response: required: - text x-fern-type-name: NonStreamedChatResponse properties: text: type: string x-fern-audiences: - public minLength: 1 description: Contents of the reply generated by the model. generation_id: type: string x-fern-audiences: - public format: uuid description: Unique identifier for the generated reply. Useful for submitting feedback. response_id: type: string x-fern-audiences: - public format: uuid description: Unique identifier for the response. citations: type: array x-fern-audiences: - public minItems: 0 description: Inline citations for the generated reply. items: $ref: "#/components/schemas/ChatCitation" documents: type: array x-fern-audiences: - public minItems: 0 description: Documents seen by the model when generating the reply. items: $ref: "#/components/schemas/ChatDocument" is_search_required: type: boolean x-fern-audiences: - public description: Denotes that a search for documents is required during the RAG flow. search_queries: type: array x-fern-audiences: - public description: Generated search queries, meant to be used as part of the RAG flow. items: $ref: "#/components/schemas/ChatSearchQuery" search_results: type: array x-fern-audiences: - public minItems: 0 description: Documents retrieved from each of the conducted searches. items: $ref: "#/components/schemas/ChatSearchResult" finish_reason: x-fern-audiences: - public $ref: "#/components/schemas/FinishReason" tool_calls: x-fern-audiences: - public type: array items: $ref: "#/components/schemas/ToolCall" chat_history: type: array x-fern-audiences: - public minItems: 0 items: $ref: "#/components/schemas/Message" description: | A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's `message`. meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public response-stream: description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). x-fern-type-name: StreamedChatResponse oneOf: - $ref: "#/components/schemas/ChatStreamStartEvent" - $ref: "#/components/schemas/ChatSearchQueriesGenerationEvent" - $ref: "#/components/schemas/ChatSearchResultsEvent" - $ref: "#/components/schemas/ChatTextGenerationEvent" - $ref: "#/components/schemas/ChatCitationGenerationEvent" - $ref: "#/components/schemas/ChatToolCallsGenerationEvent" - $ref: "#/components/schemas/ChatStreamEndEvent" - $ref: "#/components/schemas/ChatToolCallsChunkEvent" - $ref: "#/components/schemas/ChatDebugEvent" discriminator: propertyName: event_type mapping: stream-start: "#/components/schemas/ChatStreamStartEvent" search-queries-generation: "#/components/schemas/ChatSearchQueriesGenerationEvent" search-results: "#/components/schemas/ChatSearchResultsEvent" text-generation: "#/components/schemas/ChatTextGenerationEvent" citation-generation: "#/components/schemas/ChatCitationGenerationEvent" tool-calls-generation: "#/components/schemas/ChatToolCallsGenerationEvent" stream-end: "#/components/schemas/ChatStreamEndEvent" tool-calls-chunk: "#/components/schemas/ChatToolCallsChunkEvent" debug: "#/components/schemas/ChatDebugEvent" x-fern-examples: - code-samples: - sdk: go name: Default code: > package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Chat( context.TODO(), &cohere.ChatRequest{ ChatHistory: []*cohere.Message{ { Role: "USER", User: &cohere.ChatMessage{ Message: "Who discovered gravity?", }, }, { Role: "CHATBOT", Chatbot: &cohere.ChatMessage{ Message: "The man who is widely credited with discovering gravity is Sir Isaac Newton", }, }}, Message: "What year was he born?", Connectors: []*cohere.ChatConnector{ {Id: "web-search"}, }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Default code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const response = await cohere.chat({ chatHistory: [ { role: 'USER', message: 'Who discovered gravity?' }, { role: 'CHATBOT', message: 'The man who is widely credited with discovering gravity is Sir Isaac Newton', }, ], message: 'What year was he born?', // perform web search before answering the question. You can also use your own custom connector. connectors: [{ id: 'web-search' }], }); console.log(response); })(); - sdk: java name: Default code: > /* (C)2024 */ package chatpost; import com.cohere.api.Cohere; import com.cohere.api.requests.ChatRequest; import com.cohere.api.types.ChatMessage; import com.cohere.api.types.Message; import com.cohere.api.types.NonStreamedChatResponse; import java.util.List; public class Default { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); NonStreamedChatResponse response = cohere.chat( ChatRequest.builder() .message("What year was he born?") .chatHistory( List.of( Message.user( ChatMessage.builder().message("Who discovered gravity?").build()), Message.chatbot( ChatMessage.builder() .message( "The man who is widely" + " credited with" + " discovering gravity" + " is Sir Isaac" + " Newton") .build()))) .build()); System.out.println(response); } } - sdk: python name: Sync code: > import cohere co = cohere.Client() response = co.chat( chat_history=[ {"role": "USER", "message": "Who discovered gravity?"}, { "role": "CHATBOT", "message": "The man who is widely credited with discovering gravity is Sir Isaac Newton", }, ], message="What year was he born?", # perform web search before answering the question. You can also use your own custom connector. connectors=[{"id": "web-search"}], ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): return await co.chat( chat_history=[ {"role": "USER", "message": "Who discovered gravity?"}, { "role": "CHATBOT", "message": "The man who is widely credited with discovering gravity is Sir Isaac Newton", }, ], message="What year was he born?", # perform web search before answering the question. You can also use your own custom connector. connectors=[{"id": "web-search"}], ) asyncio.run(main()) - sdk: curl name: Default code: >- curl --request POST \ --url https://api.cohere.com/v1/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "chat_history": [ { "role": "USER", "message": "Who discovered gravity?" }, { "role": "CHATBOT", "message": "The man who is widely credited with discovering gravity is Sir Isaac Newton" } ], "message": "What year was he born?", "connectors": [ { "id": "web-search" } ] }' request: chat_history: - role: USER message: Who discovered gravity? - role: CHATBOT message: The man who is widely credited with discovering gravity is Sir Isaac Newton message: What year was he born? connectors: - id: web-search stream: false response: body: text: Isaac Newton was born on 25 December 1642 (Old Style) or 4 January 1643 (New Style). generation_id: 0385c7cf-4247-43a3-a450-b25b547a31e1 chat_history: - role: USER message: Who discovered gravity? - role: CHATBOT message: The man who is widely credited with discovering gravity is Sir Isaac Newton - role: USER message: What year was he born? - role: CHATBOT message: Isaac Newton was born on 25 December 1642 (Old Style) or 4 January 1643 (New Style). finish_reason: COMPLETE meta: api_version: version: "1" billed_units: input_tokens: 31738 output_tokens: 35 tokens: input_tokens: 32465 output_tokens: 205 citations: - start: 25 end: 41 text: 25 December 1642 document_ids: - web-search_0 - web-search_1 - web-search_2 - web-search_3 - web-search_4 - web-search_5 - start: 42 end: 53 text: (Old Style) document_ids: - web-search_0 - web-search_1 - web-search_4 - web-search_5 - start: 57 end: 71 text: 4 January 1643 document_ids: - web-search_0 - web-search_1 - web-search_3 - web-search_4 - web-search_5 - start: 72 end: 83 text: (New Style) document_ids: - web-search_0 - web-search_1 - web-search_4 - web-search_5 documents: - id: web-search_0 snippet: >- New Articles History & Society Lifestyles & Social Issues Philosophy & Religion Politics, Law & Government World History Science & Tech Technology Biographies Browse Biographies Animals & Nature Birds, Reptiles & Other Vertebrates Bugs, Mollusks & Other Invertebrates Fossils & Geologic Time Plants Geography & Travel Geography & Travel Arts & Culture Entertainment & Pop Culture Ask the Chatbot Games & Quizzes History & Society Science & Tech Biographies Animals & Nature Geography & Travel Arts & Culture Money Videos Introduction & Top Questions Formative influences Influence of the Scientific Revolution Work during the plague years Inaugural lectures at Trinity Influence of the Hermetic tradition Universal gravitation International prominence Interest in religion and theology Leader of English science Final years Quotes References & Edit History Quick Facts & Related Topics Isaac Newton Timeline Isaac Newton’s Achievements Understanding Newton’s Laws of Motion Numbers and Mathematics Physics and Natural Law What is Isaac Newton most famous for? How was Isaac Newton educated? What was Isaac Newton’s childhood like? What is the Scientific Revolution? How is the Scientific Revolution connected to the Enlightenment? Gravity: From Apples to the Universe Telescopes: Seeing Stars Unusual Counting Systems What's the Difference Between Speed and Velocity? Is Zero an Even or an Odd Number? The 10 Greatest Basketball Players of All Time What Is a Modern Pentathlon? Which Religion Is the Oldest? What's the Difference Between a Solstice and an Equinox? New Seven Wonders of the World Is It True That Squirrels Forget Where They Bury About Half of Their Food? America’s 5 Most Notorious Cold Cases (Including One You May Have Thought Was Already Solved) Isaac Newton, oil painting by Sir Godfrey Kneller, 1702; in the National Portrait Gallery, London. Newton's discoveries in physics and mathematics revolutionized science.(more) English physicist and mathematician While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions. Select Citation Style Chicago Manual of Style Share to social media URL https://www.britannica.com/biography/Isaac-Newton Thank you for your feedback Our editors will review what you’ve submitted and determine whether to revise the article. Isaac Newton Institute of Mathematical Sciences - Who was Isaac Newton? Science Kids - Fun Science and Technology for Kids - Biography of Isaac Newton Trinity College Dublin - School of mathematics - Biography of Sir Isaac Newton World History Encyclopedia - Isaac Newton Stanford Encyclopedia of Philosophy - Biography of Isaac Newton University of British Columbia - Physics and Astronomy Department - The Life and Work of Newton LiveScience - Biography of Isaac Newton Physics LibreTexts - Newton's Laws of Motion Articles from Britannica Encyclopedias for elementary and high school students. Isaac Newton - Children's Encyclopedia (Ages 8-11) Isaac Newton - Student Encyclopedia (Ages 11 and up) Please select which sections you would like to print: While every effort has been made to follow citation style rules, there may be some discrepancies. Please refer to the appropriate style manual or other sources if you have any questions. Select Citation Style Chicago Manual of Style Share to social media URL https://www.britannica.com/biography/Isaac-Newton Feedback Thank you for your feedback Our editors will review what you’ve submitted and determine whether to revise the article. Isaac Newton Institute of Mathematical Sciences - Who was Isaac Newton? Science Kids - Fun Science and Technology for Kids - Biography of Isaac Newton Trinity College Dublin - School of mathematics - Biography of Sir Isaac Newton World History Encyclopedia - Isaac Newton Stanford Encyclopedia of Philosophy - Biography of Isaac Newton University of British Columbia - Physics and Astronomy Department - The Life and Work of Newton LiveScience - Biography of Isaac Newton Physics LibreTexts - Newton's Laws of Motion Articles from Britannica Encyclopedias for elementary and high school students. Isaac Newton - Children's Encyclopedia (Ages 8-11) Isaac Newton - Student Encyclopedia (Ages 11 and up) Also known as: Sir Isaac Newton Professor of History of Science, Indiana University, Bloomington, 1963–89. Author of Never at Rest: A Biography of Isaac Newton and others. The Editors of Encyclopaedia Britannica Encyclopaedia Britannica's editors oversee subject areas in which they have extensive knowledge, whether from years of experience gained by working on that content or via study for an advanced degree. They write new content and verify and edit content received from contributors. The Editors of Encyclopaedia Britannica Last Updated: Jul 23, 2024 • Article History Table of Contents Sir Isaac Newton (Show more) December 25, 1642 [January 4, 1643, New Style], Woolsthorpe, Lincolnshire, England (Show more) March 20 [March 31], 1727, London (aged 84) (Show more) “The Method of Fluxions and Infinite Series” (Show more) Newton’s laws of motion white light (Show more) Scientific Revolution (Show more) Isaac Newton Institute of Mathematical Sciences - Who was Isaac Newton? (July 23, 2024) (Show more) See all related content → What is Isaac Newton most famous for? Although Isaac Newton is well known for his discoveries in optics (white light composition) and mathematics (calculus), it is his formulation of the three laws of motion—the basic principles of modern physics—for which he is most famous. His formulation of the laws of motion resulted in the law of universal gravitation. How was Isaac Newton educated? After interrupted attendance at the grammar school in Grantham, Lincolnshire, England, Isaac Newton finally settled down to prepare for university, going on to Trinity College, Cambridge, in 1661, somewhat older than his classmates. There he immersed himself in Aristotle’s work and discovered the works of René Descartes before graduating in 1665 with a bachelor’s degree. What was Isaac Newton’s childhood like? Isaac Newton was born to a widowed mother (his father died three months prior) and was not expected to survive, being tiny and weak. Shortly thereafter Newton was sent by his stepfather, the well-to-do minister Barnabas Smith, to live with his grandmother and was separated from his mother until Smith’s death in 1653. What did Isaac Newton write? Isaac Newton is widely known for his published work Philosophiae Naturalis Principia Mathematica (1687), commonly known as the Principia. His laws of motion first appeared in this work. It is one of the most important single works in the history of modern science. Consider how Isaac Newton's discovery of gravity led to a better understanding of planetary motion Isaac Newton's formulation of the law of universal gravitation.(more)See all videos for this article Isaac Newton (born December 25, 1642 [January 4, 1643, New Style], Woolsthorpe, Lincolnshire, England—died March 20 [March 31], 1727, London) was an English physicist and mathematician who was the culminating figure of the Scientific Revolution of the 17th century. In optics, his discovery of the composition of white light integrated the phenomena of colours into the science of light and laid the foundation for modern physical optics. In mechanics, his three laws of motion, the basic principles of modern physics, resulted in the formulation of the law of universal gravitation. In mathematics, he was the original discoverer of the infinitesimal calculus. Newton’s Philosophiae Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy, 1687) was one of the most important single works in the history of modern science. Formative influences Born in the hamlet of Woolsthorpe, Newton was the only son of a local yeoman, also Isaac Newton, who had died three months before, and of Hannah Ayscough. That same year, at Arcetri near Florence, Galileo Galilei had died; Newton would eventually pick up his idea of a mathematical science of motion and bring his work to full fruition. A tiny and weak baby, Newton was not expected to survive his first day of life, much less 84 years. Deprived of a father before birth, he soon lost his mother as well, for within two years she married a second time; her husband, the well-to-do minister Barnabas Smith, left young Isaac with his grandmother and moved to a neighbouring village to raise a son and two daughters. For nine years, until the death of Barnabas Smith in 1653, Isaac was effectively separated from his mother, and his pronounced psychotic tendencies have been ascribed to this traumatic event. That he hated his stepfather we may be sure. When he examined the state of his soul in 1662 and compiled a catalog of sins in shorthand, he remembered “Threatning my father and mother Smith to burne them and the house over them.” The acute sense of insecurity that rendered him obsessively anxious when his work was published and irrationally violent when he defended it accompanied Newton throughout his life and can plausibly be traced to his early years. After his mother was widowed a second time, she determined that her first-born son should manage her now considerable property. It quickly became apparent, however, that this would be a disaster, both for the estate and for Newton. He could not bring himself to concentrate on rural affairs—set to watch the cattle, he would curl up under a tree with a book. Fortunately, the mistake was recognized, and Newton was sent back to the grammar school in Grantham, where he had already studied, to prepare for the university. As with many of the leading scientists of the age, he left behind in Grantham anecdotes about his mechanical ability and his skill in building models of machines, such as clocks and windmills. At the school he apparently gained a firm command of Latin but probably received no more than a smattering of arithmetic. By June 1661 he was ready to matriculate at Trinity College, Cambridge, somewhat older than the other undergraduates because of his interrupted education. Influence of the Scientific Revolution When Newton arrived in Cambridge in 1661, the movement now known as the Scientific Revolution was well advanced, and many of the works basic to modern science had appeared. Astronomers from Nicolaus Copernicus to Johannes Kepler had elaborated the heliocentric system of the universe. Galileo had proposed the foundations of a new mechanics built on the principle of inertia. Led by René Descartes, philosophers had begun to formulate a new conception of nature as an intricate, impersonal, and inert machine. Yet as far as the universities of Europe, including Cambridge, were concerned, all this might well have never happened. They continued to be the strongholds of outmoded Aristotelianism, which rested on a geocentric view of the universe and dealt with nature in qualitative rather than quantitative terms. Physics and Natural Law Like thousands of other undergraduates, Newton began his higher education by immersing himself in Aristotle’s work. Even though the new philosophy was not in the curriculum, it was in the air. Some time during his undergraduate career, Newton discovered the works of the French natural philosopher Descartes and the other mechanical philosophers, who, in contrast to Aristotle, viewed physical reality as composed entirely of particles of matter in motion and who held that all the phenomena of nature result from their mechanical interaction. A new set of notes, which he entitled “Quaestiones Quaedam Philosophicae” (“Certain Philosophical Questions”), begun sometime in 1664, usurped the unused pages of a notebook intended for traditional scholastic exercises; under the title he entered the slogan “Amicus Plato amicus Aristoteles magis amica veritas” (“Plato is my friend, Aristotle is my friend, but my best friend is truth”). Newton’s scientific career had begun. The “Quaestiones” reveal that Newton had discovered the new conception of nature that provided the framework of the Scientific Revolution. He had thoroughly mastered the works of Descartes and had also discovered that the French philosopher Pierre Gassendi had revived atomism, an alternative mechanical system to explain nature. The “Quaestiones” also reveal that Newton already was inclined to find the latter a more attractive philosophy than Cartesian natural philosophy, which rejected the existence of ultimate indivisible particles. The works of the 17th-century chemist Robert Boyle provided the foundation for Newton’s considerable work in chemistry. Significantly, he had read Henry More, the Cambridge Platonist, and was thereby introduced to another intellectual world, the magical Hermetic tradition, which sought to explain natural phenomena in terms of alchemical and magical concepts. The two traditions of natural philosophy, the mechanical and the Hermetic, antithetical though they appear, continued to influence his thought and in their tension supplied the fundamental theme of his scientific career. Are you a student? Get a special academic rate on Britannica Premium. Learn More Although he did not record it in the “Quaestiones,” Newton had also begun his mathematical studies. He again started with Descartes, from whose La Géometrie he branched out into the other literature of modern analysis with its application of algebraic techniques to problems of geometry. He then reached back for the support of classical geometry. Within little more than a year, he had mastered the literature; and, pursuing his own line of analysis, he began to move into new territory. He discovered the binomial theorem, and he developed the calculus, a more powerful form of analysis that employs infinitesimal considerations in finding the slopes of curves and areas under curves. By 1669 Newton was ready to write a tract summarizing his progress, De Analysi per Aequationes Numeri Terminorum Infinitas (“On Analysis by Infinite Series”), which circulated in manuscript through a limited circle and made his name known. During the next two years he revised it as De methodis serierum et fluxionum (“On the Methods of Series and Fluxions”). The word fluxions, Newton’s private rubric, indicates that the calculus had been born. Despite the fact that only a handful of savants were even aware of Newton’s existence, he had arrived at the point where he had become the leading mathematician in Europe. Work during the plague years Who created the color wheel? For millennia, many believed Aristotle's theory that all colors were a mixture of black and white. How did we learn otherwise?(more)See all videos for this article When Newton received the bachelor’s degree in April 1665, the most remarkable undergraduate career in the history of university education had passed unrecognized. On his own, without formal guidance, he had sought out the new philosophy and the new mathematics and made them his own, but he had confined the progress of his studies to his notebooks. Then, in 1665, the plague closed the university, and for most of the following two years he was forced to stay at his home, contemplating at leisure what he had learned. During the plague years Newton laid the foundations of the calculus and extended an earlier insight into an essay, “Of Colours,” which contains most of the ideas elaborated in his Opticks. It was during this time that he examined the elements of circular motion and, applying his analysis to the Moon and the planets, derived the inverse square relation that the radially directed force acting on a planet decreases with the square of its distance from the Sun—which was later crucial to the law of universal gravitation. The world heard nothing of these discoveries. timestamp: 2024-08-15T20:57:35 title: Isaac Newton | Biography, Facts, Discoveries, Laws, & Inventions | Britannica url: https://www.britannica.com/biography/Isaac-Newton - id: web-search_1 snippet: >- Sir Isaac Newton FRS (25 December 1642 – 20 March 1726/27) was an English polymath active as a mathematician, physicist, astronomer, alchemist, theologian, and author who was described in his time as a natural philosopher. He was a key figure in the Scientific Revolution and the Enlightenment that followed. His pioneering book Philosophiæ Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy), first published in 1687, consolidated many previous results and established classical mechanics. Newton also made seminal contributions to optics, and shares credit with German mathematician Gottfried Wilhelm Leibniz for formulating infinitesimal calculus, though he developed calculus years before Leibniz. In the Principia, Newton formulated the laws of motion and universal gravitation that formed the dominant scientific viewpoint for centuries until it was superseded by the theory of relativity. He used his mathematical description of gravity to derive Kepler's laws of planetary motion, account for tides, the trajectories of comets, the precession of the equinoxes and other phenomena, eradicating doubt about the Solar System's heliocentricity. He demonstrated that the motion of objects on Earth and celestial bodies could be accounted for by the same principles. Newton's inference that the Earth is an oblate spheroid was later confirmed by the geodetic measurements of Maupertuis, La Condamine, and others, convincing most European scientists of the superiority of Newtonian mechanics over earlier systems. He built the first practical reflecting telescope and developed a sophisticated theory of colour based on the observation that a prism separates white light into the colours of the visible spectrum. His work on light was collected in his highly influential book Opticks, published in 1704. He formulated an empirical law of cooling, which was the first heat transfer formulation, made the first theoretical calculation of the speed of sound, and introduced the notion of a Newtonian fluid. Furthermore, he made early investigations into electricity, with an idea from his book Opticks arguably the beginning of the field theory of the electric force. In addition to his work on calculus, as a mathematician, he contributed to the study of power series, generalised the binomial theorem to non-integer exponents, developed a method for approximating the roots of a function, and classified most of the cubic plane curves. Newton was a fellow of Trinity College and the second Lucasian Professor of Mathematics at the University of Cambridge. He was a devout but unorthodox Christian who privately rejected the doctrine of the Trinity. He refused to take holy orders in the Church of England, unlike most members of the Cambridge faculty of the day. Beyond his work on the mathematical sciences, Newton dedicated much of his time to the study of alchemy and biblical chronology, but most of his work in those areas remained unpublished until long after his death. Politically and personally tied to the Whig party, Newton served two brief terms as Member of Parliament for the University of Cambridge, in 1689–1690 and 1701–1702. He was knighted by Queen Anne in 1705 and spent the last three decades of his life in London, serving as Warden (1696–1699) and Master (1699–1727) of the Royal Mint, as well as president of the Royal Society (1703–1727). Isaac Newton was born (according to the Julian calendar in use in England at the time) on Christmas Day, 25 December 1642 (NS 4 January 1643) at Woolsthorpe Manor in Woolsthorpe-by-Colsterworth, a hamlet in the county of Lincolnshire. His father, also named Isaac Newton, had died three months before. Born prematurely, Newton was a small child; his mother Hannah Ayscough reportedly said that he could have fit inside a quart mug. When Newton was three, his mother remarried and went to live with her new husband, the Reverend Barnabas Smith, leaving her son in the care of his maternal grandmother, Margery Ayscough (née Blythe). Newton disliked his stepfather and maintained some enmity towards his mother for marrying him, as revealed by this entry in a list of sins committed up to the age of 19: "Threatening my father and mother Smith to burn them and the house over them." Newton's mother had three children (Mary, Benjamin, and Hannah) from her second marriage. From the age of about twelve until he was seventeen, Newton was educated at The King's School in Grantham, which taught Latin and Ancient Greek and probably imparted a significant foundation of mathematics. He was removed from school by his mother and returned to Woolsthorpe-by-Colsterworth by October 1659. His mother, widowed for the second time, attempted to make him a farmer, an occupation he hated. Henry Stokes, master at The King's School, persuaded his mother to send him back to school. Motivated partly by a desire for revenge against a schoolyard bully, he became the top-ranked student, distinguishing himself mainly by building sundials and models of windmills. University of Cambridge In June 1661, Newton was admitted to Trinity College at the University of Cambridge. His uncle the Reverend William Ayscough, who had studied at Cambridge, recommended him to the university. At Cambridge, Newton started as a subsizar, paying his way by performing valet duties until he was awarded a scholarship in 1664, which covered his university costs for four more years until the completion of his MA. At the time, Cambridge's teachings were based on those of Aristotle, whom Newton read along with then more modern philosophers, including Descartes and astronomers such as Galileo Galilei and Thomas Street. He set down in his notebook a series of "Quaestiones" about mechanical philosophy as he found it. In 1665, he discovered the generalised binomial theorem and began to develop a mathematical theory that later became calculus. Soon after Newton obtained his BA degree at Cambridge in August 1665, the university temporarily closed as a precaution against the Great Plague. Although he had been undistinguished as a Cambridge student, Newton's private studies at his home in Woolsthorpe over the next two years saw the development of his theories on calculus, optics, and the law of gravitation. In April 1667, Newton returned to the University of Cambridge, and in October he was elected as a fellow of Trinity. Fellows were required to take holy orders and be ordained as Anglican priests, although this was not enforced in the Restoration years, and an assertion of conformity to the Church of England was sufficient. He made the commitment that "I will either set Theology as the object of my studies and will take holy orders when the time prescribed by these statutes [7 years] arrives, or I will resign from the college." Up until this point he had not thought much about religion and had twice signed his agreement to the Thirty-nine Articles, the basis of Church of England doctrine. By 1675 the issue could not be avoided, and by then his unconventional views stood in the way. His academic work impressed the Lucasian professor Isaac Barrow, who was anxious to develop his own religious and administrative potential (he became master of Trinity College two years later); in 1669, Newton succeeded him, only one year after receiving his MA. The terms of the Lucasian professorship required that the holder not be active in the church – presumably to leave more time for science. Newton argued that this should exempt him from the ordination requirement, and King Charles II, whose permission was needed, accepted this argument; thus, a conflict between Newton's religious views and Anglican orthodoxy was averted. The Lucasian Professor of Mathematics at Cambridge position included the responsibility of instructing geography. In 1672, and again in 1681, Newton published a revised, corrected, and amended edition of the Geographia Generalis, a geography textbook first published in 1650 by the then-deceased Bernhardus Varenius. In the Geographia Generalis, Varenius attempted to create a theoretical foundation linking scientific principles to classical concepts in geography, and considered geography to be a mix between science and pure mathematics applied to quantifying features of the Earth. While it is unclear if Newton ever lectured in geography, the 1733 Dugdale and Shaw English translation of the book stated Newton published the book to be read by students while he lectured on the subject. The Geographia Generalis is viewed by some as the dividing line between ancient and modern traditions in the history of geography, and Newton's involvement in the subsequent editions is thought to be a large part of the reason for this enduring legacy. Newton was elected a Fellow of the Royal Society (FRS) in 1672. Newton's work has been said "to distinctly advance every branch of mathematics then studied". His work on the subject, usually referred to as fluxions or calculus, seen in a manuscript of October 1666, is now published among Newton's mathematical papers. His work De analysi per aequationes numero terminorum infinitas, sent by Isaac Barrow to John Collins in June 1669, was identified by Barrow in a letter sent to Collins that August as the work "of an extraordinary genius and proficiency in these things". Newton later became involved in a dispute with Leibniz over priority in the development of calculus. Most modern historians believe that Newton and Leibniz developed calculus independently, although with very different mathematical notations. However, it is established that Newton came to develop calculus much earlier than Leibniz. Leibniz's notation and "differential Method", nowadays recognised as much more convenient notations, were adopted by continental European mathematicians, and after 1820 or so, also by British mathematicians. His work extensively uses calculus in geometric form based on limiting values of the ratios of vanishingly small quantities: in the Principia itself, Newton gave demonstration of this under the name of "the method of first and last ratios" and explained why he put his expositions in this form, remarking also that "hereby the same thing is performed as by the method of indivisibles." Because of this, the Principia has been called "a book dense with the theory and application of the infinitesimal calculus" in modern times and in Newton's time "nearly all of it is of this calculus." His use of methods involving "one or more orders of the infinitesimally small" is present in his De motu corporum in gyrum of 1684 and in his papers on motion "during the two decades preceding 1684". Newton had been reluctant to publish his calculus because he feared controversy and criticism. He was close to the Swiss mathematician Nicolas Fatio de Duillier. In 1691, Duillier started to write a new version of Newton's Principia, and corresponded with Leibniz. In 1693, the relationship between Duillier and Newton deteriorated and the book was never completed. Starting in 1699, other members of the Royal Society accused Leibniz of plagiarism. The dispute then broke out in full force in 1711 when the Royal Society proclaimed in a study that it was Newton who was the true discoverer and labelled Leibniz a fraud; it was later found that Newton wrote the study's concluding remarks on Leibniz. Thus began the bitter controversy which marred the lives of both Newton and Leibniz until the latter's death in 1716. Newton is generally credited with the generalised binomial theorem, valid for any exponent. He discovered Newton's identities, Newton's method, classified cubic plane curves (polynomials of degree three in two variables), made substantial contributions to the theory of finite differences, and was the first to use fractional indices and to employ coordinate geometry to derive solutions to Diophantine equations. He approximated partial sums of the harmonic series by logarithms (a precursor to Euler's summation formula) and was the first to use power series with confidence and to revert power series. Newton's work on infinite series was inspired by Simon Stevin's decimals. In 1666, Newton observed that the spectrum of colours exiting a prism in the position of minimum deviation is oblong, even when the light ray entering the prism is circular, which is to say, the prism refracts different colours by different angles. This led him to conclude that colour is a property intrinsic to light – a point which had, until then, been a matter of debate. From 1670 to 1672, Newton lectured on optics. During this period he investigated the refraction of light, demonstrating that the multicoloured image produced by a prism, which he named a spectrum, could be recomposed into white light by a lens and a second prism. Modern scholarship has revealed that Newton's analysis and resynthesis of white light owes a debt to corpuscular alchemy. He showed that coloured light does not change its properties by separating out a coloured beam and shining it on various objects, and that regardless of whether reflected, scattered, or transmitted, the light remains the same colour. Thus, he observed that colour is the result of objects interacting with already-coloured light rather than objects generating the colour themselves. This is known as Newton's theory of colour. From this work, he concluded that the lens of any refracting telescope would suffer from the dispersion of light into colours (chromatic aberration). As a proof of the concept, he constructed a telescope using reflective mirrors instead of lenses as the objective to bypass that problem. Building the design, the first known functional reflecting telescope, today known as a Newtonian telescope, involved solving the problem of a suitable mirror material and shaping technique. Newton ground his own mirrors out of a custom composition of highly reflective speculum metal, using Newton's rings to judge the quality of the optics for his telescopes. In late 1668, he was able to produce this first reflecting telescope. It was about eight inches long and it gave a clearer and larger image. In 1671, the Royal Society asked for a demonstration of his reflecting telescope. Their interest encouraged him to publish his notes, Of Colours, which he later expanded into the work Opticks. When Robert Hooke criticised some of Newton's ideas, Newton was so offended that he withdrew from public debate. Newton and Hooke had brief exchanges in 1679–80, when Hooke, appointed to manage the Royal Society's correspondence, opened up a correspondence intended to elicit contributions from Newton to Royal Society transactions, which had the effect of stimulating Newton to work out a proof that the elliptical form of planetary orbits would result from a centripetal force inversely proportional to the square of the radius vector. But the two men remained generally on poor terms until Hooke's death. Newton argued that light is composed of particles or corpuscles, which were refracted by accelerating into a denser medium. He verged on soundlike waves to explain the repeated pattern of reflection and transmission by thin films (Opticks Bk. II, Props. 12), but still retained his theory of 'fits' that disposed corpuscles to be reflected or transmitted (Props.13). However, later physicists favoured a purely wavelike explanation of light to account for the interference patterns and the general phenomenon of diffraction. Today's quantum mechanics, photons, and the idea of wave–particle duality bear only a minor resemblance to Newton's understanding of light. In his Hypothesis of Light of 1675, Newton posited the existence of the ether to transmit forces between particles. The contact with the Cambridge Platonist philosopher Henry More revived his interest in alchemy. He replaced the ether with occult forces based on Hermetic ideas of attraction and repulsion between particles. John Maynard Keynes, who acquired many of Newton's writings on alchemy, stated that "Newton was not the first of the age of reason: He was the last of the magicians." Newton's contributions to science cannot be isolated from his interest in alchemy. This was at a time when there was no clear distinction between alchemy and science. In 1704, Newton published Opticks, in which he expounded his corpuscular theory of light. He considered light to be made up of extremely subtle corpuscles, that ordinary matter was made of grosser corpuscles and speculated that through a kind of alchemical transmutation "Are not gross Bodies and Light convertible into one another, ... and may not Bodies receive much of their Activity from the Particles of Light which enter their Composition?" Newton also constructed a primitive form of a frictional electrostatic generator, using a glass globe. In his book Opticks, Newton was the first to show a diagram using a prism as a beam expander, and also the use of multiple-prism arrays. Some 278 years after Newton's discussion, multiple-prism beam expanders became central to the development of narrow-linewidth tunable lasers. Also, the use of these prismatic beam expanders led to the multiple-prism dispersion theory. Subsequent to Newton, much has been amended. Young and Fresnel discarded Newton's particle theory in favour of Huygens' wave theory to show that colour is the visible manifestation of light's wavelength. Science also slowly came to realise the difference between perception of colour and mathematisable optics. The German poet and scientist, Goethe, could not shake the Newtonian foundation but "one hole Goethe did find in Newton's armour, ... Newton had committed himself to the doctrine that refraction without colour was impossible. He, therefore, thought that the object-glasses of telescopes must forever remain imperfect, achromatism and refraction being incompatible. This inference was proved by Dollond to be wrong." Newton had been developing his theory of gravitation as far back as 1665. In 1679, Newton returned to his work on celestial mechanics by considering gravitation and its effect on the orbits of planets with reference to Kepler's laws of planetary motion. This followed stimulation by a brief exchange of letters in 1679–80 with Hooke, who had been appointed Secretary of the Royal Society, and who opened a correspondence intended to elicit contributions from Newton to Royal Society transactions. Newton's reawakening interest in astronomical matters received further stimulus by the appearance of a comet in the winter of 1680–1681, on which he corresponded with John Flamsteed. After the exchanges with Hooke, Newton worked out a proof that the elliptical form of planetary orbits would result from a centripetal force inversely proportional to the square of the radius vector. Newton communicated his results to Edmond Halley and to the Royal Society in De motu corporum in gyrum, a tract written on about nine sheets which was copied into the Royal Society's Register Book in December 1684. This tract contained the nucleus that Newton developed and expanded to form the Principia. The Principia was published on 5 July 1687 with encouragement and financial help from Halley. In this work, Newton stated the three universal laws of motion. Together, these laws describe the relationship between any object, the forces acting upon it and the resulting motion, laying the foundation for classical mechanics. They contributed to many advances during the Industrial Revolution which soon followed and were not improved upon for more than 200 years. Many of these advances continue to be the underpinnings of non-relativistic technologies in the modern world. He used the Latin word gravitas (weight) for the effect that would become known as gravity, and defined the law of universal gravitation. In the same work, Newton presented a calculus-like method of geometrical analysis using 'first and last ratios', gave the first analytical determination (based on Boyle's law) of the speed of sound in air, inferred the oblateness of Earth's spheroidal figure, accounted for the precession of the equinoxes as a result of the Moon's gravitational attraction on the Earth's oblateness, initiated the gravitational study of the irregularities in the motion of the Moon, provided a theory for the determination of the orbits of comets, and much more. Newton's biographer David Brewster reported that the complexity of applying his theory of gravity to the motion of the moon was so great it affected Newton's health: "[H]e was deprived of his appetite and sleep" during his work on the problem in 1692–93, and told the astronomer John Machin that "his head never ached but when he was studying the subject". According to Brewster, Edmund Halley also told John Conduitt that when pressed to complete his analysis Newton "always replied that it made his head ache, and kept him awake so often, that he would think of it no more". [Emphasis in original] Newton made clear his heliocentric view of the Solar System—developed in a somewhat modern way because already in the mid-1680s he recognised the "deviation of the Sun" from the centre of gravity of the Solar System. For Newton, it was not precisely the centre of the Sun or any other body that could be considered at rest, but rather "the common centre of gravity of the Earth, the Sun and all the Planets is to be esteem'd the Centre of the World", and this centre of gravity "either is at rest or moves uniformly forward in a right line". (Newton adopted the "at rest" alternative in view of common consent that the centre, wherever it was, was at rest.) Newton was criticised for introducing "occult agencies" into science because of his postulate of an invisible force able to act over vast distances. Later, in the second edition of the Principia (1713), Newton firmly rejected such criticisms in a concluding General Scholium, writing that it was enough that the phenomena implied a gravitational attraction, as they did; but they did not so far indicate its cause, and it was both unnecessary and improper to frame hypotheses of things that were not implied by the phenomena. (Here Newton used what became his famous expression "Hypotheses non fingo".) With the Principia, Newton became internationally recognised. He acquired a circle of admirers, including the Swiss-born mathematician Nicolas Fatio de Duillier. In 1710, Newton found 72 of the 78 "species" of cubic curves and categorised them into four types. In 1717, and probably with Newton's help, James Stirling proved that every cubic was one of these four types. Newton also claimed that the four types could be obtained by plane projection from one of them, and this was proved in 1731, four years after his death. In the 1690s, Newton wrote a number of religious tracts dealing with the literal and symbolic interpretation of the Bible. A manuscript Newton sent to John Locke in which he disputed the fidelity of 1 John 5:7—the Johannine Comma—and its fidelity to the original manuscripts of the New Testament, remained unpublished until 1785. Newton was also a member of the Parliament of England for Cambridge University in 1689 and 1701, but according to some accounts his only comments were to complain about a cold draught in the chamber and request that the window be closed. He was, however, noted by Cambridge diarist Abraham de la Pryme to have rebuked students who were frightening locals by claiming that a house was haunted. Newton moved to London to take up the post of warden of the Royal Mint during the reign of King William III in 1696, a position that he had obtained through the patronage of Charles Montagu, 1st Earl of Halifax, then Chancellor of the Exchequer. He took charge of England's great recoining, trod on the toes of Lord Lucas, Governor of the Tower, and secured the job of deputy comptroller of the temporary Chester branch for Edmond Halley. Newton became perhaps the best-known Master of the Mint upon the death of Thomas Neale in 1699, a position Newton held for the last 30 years of his life. These appointments were intended as sinecures, but Newton took them seriously. He retired from his Cambridge duties in 1701, and exercised his authority to reform the currency and punish clippers and counterfeiters. As Warden, and afterwards as Master, of the Royal Mint, Newton estimated that 20 percent of the coins taken in during the Great Recoinage of 1696 were counterfeit. Counterfeiting was high treason, punishable by the felon being hanged, drawn and quartered. Despite this, convicting even the most flagrant criminals could be extremely difficult, but Newton proved equal to the task. Disguised as a habitué of bars and taverns, he gathered much of that evidence himself. For all the barriers placed to prosecution, and separating the branches of government, English law still had ancient and formidable customs of authority. Newton had himself made a justice of the peace in all the home counties. A draft letter regarding the matter is included in Newton's personal first edition of Philosophiæ Naturalis Principia Mathematica, which he must have been amending at the time. Then he conducted more than 100 cross-examinations of witnesses, informers, and suspects between June 1698 and Christmas 1699. Newton successfully prosecuted 28 coiners. Newton was made president of the Royal Society in 1703 and an associate of the French Académie des Sciences. In his position at the Royal Society, Newton made an enemy of John Flamsteed, the Astronomer Royal, by prematurely publishing Flamsteed's Historia Coelestis Britannica, which Newton had used in his studies. In April 1705, Queen Anne knighted Newton during a royal visit to Trinity College, Cambridge. The knighthood is likely to have been motivated by political considerations connected with the parliamentary election in May 1705, rather than any recognition of Newton's scientific work or services as Master of the Mint. Newton was the second scientist to be knighted, after Francis Bacon. As a result of a report written by Newton on 21 September 1717 to the Lords Commissioners of His Majesty's Treasury, the bimetallic relationship between gold coins and silver coins was changed by royal proclamation on 22 December 1717, forbidding the exchange of gold guineas for more than 21 silver shillings. This inadvertently resulted in a silver shortage as silver coins were used to pay for imports, while exports were paid for in gold, effectively moving Britain from the silver standard to its first gold standard. It is a matter of debate as to whether he intended to do this or not. It has been argued that Newton conceived of his work at the Mint as a continuation of his alchemical work. Newton was invested in the South Sea Company and lost some £20,000 (£4.4 million in 2020) when it collapsed in around 1720. Toward the end of his life, Newton took up residence at Cranbury Park, near Winchester, with his niece and her husband, until his death. His half-niece, Catherine Barton, served as his hostess in social affairs at his house on Jermyn Street in London; he was her "very loving Uncle", according to his letter to her when she was recovering from smallpox. Newton died in his sleep in London on 20 March 1727 (OS 20 March 1726; NS 31 March 1727). He was given a ceremonial funeral, attended by nobles, scientists, and philosophers, and was buried in Westminster Abbey among kings and queens. He was the first scientist to be buried in the abbey. Voltaire may have been present at his funeral. A bachelor, he had divested much of his estate to relatives during his last years, and died intestate. His papers went to John Conduitt and Catherine Barton. Shortly after his death, a plaster death mask was moulded of Newton. It was used by Flemish sculptor John Michael Rysbrack in making a sculpture of Newton. It is now held by the Royal Society, who created a 3D scan of it in 2012. Newton's hair was posthumously examined and found to contain mercury, probably resulting from his alchemical pursuits. Mercury poisoning could explain Newton's eccentricity in late life. Although it was claimed that he was once engaged, Newton never married. The French writer and philosopher Voltaire, who was in London at the time of Newton's funeral, said that he "was never sensible to any passion, was not subject to the common frailties of mankind, nor had any commerce with women—a circumstance which was assured me by the physician and surgeon who attended him in his last moments.” There exists a widespread belief that Newton died a virgin, and writers as diverse as mathematician Charles Hutton, economist John Maynard Keynes, and physicist Carl Sagan have commented on it. Newton had a close friendship with the Swiss mathematician Nicolas Fatio de Duillier, whom he met in London around 1689—some of their correspondence has survived. Their relationship came to an abrupt and unexplained end in 1693, and at the same time Newton suffered a nervous breakdown, which included sending wild accusatory letters to his friends Samuel Pepys and John Locke. His note to the latter included the charge that Locke had endeavoured to "embroil" him with "woemen & by other means". Newton was relatively modest about his achievements, writing in a letter to Robert Hooke in February 1676, "If I have seen further it is by standing on the shoulders of giants." Two writers think that the sentence, written at a time when Newton and Hooke were in dispute over optical discoveries, was an oblique attack on Hooke (said to have been short and hunchbacked), rather than—or in addition to—a statement of modesty. On the other hand, the widely known proverb about standing on the shoulders of giants, published among others by seventeenth-century poet George Herbert (a former orator of the University of Cambridge and fellow of Trinity College) in his Jacula Prudentum (1651), had as its main point that "a dwarf on a giant's shoulders sees farther of the two", and so its effect as an analogy would place Newton himself rather than Hooke as the 'dwarf'. In a later memoir, Newton wrote, "I do not know what I may appear to the world, but to myself I seem to have been only like a boy playing on the sea-shore, and diverting myself in now and then finding a smoother pebble or a prettier shell than ordinary, whilst the great ocean of truth lay all undiscovered before me." Although born into an Anglican family, by his thirties Newton held a Christian faith that, had it been made public, would not have been considered orthodox by mainstream Christianity, with one historian labelling him a heretic. By 1672, he had started to record his theological researches in notebooks which he showed to no one and which have only been available for public examination since 1972. Over half of what Newton wrote concerned theology and alchemy, and most has never been printed. His writings demonstrate an extensive knowledge of early Church writings and show that in the conflict between Athanasius and Arius which defined the Creed, he took the side of Arius, the loser, who rejected the conventional view of the Trinity. Newton "recognized Christ as a divine mediator between God and man, who was subordinate to the Father who created him." He was especially interested in prophecy, but for him, "the great apostasy was trinitarianism." Newton tried unsuccessfully to obtain one of the two fellowships that exempted the holder from the ordination requirement. At the last moment in 1675 he received a dispensation from the government that excused him and all future holders of the Lucasian chair. In Newton's eyes, worshipping Christ as God was idolatry, to him the fundamental sin. In 1999, historian Stephen D. Snobelen wrote, "Isaac Newton was a heretic. But ... he never made a public declaration of his private faith—which the orthodox would have deemed extremely radical. He hid his faith so well that scholars are still unraveling his personal beliefs." Snobelen concludes that Newton was at least a Socinian sympathiser (he owned and had thoroughly read at least eight Socinian books), possibly an Arian and almost certainly an anti-trinitarian. Although the laws of motion and universal gravitation became Newton's best-known discoveries, he warned against using them to view the Universe as a mere machine, as if akin to a great clock. He said, "So then gravity may put the planets into motion, but without the Divine Power it could never put them into such a circulating motion, as they have about the sun". Along with his scientific fame, Newton's studies of the Bible and of the early Church Fathers were also noteworthy. Newton wrote works on textual criticism, most notably An Historical Account of Two Notable Corruptions of Scripture and Observations upon the Prophecies of Daniel, and the Apocalypse of St. John. He placed the crucifixion of Jesus Christ at 3 April, AD 33, which agrees with one traditionally accepted date. He believed in a rationally immanent world, but he rejected the hylozoism implicit in Leibniz and Baruch Spinoza. The ordered and dynamically informed Universe could be understood, and must be understood, by an active reason. In his correspondence, Newton claimed that in writing the Principia "I had an eye upon such Principles as might work with considering men for the belief of a Deity". He saw evidence of design in the system of the world: "Such a wonderful uniformity in the planetary system must be allowed the effect of choice". But Newton insisted that divine intervention would eventually be required to reform the system, due to the slow growth of instabilities. For this, Leibniz lampooned him: "God Almighty wants to wind up his watch from time to time: otherwise it would cease to move. He had not, it seems, sufficient foresight to make it a perpetual motion." Newton's position was vigorously defended by his follower Samuel Clarke in a famous correspondence. A century later, Pierre-Simon Laplace's work Celestial Mechanics had a natural explanation for why the planet orbits do not require periodic divine intervention. The contrast between Laplace's mechanistic worldview and Newton's one is the most strident considering the famous answer which the French scientist gave Napoleon, who had criticised him for the absence of the Creator in the Mécanique céleste: "Sire, j'ai pu me passer de cette hypothèse" ("Sir, I didn't need this hypothesis"). Scholars long debated whether Newton disputed the doctrine of the Trinity. His first biographer, David Brewster, who compiled his manuscripts, interpreted Newton as questioning the veracity of some passages used to support the Trinity, but never denying the doctrine of the Trinity as such. In the twentieth century, encrypted manuscripts written by Newton and bought by John Maynard Keynes (among others) were deciphered and it became known that Newton did indeed reject Trinitarianism. Newton and Robert Boyle's approach to the mechanical philosophy was promoted by rationalist pamphleteers as a viable alternative to the pantheists and enthusiasts, and was accepted hesitantly by orthodox preachers as well as dissident preachers like the latitudinarians. The clarity and simplicity of science was seen as a way to combat the emotional and metaphysical superlatives of both superstitious enthusiasm and the threat of atheism, and at the same time, the second wave of English deists used Newton's discoveries to demonstrate the possibility of a "Natural Religion". The attacks made against pre-Enlightenment "magical thinking", and the mystical elements of Christianity, were given their foundation with Boyle's mechanical conception of the universe. Newton gave Boyle's ideas their completion through mathematical proofs and, perhaps more importantly, was very successful in popularising them. Newton was not the first of the age of reason. He was the last of the magicians, the last of the Babylonians and Sumerians, the last great mind which looked out on the visible and intellectual world with the same eyes as those who began to build our intellectual inheritance rather less than 10,000 years ago. Isaac Newton, a posthumous child born with no father on Christmas Day, 1642, was the last wonderchild to whom the Magi could do sincere and appropriate homage. –John Maynard Keynes, "Newton, the Man" Of an estimated ten million words of writing in Newton's papers, about one million deal with alchemy. Many of Newton's writings on alchemy are copies of other manuscripts, with his own annotations. Alchemical texts mix artisanal knowledge with philosophical speculation, often hidden behind layers of wordplay, allegory, and imagery to protect craft secrets. Some of the content contained in Newton's papers could have been considered heretical by the church. In 1888, after spending sixteen years cataloguing Newton's papers, Cambridge University kept a small number and returned the rest to the Earl of Portsmouth. In 1936, a descendant offered the papers for sale at Sotheby's. The collection was broken up and sold for a total of about £9,000. John Maynard Keynes was one of about three dozen bidders who obtained part of the collection at auction. Keynes went on to reassemble an estimated half of Newton's collection of papers on alchemy before donating his collection to Cambridge University in 1946. All of Newton's known writings on alchemy are currently being put online in a project undertaken by Indiana University: "The Chymistry of Isaac Newton" and summarised in a book. Newton's fundamental contributions to science include the quantification of gravitational attraction, the discovery that white light is actually a mixture of immutable spectral colors, and the formulation of the calculus. Yet there is another, more mysterious side to Newton that is imperfectly known, a realm of activity that spanned some thirty years of his life, although he kept it largely hidden from his contemporaries and colleagues. We refer to Newton's involvement in the discipline of alchemy, or as it was often called in seventeenth-century England, "chymistry." In June 2020, two unpublished pages of Newton's notes on Jan Baptist van Helmont's book on plague, De Peste, were being auctioned online by Bonhams. Newton's analysis of this book, which he made in Cambridge while protecting himself from London's 1665–1666 infection, is the most substantial written statement he is known to have made about the plague, according to Bonhams. As far as the therapy is concerned, Newton writes that "the best is a toad suspended by the legs in a chimney for three days, which at last vomited up earth with various insects in it, on to a dish of yellow wax, and shortly after died. Combining powdered toad with the excretions and serum made into lozenges and worn about the affected area drove away the contagion and drew out the poison". The mathematician Joseph-Louis Lagrange said that Newton was the greatest genius who ever lived, and once added that Newton was also "the most fortunate, for we cannot find more than once a system of the world to establish." English poet Alexander Pope wrote the famous epitaph: Nature, and Nature's laws lay hid in night. God said, Let Newton be! and all was light. But this was not allowed to be inscribed in Newton's monument at Westminster. The epitaph added is as follows: H. S. E. ISAACUS NEWTON Eques Auratus, / Qui, animi vi prope divinâ, / Planetarum Motus, Figuras, / Cometarum semitas, Oceanique Aestus. Suâ Mathesi facem praeferente / Primus demonstravit: / Radiorum Lucis dissimilitudines, / Colorumque inde nascentium proprietates, / Quas nemo antea vel suspicatus erat, pervestigavit. / Naturae, Antiquitatis, S. Scripturae, / Sedulus, sagax, fidus Interpres / Dei O. M. Majestatem Philosophiâ asseruit, / Evangelij Simplicitatem Moribus expressit. / Sibi gratulentur Mortales, / Tale tantumque exstitisse / HUMANI GENERIS DECUS. / NAT. XXV DEC. A.D. MDCXLII. OBIIT. XX. MAR. MDCCXXVI, which can be translated as follows: Here is buried Isaac Newton, Knight, who by a strength of mind almost divine, and mathematical principles peculiarly his own, explored the course and figures of the planets, the paths of comets, the tides of the sea, the dissimilarities in rays of light, and, what no other scholar has previously imagined, the properties of the colours thus produced. Diligent, sagacious and faithful, in his expositions of nature, antiquity and the holy Scriptures, he vindicated by his philosophy the majesty of God mighty and good, and expressed the simplicity of the Gospel in his manners. Mortals rejoice that there has existed such and so great an ornament of the human race! He was born on 25th December 1642, and died on 20th March 1726. In a 2005 survey of members of Britain's Royal Society (formerly headed by Newton) asking who had the greater effect on the history of science, Newton or Albert Einstein, the members deemed Newton to have made the greater overall contribution. In 1999, an opinion poll of 100 of the day's leading physicists voted Einstein the "greatest physicist ever," with Newton the runner-up, while a parallel survey of rank-and-file physicists by the site PhysicsWeb gave the top spot to Newton. New Scientist called Newton "the supreme genius and most enigmatic character in the history of science". Newton has been called the "most influential figure in the history of Western science". Einstein kept a picture of Newton on his study wall alongside ones of Michael Faraday and James Clerk Maxwell. Physicist Lev Landau ranked physicists on a logarithmic scale of productivity ranging from 0 to 5. The highest ranking, 0, was assigned to Newton. Albert Einstein was ranked 0.5. A rank of 1 was awarded to the "founding fathers" of quantum mechanics, Niels Bohr, Werner Heisenberg, Paul Dirac and Erwin Schrödinger. Landau, a Nobel prize winner and discoverer of superfluidity, ranked himself as 2. The SI derived unit of force is named the newton in his honour. Woolsthorpe Manor is a Grade I listed building by Historic England through being his birthplace and "where he discovered gravity and developed his theories regarding the refraction of light". In 1816, a tooth said to have belonged to Newton was sold for £730 in London to an aristocrat who had it set in a ring. Guinness World Records 2002 classified it as the most valuable tooth in the world, which would value approximately £25,000 (US$35,700) in late 2001. Who bought it and who currently has it has not been disclosed. Newton himself often told the story that he was inspired to formulate his theory of gravitation by watching the fall of an apple from a tree. The story is believed to have passed into popular knowledge after being related by Catherine Barton, Newton's niece, to Voltaire. Voltaire then wrote in his Essay on Epic Poetry (1727), "Sir Isaac Newton walking in his gardens, had the first thought of his system of gravitation, upon seeing an apple falling from a tree." Although it has been said that the apple story is a myth and that he did not arrive at his theory of gravity at any single moment, acquaintances of Newton (such as William Stukeley, whose manuscript account of 1752 has been made available by the Royal Society) do in fact confirm the incident, though not the apocryphal version that the apple actually hit Newton's head. Stukeley recorded in his Memoirs of Sir Isaac Newton's Life a conversation with Newton in Kensington on 15 April 1726: we went into the garden, & drank thea under the shade of some appletrees, only he, & myself. amidst other discourse, he told me, he was just in the same situation, as when formerly, the notion of gravitation came into his mind. "why should that apple always descend perpendicularly to the ground," thought he to him self: occasion'd by the fall of an apple, as he sat in a comtemplative mood: "why should it not go sideways, or upwards? but constantly to the earths centre? assuredly, the reason is, that the earth draws it. there must be a drawing power in matter. & the sum of the drawing power in the matter of the earth must be in the earths center, not in any side of the earth. therefore dos this apple fall perpendicularly, or toward the center. if matter thus draws matter; it must be in proportion of its quantity. therefore the apple draws the earth, as well as the earth draws the apple." John Conduitt, Newton's assistant at the Royal Mint and husband of Newton's niece, also described the event when he wrote about Newton's life: In the year 1666 he retired again from Cambridge to his mother in Lincolnshire. Whilst he was pensively meandering in a garden it came into his thought that the power of gravity (which brought an apple from a tree to the ground) was not limited to a certain distance from earth, but that this power must extend much further than was usually thought. Why not as high as the Moon said he to himself & if so, that must influence her motion & perhaps retain her in her orbit, whereupon he fell a calculating what would be the effect of that supposition. It is known from his notebooks that Newton was grappling in the late 1660s with the idea that terrestrial gravity extends, in an inverse-square proportion, to the Moon; however, it took him two decades to develop the full-fledged theory. The question was not whether gravity existed, but whether it extended so far from Earth that it could also be the force holding the Moon to its orbit. Newton showed that if the force decreased as the inverse square of the distance, one could indeed calculate the Moon's orbital period, and get good agreement. He guessed the same force was responsible for other orbital motions, and hence named it "universal gravitation". Various trees are claimed to be "the" apple tree which Newton describes. The King's School, Grantham claims that the tree was purchased by the school, uprooted and transported to the headmaster's garden some years later. The staff of the (now) National Trust-owned Woolsthorpe Manor dispute this, and claim that a tree present in their gardens is the one described by Newton. A descendant of the original tree can be seen growing outside the main gate of Trinity College, Cambridge, below the room Newton lived in when he studied there. The National Fruit Collection at Brogdale in Kent can supply grafts from their tree, which appears identical to Flower of Kent, a coarse-fleshed cooking variety. Newton's monument (1731) can be seen in Westminster Abbey, at the north of the entrance to the choir against the choir screen, near his tomb. It was executed by the sculptor Michael Rysbrack (1694–1770) in white and grey marble with design by the architect William Kent. The monument features a figure of Newton reclining on top of a sarcophagus, his right elbow resting on several of his great books and his left hand pointing to a scroll with a mathematical design. Above him is a pyramid and a celestial globe showing the signs of the Zodiac and the path of the comet of 1680. A relief panel depicts putti using instruments such as a telescope and prism. From 1978 until 1988, an image of Newton designed by Harry Ecclestone appeared on Series D £1 banknotes issued by the Bank of England (the last £1 notes to be issued by the Bank of England). Newton was shown on the reverse of the notes holding a book and accompanied by a telescope, a prism and a map of the Solar System. A statue of Isaac Newton, looking at an apple at his feet, can be seen at the Oxford University Museum of Natural History. A large bronze statue, Newton, after William Blake, by Eduardo Paolozzi, dated 1995 and inspired by Blake's etching, dominates the piazza of the British Library in London. A bronze statue of Newton was erected in 1858 in the centre of Grantham where he went to school, prominently standing in front of Grantham Guildhall. The still-surviving farmhouse at Woolsthorpe By Colsterworth is a Grade I listed building by Historic England through being his birthplace and "where he discovered gravity and developed his theories regarding the refraction of light". Enlightenment philosophers chose a short history of scientific predecessors—Galileo, Boyle, and Newton principally—as the guides and guarantors of their applications of the singular concept of nature and natural law to every physical and social field of the day. In this respect, the lessons of history and the social structures built upon it could be discarded. It is held by European philosophers of the Enlightenment and by historians of the Enlightenment that Newton's publication of the Principia was a turning point in the Scientific Revolution and started the Enlightenment. It was Newton's conception of the universe based upon natural and rationally understandable laws that became one of the seeds for Enlightenment ideology. Locke and Voltaire applied concepts of natural law to political systems advocating intrinsic rights; the physiocrats and Adam Smith applied natural conceptions of psychology and self-interest to economic systems; and sociologists criticised the current social order for trying to fit history into natural models of progress. Monboddo and Samuel Clarke resisted elements of Newton's work, but eventually rationalised it to conform with their strong religious views of nature. Published in his lifetime De analysi per aequationes numero terminorum infinitas (1669, published 1711) Of Natures Obvious Laws & Processes in Vegetation (unpublished, c. 1671–75) De motu corporum in gyrum (1684) Philosophiæ Naturalis Principia Mathematica (1687) Scala graduum Caloris. Calorum Descriptiones & signa (1701) Reports as Master of the Mint (1701–1725) Arithmetica Universalis (1707) Published posthumously De mundi systemate (The System of the World) (1728) Optical Lectures (1728) The Chronology of Ancient Kingdoms Amended (1728) Observations on Daniel and The Apocalypse of St. John (1733) Method of Fluxions (1671, published 1736) An Historical Account of Two Notable Corruptions of Scripture (1754) Elements of the Philosophy of Newton, a book by Voltaire List of multiple discoveries: seventeenth century List of things named after Isaac Newton List of presidents of the Royal Society ^ a b c d e During Newton's lifetime, two calendars were in use in Europe: the Julian ("Old Style") calendar in Protestant and Orthodox regions, including Britain; and the Gregorian ("New Style") calendar in Roman Catholic Europe. At Newton's birth, Gregorian dates were ten days ahead of Julian dates; thus, his birth is recorded as taking place on 25 December 1642 Old Style, but it can be converted to a New Style (modern) date of 4 January 1643. By the time of his death, the difference between the calendars had increased to eleven days. Moreover, he died in the period after the start of the New Style year on 1 January but before that of the Old Style new year on 25 March. His death occurred on 20 March 1726, according to the Old Style calendar, but the year is usually adjusted to 1727. A full conversion to New Style gives the date 31 March 1727. ^ This claim was made by William Stukeley in 1727, in a letter about Newton written to Richard Mead. Charles Hutton, who in the late eighteenth century collected oral traditions about earlier scientists, declared that there "do not appear to be any sufficient reason for his never marrying, if he had an inclination so to do. It is much more likely that he had a constitutional indifference to the state, and even to the sex in general." timestamp: 2024-08-20T11:51:54 title: Isaac Newton - Wikipedia url: https://en.wikipedia.org/wiki/Isaac_Newton - id: web-search_2 snippet: >- Stanford Encyclopedia of Philosophy Editorial Information PDFs for SEP Friends Author and Citation Info First published Wed Dec 19, 2007 Isaac Newton (1642–1727) is best known for having invented the calculus in the mid to late 1660s (most of a decade before Leibniz did so independently, and ultimately more influentially) and for having formulated the theory of universal gravity — the latter in his Principia, the single most important work in the transformation of early modern natural philosophy into modern physical science. Yet he also made major discoveries in optics beginning in the mid-1660s and reaching across four decades; and during the course of his 60 years of intense intellectual activity he put no less effort into chemical and alchemical research and into theology and biblical studies than he put into mathematics and physics. He became a dominant figure in Britain almost immediately following publication of his Principia in 1687, with the consequence that “Newtonianism” of one form or another had become firmly rooted there within the first decade of the eighteenth century. His influence on the continent, however, was delayed by the strong opposition to his theory of gravity expressed by such leading figures as Christiaan Huygens and Leibniz, both of whom saw the theory as invoking an occult power of action at a distance in the absence of Newton's having proposed a contact mechanism by means of which forces of gravity could act. As the promise of the theory of gravity became increasingly substantiated, starting in the late 1730s but especially during the 1740s and 1750s, Newton became an equally dominant figure on the continent, and “Newtonianism,” though perhaps in more guarded forms, flourished there as well. What physics textbooks now refer to as “Newtonian mechanics” and “Newtonian science” consists mostly of results achieved on the continent between 1740 and 1800. 1.1 Newton's Early Years 1.2 Newton's Years at Cambridge Prior to Principia 1.3 Newton's Final Years at Cambridge 1.4 Newton's Years in London and His Final Years 2. Newton's Work and Influence Other Internet Resources Newton's life naturally divides into four parts: the years before he entered Trinity College, Cambridge in 1661; his years in Cambridge before the Principia was published in 1687; a period of almost a decade immediately following this publication, marked by the renown it brought him and his increasing disenchantment with Cambridge; and his final three decades in London, for most of which he was Master of the Mint. While he remained intellectually active during his years in London, his legendary advances date almost entirely from his years in Cambridge. Nevertheless, save for his optical papers of the early 1670s and the first edition of the Principia, all his works published before he died fell within his years in London.[1] 1.1 Newton's Early Years Newton was born into a Puritan family in Woolsthorpe, a small village in Linconshire near Grantham, on 25 December 1642 (old calendar), a few days short of one year after Galileo died. Isaac's father, a farmer, died two months before Isaac was born. When his mother Hannah married the 63 year old Barnabas Smith three years later and moved to her new husband's residence, Isaac was left behind with his maternal grandparents. (Isaac learned to read and write from his maternal grandmother and mother, both of whom, unlike his father, were literate.) Hannah returned to Woolsthorpe with three new children in 1653, after Smith died. Two years later Isaac went to boarding school in Grantham, returning full time to manage the farm, not very successfully, in 1659. Hannah's brother, who had received an M.A. from Cambridge, and the headmaster of the Grantham school then persuaded his mother that Isaac should prepare for the university. After further schooling at Grantham, he entered Trinity College in 1661, somewhat older than most of his classmates. These years of Newton's youth were the most turbulent in the history of England. The English Civil War had begun in 1642, King Charles was beheaded in 1649, Oliver Cromwell ruled as lord protector from 1653 until he died in 1658, followed by his son Richard from 1658 to 1659, leading to the restoration of the monarchy under Charles II in 1660. How much the political turmoil of these years affected Newton and his family is unclear, but the effect on Cambridge and other universities was substantial, if only through unshackling them for a period from the control of the Anglican Catholic Church. The return of this control with the restoration was a key factor inducing such figures as Robert Boyle to turn to Charles II for support for what in 1660 emerged as the Royal Society of London. The intellectual world of England at the time Newton matriculated to Cambridge was thus very different from what it was when he was born. 1.2 Newton's Years at Cambridge Prior to Principia Newton's initial education at Cambridge was classical, focusing (primarily through secondary sources) on Aristotlean rhetoric, logic, ethics, and physics. By 1664, Newton had begun reaching beyond the standard curriculum, reading, for example, the 1656 Latin edition of Descartes's Opera philosophica, which included the Meditations, Discourse on Method, the Dioptrics, and the Principles of Philosophy. By early 1664 he had also begun teaching himself mathematics, taking notes on works by Oughtred, Viète, Wallis, and Descartes — the latter via van Schooten's Latin translation, with commentary, of the Géométrie. Newton spent all but three months from the summer of 1665 until the spring of 1667 at home in Woolsthorpe when the university was closed because of the plague. This period was his so-called annus mirabilis. During it, he made his initial experimental discoveries in optics and developed (independently of Huygens's treatment of 1659) the mathematical theory of uniform circular motion, in the process noting the relationship between the inverse-square and Kepler's rule relating the square of the planetary periods to the cube of their mean distance from the Sun. Even more impressively, by late 1666 he had become de facto the leading mathematician in the world, having extended his earlier examination of cutting-edge problems into the discovery of the calculus, as presented in his tract of October 1666. He returned to Trinity as a Fellow in 1667, where he continued his research in optics, constructing his first reflecting telescope in 1669, and wrote a more extended tract on the calculus “De Analysi per Æquations Numero Terminorum Infinitas” incorporating new work on infinite series. On the basis of this tract Isaac Barrow recommended Newton as his replacement as Lucasian Professor of Mathematics, a position he assumed in October 1669, four and a half years after he had received his Bachelor of Arts. Over the course of the next fifteen years as Lucasian Professor Newton presented his lectures and carried on research in a variety of areas. By 1671 he had completed most of a treatise length account of the calculus,[2] which he then found no one would publish. This failure appears to have diverted his interest in mathematics away from the calculus for some time, for the mathematical lectures he registered during this period mostly concern algebra. (During the early 1680s he undertook a critical review of classical texts in geometry, a review that reduced his view of the importance of symbolic mathematics.) His lectures from 1670 to 1672 concerned optics, with a large range of experiments presented in detail. Newton went public with his work in optics in early 1672, submitting material that was read before the Royal Society and then published in the Philosophical Transactions of the Royal Society. This led to four years of exchanges with various figures who challenged his claims, including both Robert Hooke and Christiaan Huygens — exchanges that at times exasperated Newton to the point that he chose to withdraw from further public exchanges in natural philosophy. Before he largely isolated himself in the late 1670s, however, he had also engaged in a series of sometimes long exchanges in the mid 1670s, most notably with John Collins (who had a copy of “De Analysi”) and Leibniz, concerning his work on the calculus. So, though they remained unpublished, Newton's advances in mathematics scarcely remained a secret. This period as Lucasian Professor also marked the beginning of his more private researches in alchemy and theology. Newton purchased chemical apparatus and treatises in alchemy in 1669, with experiments in chemistry extending across this entire period. The issue of the vows Newton might have to take in conjunction with the Lucasian Professorship also appears to have precipitated his study of the doctrine of the Trinity, which opened the way to his questioning the validity of a good deal more doctrine central to the Roman and Anglican Churches. Newton showed little interest in orbital astronomy during this period until Hooke initiated a brief correspondence with him in an effort to solicit material for the Royal Society at the end of November 1679, shortly after Newton had returned to Cambridge following the death of his mother. Among the several problems Hooke proposed to Newton was the question of the trajectory of a body under an inverse-square central force: It now remaines to know the proprietys of a curve Line (not circular nor concentricall) made by a centrall attractive power which makes the velocitys of Descent from the tangent Line or equall straight motion at all Distances in a Duplicate proportion to the Distances Reciprocally taken. I doubt not but that by your excellent method you will easily find out what the Curve must be, and it proprietys, and suggest a physicall Reason of this proportion.[3] Newton apparently discovered the systematic relationship between conic-section trajectories and inverse-square central forces at the time, but did not communicate it to anyone, and for reasons that remain unclear did not follow up this discovery until Halley, during a visit in the summer of 1684, put the same question to him. His immediate answer was, an ellipse; and when he was unable to produce the paper on which he had made this determination, he agreed to forward an account to Halley in London. Newton fulfilled this commitment in November by sending Halley a nine-folio-page manuscript, “De Motu Corporum in Gyrum” (“On the Motion of Bodies in Orbit”), which was entered into the Register of the Royal Society in early December 1684. The body of this tract consists of ten deduced propositions — three theorems and seven problems — all of which, along with their corollaries, recur in important propositions in the Principia. Save for a few weeks away from Cambridge, from late 1684 until early 1687, Newton concentrated on lines of research that expanded the short ten-proposition tract into the 500 page Principia, with its 192 derived propositions. Initially the work was to have a two book structure, but Newton subsequently shifted to three books, and replaced the original version of the final book with one more mathematically demanding. The manuscript for Book 1 was sent to London in the spring of 1686, and the manuscripts for Books 2 and 3, in March and April 1687, respectively. The roughly three hundred copies of the Principia came off the press in the summer of 1687, thrusting the 44 year old Newton into the forefront of natural philosophy and forever ending his life of comparative isolation. 1.3 Newton's Final Years at Cambridge The years between the publication of the Principia and Newton's permanent move to London in 1696 were marked by his increasing disenchantment with his situation in Cambridge. In January 1689, following the Glorious Revolution at the end of 1688, he was elected to represent Cambridge University in the Convention Parliament, which he did until January 1690. During this time he formed friendships with John Locke and Nicolas Fatio de Duillier, and in the summer of 1689 he finally met Christiaan Huygens face to face for two extended discussions. Perhaps because of disappointment with Huygens not being convinced by the argument for universal gravity, in the early 1690s Newton initiated a radical rewriting of the Principia. During these same years he wrote (but withheld) his principal treatise in alchemy, Praxis; he corresponded with Richard Bentley on religion and allowed Locke to read some of his writings on the subject; he once again entered into an effort to put his work on the calculus in a form suitable for publication; and he carried out experiments on diffraction with the intent of completing his Opticks, only to withhold the manuscript from publication because of dissatisfaction with its treatment of diffraction. The radical revision of the Principia became abandoned by 1693, during the middle of which Newton suffered, by his own testimony, what in more recent times would be called a nervous breakdown. In the two years following his recovery that autumn, he continued his experiments in chymistry and he put substantial effort into trying to refine and extend the gravity-based theory of the lunar orbit in the Principia, but with less success than he had hoped. Throughout these years Newton showed interest in a position of significance in London, but again with less success than he had hoped until he accepted the relatively minor position of Warden of the Mint in early 1696, a position he held until he became Master of the Mint at the end of 1699. He again represented Cambridge University in Parliament for 16 months, beginning in 1701, the year in which he resigned his Fellowship at Trinity College and the Lucasian Professorship. He was elected President of the Royal Society in 1703 and was knighted by Queen Anne in 1705. 1.4 Newton's Years in London and His Final Years Newton thus became a figure of imminent authority in London over the rest of his life, in face-to-face contact with individuals of power and importance in ways that he had not known in his Cambridge years. His everyday home life changed no less dramatically when his extraordinarily vivacious teenage niece, Catherine Barton, the daughter of his half-sister Hannah, moved in with him shortly after he moved to London, staying until she married John Conduitt in 1717, and after that remaining in close contact. (It was through her and her husband that Newton's papers came down to posterity.) Catherine was socially prominent among the powerful and celebrated among the literati for the years before she married, and her husband was among the wealthiest men of London. The London years saw Newton embroiled in some nasty disputes, probably made the worse by the ways in which he took advantage of his position of authority in the Royal Society. In the first years of his Presidency he became involved in a dispute with John Flamsteed in which he and Halley, long ill-disposed toward the Flamsteed, violated the trust of the Royal Astronomer, turning him into a permanent enemy. Ill feelings between Newton and Leibniz had been developing below the surface from even before Huygens had died in 1695, and they finally came to a head in 1710 when John Keill accused Leibniz in the Philosophical Transactions of having plagiarized the calculus from Newton and Leibniz, a Fellow of the Royal Society since 1673, demanded redress from the Society. The Society's 1712 published response was anything but redress. Newton not only was a dominant figure in this response, but then published an outspoken anonymous review of it in 1715 in the Philosophical Transactions. Leibniz and his colleagues on the Continent had never been comfortable with the Principia and its implication of action at a distance. With the priority dispute this attitude turned into one of open hostility toward Newton's theory of gravity — a hostility that was matched in its blindness by the fervor of acceptance of the theory in England. The public elements of the priority dispute had the effect of expanding a schism between Newton and Leibniz into a schism between the English associated with the Royal Society and the group who had been working with Leibniz on the calculus since the 1690s, including most notably Johann Bernoulli, and this schism in turn transformed into one between the conduct of science and mathematics in England versus the Continent that persisted long after Leibniz died in 1716. Although Newton obviously had far less time available to devote to solitary research during his London years than he had had in Cambridge, he did not entirely cease to be productive. The first (English) edition of his Opticks finally appeared in 1704, appended to which were two mathematical treatises, his first work on the calculus to appear in print. This edition was followed by a Latin edition in 1706 and a second English edition in 1717, each containing important Queries on key topics in natural philosophy beyond those in its predecessor. Other earlier work in mathematics began to appear in print, including a work on algebra, Arithmetica Universalis, in 1707 and “De Analysi” and a tract on finite differences, “Methodis differentialis” in 1711. The second edition of the Principia, on which Newton had begun work at the age of 66 in 1709, was published in 1713, with a third edition in 1726. Though the original plan for a radical restructuring had long been abandoned, the fact that virtually every page of the Principia received some modifications in the second edition shows how carefully Newton, often prodded by his editor Roger Cotes, reconsidered everything in it; and important parts were substantially rewritten not only in response to Continental criticisms, but also because of new data, including data from experiments on resistance forces carried out in London. Focused effort on the third edition began in 1723, when Newton was 80 years old, and while the revisions are far less extensive than in the second edition, it does contain substantive additions and modfications, and it surely has claim to being the edition that represents his most considered views. Newton died on 20 March 1727 at the age of 84. His contemporaries' conception of him nevertheless continued to expand as a consequence of various posthumous publications, including The Chronology of Ancient Kingdoms Amended (1728); the work originally intended to be the last book of the Principia, The System of the World (1728, in both English and Latin); Observations upon the Prophecies of Daniel and the Apocalypse of St. John (1733); A Treatise of the Method of Fluxions and Infinite Series (1737); A Dissertation upon the Sacred Cubit of the Jews (1737), and Four Letters from Sir Isaac Newton to Doctor Bentley concerning Some Arguments in Proof of a Deity (1756). Even then, however, the works that had been published represented only a limited fraction of the total body of papers that had been left in the hands of Catherine and John Conduitt. The five volume collection of Newton's works edited by Samuel Horsley (1779–85) did not alter this situation. Through the marriage of the Conduitts' daughter Catherine and subsequent inheritance, this body of papers came into the possession of Lord Portsmouth, who agreed in 1872 to allow it to be reviewed by scholars at Cambridge University (John Couch Adams, George Stokes, H. R. Luard, and G. D. Liveing). They issued a catalogue in 1888, and the university then retained all the papers of a scientific character. With the notable exception of W. W. Rouse Ball, little work was done on the scientific papers before World War II. The remaining papers were returned to Lord Portsmouth, and then ultimately sold at auction in 1936 to various parties. Serious scholarly work on them did not get underway until the 1970s, and much remains to be done on them. 2. Newton's Work and Influence Three factors stand in the way of giving an account of Newton's work and influence. First is the contrast between the public Newton, consisting of publications in his lifetime and in the decade or two following his death, and the private Newton, consisting of his unpublished work in math and physics, his efforts in chymistry — that is, the 17th century blend of alchemy and chemistry — and his writings in radical theology — material that has become public mostly since World War II. Only the public Newton influenced the eighteenth and early nineteenth centuries, yet any account of Newton himself confined to this material can at best be only fragmentary. Second is the contrast, often shocking, between the actual content of Newton's public writings and the positions attributed to him by others, including most importantly his popularizers. The term “Newtonian” refers to several different intellectual strands unfolding in the eighteenth century, some of them tied more closely to Voltaire, Pemberton, and Maclaurin — or for that matter to those who saw themselves as extending his work, such as Clairaut, Euler, d'Alembert, Lagrange, and Laplace — than to Newton himself. Third is the contrast between the enormous range of subjects to which Newton devoted his full concentration at one time or another during the 60 years of his intellectual career — mathematics, optics, mechanics, astronomy, experimental chemistry, alchemy, and theology — and the remarkably little information we have about what drove him or his sense of himself. Biographers and analysts who try to piece together a unified picture of Newton and his intellectual endeavors often end up telling us almost as much about themselves as about Newton. Compounding the diversity of the subjects to which Newton devoted time are sharp contrasts in his work within each subject. Optics and orbital mechanics both fall under what we now call physics, and even then they were seen as tied to one another, as indicated by Descartes' first work on the subject, Le Monde, ou Traité de la lumierè. Nevertheless, two very different “Newtonian” traditions in physics arose from Newton's Opticks and Principia: from his Opticks a tradition centered on meticulous experimentation and from his Principia a tradition centered on mathematical theory. The most important element common to these two was Newton's deep commitment to having the empirical world serve not only as the ultimate arbiter, but also as the sole basis for adopting provisional theory. Throughout all of this work he displayed distrust of what was then known as the method of hypotheses – putting forward hypotheses that reach beyond all known phenomena and then testing them by deducing observable conclusions from them. Newton insisted instead on having specific phenomena decide each element of theory, with the goal of limiting the provisional aspect of theory as much as possible to the step of inductively generalizing from the specific phenomena. This stance is perhaps best summarized in his fourth Rule of Reasoning, added in the third edition of the Principia, but adopted as early as his Optical Lectures of the 1670s: In experimental philosophy, propositions gathered from phenomena by induction should be taken to be either exactly or very nearly true notwithstanding any contrary hypotheses, until yet other phenomena make such propositions either more exact or liable to exceptions. This rule should be followed so that arguments based on induction may not be nullified by hypotheses. Such a commitment to empirically driven science was a hallmark of the Royal Society from its very beginnings, and one can find it in the research of Kepler, Galileo, Huygens, and in the experimental efforts of the Royal Academy of Paris. Newton, however, carried this commitment further first by eschewing the method of hypotheses and second by displaying in his Principia and Opticks how rich a set of theoretical results can be secured through well-designed experiments and mathematical theory designed to allow inferences from phenomena. The success of those after him in building on these theoretical results completed the process of transforming natural philosophy into modern empirical science. Newton's commitment to having phenomena decide the elements of theory required questions to be left open when no available phenomena could decide them. Newton contrasted himself most strongly with Leibniz in this regard at the end of his anonymous review of the Royal Society's report on the priority dispute over the calculus: It must be allowed that these two Gentlemen differ very much in Philosophy. The one proceeds upon the Evidence arising from Experiments and Phenomena, and stops where such Evidence is wanting; the other is taken up with Hypotheses, and propounds them, not to be examined by Experiments, but to be believed without Examination. The one for want of Experiments to decide the Question, doth not affirm whether the Cause of Gravity be Mechanical or not Mechanical; the other that it is a perpetual Miracle if it be not Mechanical. Newton could have said much the same about the question of what light consists of, waves or particles, for while he felt that the latter was far more probable, he saw it still not decided by any experiment or phenomenon in his lifetime. Leaving questions about the ultimate cause of gravity and the constitution of light open was the other factor in his work driving a wedge between natural philosophy and empirical science. The many other areas of Newton's intellectual endeavors made less of a difference to eighteenth century philosophy and science. In mathematics, Newton was the first to develop a full range of algorithms for symbolically determining what we now call integrals and derivatives, but he subsequently became fundamentally opposed to the idea, championed by Leibniz, of transforming mathematics into a discipline grounded in symbol manipulation. Newton thought the only way of rendering limits rigorous lay in extending geometry to incorporate them, a view that went entirely against the tide in the development of mathematics in the eighteenth and nineteenth ceturies. In chemistry Newton conducted a vast array of experiments, but the experimental tradition coming out of his Opticks, and not his experiments in chemistry, lay behind Lavoisier calling himself a Newtonian; indeed, one must wonder whether Lavoisier would even have associated his new form of chemistry with Newton had he been aware of Newton's fascination with writings in the alchemical tradition. And even in theology, there is Newton the anti-Trinitarian mild heretic who was not that much more radical in his departures from Roman and Anglican Christianity than many others at the time, and Newton, the wild religious zealot predicting the end of the Earth, who did not emerge to public view until quite recently. There is surprisingly little cross-referencing of themes from one area of Newton's endeavors to another. The common element across almost all of them is that of a problem-solver extraordinaire, taking on one problem at a time and staying with it until he had found, usually rather promptly, a solution. All of his technical writings display this, but so too does his unpublished manuscript reconstructing Solomon's Temple from the biblical account of it and his posthumously published Chronology of the Ancient Kingdoms in which he attempted to infer from astronomical phenomena the dating of major events in the Old Testament. The Newton one encounters in his writings seems to compartmentalize his interests at any given moment. Whether he had a unified conception of what he was up to in all his intellectual efforts, and if so what this conception might be, has been a continuing source of controversy among Newton scholars. Of course, were it not for the Principia, there would be no entry at all for Newton in an Encyclopedia of Philosophy. In science, he would have been known only for the contributions he made to optics, which, while notable, were no more so than those made by Huygens and Grimaldi, neither of whom had much impact on philosophy; and in mathematics, his failure to publish would have relegated his work to not much more than a footnote to the achievements of Leibniz and his school. Regardless of which aspect of Newton's endeavors “Newtonian” might be applied to, the word gained its aura from the Principia. But this adds still a further complication, for the Principia itself was substantially different things to different people. The press-run of the first edition (estimated to be around 300) was too small for it to have been read by all that many individuals. The second edition also appeared in two pirated Amsterdam editions, and hence was much more widely available, as was the third edition and its English (and later French) translation. The Principia, however, is not an easy book to read, so one must still ask, even of those who had access to it, whether they read all or only portions of the book and to what extent they grasped the full complexity of what they read. The detailed commentary provided in the three volume Jesuit edition (1739–42) made the work less daunting. But even then the vast majority of those invoking the word “Newtonian” were unlikely to have been much more conversant with the Principia itself than those in the first half of the 20th century who invoked ‘relativity’ were likely to have read Einstein's two special relativity papers of 1905 or his general relativity paper of 1916. An important question to ask of any philosophers commenting on Newton is, what primary sources had they read? The 1740s witnessed a major transformation in the standing of the science in the Principia. The Principia itself had left a number of loose-ends, most of them detectable by only highly discerning readers. By 1730, however, some of these loose-ends had been cited in Bernard le Bovier de Fontenelle's elogium for Newton[4] and in John Machin's appendix to the 1729 English translation of the Principia, raising questions about just how secure Newton's theory of gravity was, empirically. The shift on the continent began in the 1730s when Maupertuis convinced the Royal Academy to conduct expeditions to Lapland and Peru to determine whether Newton's claims about the non-spherical shape of the Earth and the variation of surface gravity with latitude are correct. Several of the loose-ends were successfully resolved during the 1740's through such notable advances beyond the Principia as Clairaut's Théorie de la Figure de la Terre; the return of the expedition from Peru; d'Alembert's 1749 rigid-body solution for the wobble of the Earth that produces the precession of the equinoxes; Clairaut's 1749 resolution of the factor of 2 discrepancy between theory and observation in the mean motion of the lunar apogee, glossed over by Newton but emphasized by Machin; and the prize-winning first ever successful description of the motion of the Moon by Tobias Mayer in 1753, based on a theory of this motion derived from gravity by Euler in the early 1750s taking advantage of Clairaut's solution for the mean motion of the apogee. Euler was the central figure in turning the three laws of motion put forward by Newton in the Principia into Newtonian mechanics. These three laws, as Newton formulated them, apply to “point-masses,” a term Euler had put forward in his Mechanica of 1736. Most of the effort of eighteenth century mechanics was devoted to solving problems of the motion of rigid bodies, elastic strings and bodies, and fluids, all of which require principles beyond Newton's three laws. From the 1740s on this led to alternative approaches to formulating a general mechanics, employing such different principles as the conservation of vis viva, the principle of least action, and d'Alembert's principle. The “Newtonian” formulation of a general mechanics sprang from Euler's proposal in 1750 that Newton's second law, in an F=ma formulation that appears nowhere in the Principia, could be applied locally within bodies and fluids to yield differential equations for the motions of bodies, elastic and rigid, and fluids. During the 1750s Euler developed his equations for the motion of fluids, and in the 1760s, his equations of rigid-body motion. What we call Newtonian mechanics was accordingly something for which Euler was more responsible than Newton. Although some loose-ends continued to defy resolution until much later in the eighteenth century, by the early 1750s Newton's theory of gravity had become the accepted basis for ongoing research among almost everyone working in orbital astronomy. Clairaut's successful prediction of the month of return of Halley's comet at the end of this decade made a larger segment of the educated public aware of the extent to which empirical grounds for doubting Newton's theory of gravity had largely disappeared. Even so, one must still ask of anyone outside active research in gravitational astronomy just how aware they were of the developments from ongoing efforts when they made their various pronouncements about the standing of the science of the Principia among the community of researchers. The naivety of these pronouncements cuts both ways: on the one hand, they often reflected a bloated view of how secure Newton's theory was at the time, and, on the other, they often underestimated how strong the evidence favoring it had become. The upshot is a need to be attentive to the question of what anyone, even including Newton himself, had in mind when they spoke of the science of the Principia. To view the seventy years of research after Newton died as merely tying up the loose-ends of the Principia or as simply compiling more evidence for his theory of gravity is to miss the whole point. Research predicated on Newton's theory had answered a huge number of questions about the world dating from long before it. The motion of the Moon and the trajectories of comets were two early examples, both of which answered such questions as how one comet differs from another and what details make the Moon's motion so much more complicated than that of the satellites of Jupiter and Saturn. In the 1770s Laplace had developed a proper theory of the tides, reaching far beyond the suggestions Newton had made in the Principia by including the effects of the Earth's rotation and the non-radial components of the gravitational forces of the Sun and Moon, components that dominate the radial component that Newton had singled out. In 1786 Laplace identified a large 900 year fluctuation in the motions of Jupiter and Saturn arising from quite subtle features of their respective orbits. With this discovery, calculation of the motion of the planets from the theory of gravity became the basis for predicting planet positions, with observation serving primarily to identify further forces not yet taken into consideration in the calculation. These advances in our understanding of planetary motion led Laplace to produce the four principal volumes of his Traité de mécanique céleste from 1799 to 1805, a work collecting in one place all the theoretical and empirical results of the research predicated on Newton's Principia. From that time forward, Newtonian science sprang from Laplace's work, not Newton's. The success of the research in celestial mechanics predicated on the Principia was unprecedented. Nothing of comparable scope and accuracy had ever occurred before in empirical research of any kind. That led to a new philosophical question: what was it about the science of the Principia that enabled it to achieve what it did? Philosophers like Locke and Berkeley began asking this question while Newton was still alive, but it gained increasing force as successes piled on one another over the decades after he died. This question had a practical side, as those working in other fields like chemistry pursued comparable success, and others like Hume and Adam Smith aimed for a science of human affairs. It had, of course, a philosophical side, giving rise to the subdiscipline of philosophy of science, starting with Kant and continuing throughout the nineteenth century as other areas of physical science began showing similar signs of success. The Einsteinian revolution in the beginning of the twentieth century, in which Newtonian theory was shown to hold only as a limiting case of the special and general theories of relativity, added a further twist to the question, for now all the successes of Newtonian science, which still remain in place, have to be seen as predicated on a theory that holds only to high approximation in parochial circumstances. The extraordinary character of the Principia gave rise to a still continuing tendency to place great weight on everything Newton said. This, however, was, and still is, easy to carry to excess. One need look no further than Book 2 of the Principia to see that Newton had no more claim to being somehow in tune with nature and the truth than any number of his contemporaries. Newton's manuscripts do reveal an exceptional level of attention to detail of phrasing, from which we can rightly conclude that his pronouncements, especially in print, were generally backed by careful, self-critical reflection. But this conclusion does not automatically extend to every statement he ever made. We must constantly be mindful of the possibility of too much weight being placed, then or now, on any pronouncement that stands in relative isolation over his 60 year career; and, to counter the tendency to excess, we should be even more vigilant than usual in not losing sight of the context, circumstantial as well as historical and textual, of both Newton's statements and the eighteenth century reaction to them. Philosophiae Naturalis Principia Mathematica (“Mathematical Principles of Natural Philosophy”), London, 1687; Cambridge, 1713; London, 1726. Isaac Newton's Philosophiae Naturalis Principia Mathematica, the Third Edition with Variant Readings, ed. A. Koyré and I. B. Cohen, 2 vols., Cambridge: Harvard University Press and Cambridge: Cambridge University Press, 1972. The Principia: Mathematical Principles of Natural Philosophy: A New Translation, tr. I. B. Cohen and Anne Whitman, preceded by “A Guide to Newton'sPrincipia” by I. B. Cohen, Berkeley: University of California Press, 1999. Opticks or A Treatise of the Reflections, Refractions, Inflections & Colors of Light, London, 1704 (English), 1706 (Latin), 1717/18 (English). Now available under the same title, but based on the fourth posthumous edition of 1730, New York: Dover Publications, 1952. The Chronology of Ancient Kingdoms Amended, ed. John Conduit, London,1728. The System of the World, London, 1728. The original version of the third book of the Principia, retitled by the translator and reissued in reprint form, London: Dawsons of Pall Mall, 1969. Observations upon the Prophecies of Daniel and the Apocalypse of St John, ed. Benjamin Smith, London and Dublin,1733. The Correspondence of Isaac Newton, ed. H. W. Turnbull, J. F. Scott, A. R. Hall, and L. Tilling, 7 vols., Cambridge: Cambridge University Press, 1959–1984. The Mathematical Papers of Isaac Newton, ed. D. T. Whiteside, 8 vols., Cambridge: Cambridge University Press, 1967–81. The Mathematical Works of Isaac Newton, ed. D. T. Whiteside, 2 vols., New York: Johnson Reprint Corporation, 1964, 1967. Contains facsimile reprints of the translations into English published during the first half of the 18th century. Unpublished Scientific Papers of Isaac Newton, ed. A. R. Hall and M. B. Hall, Cambridge: Cambridge University Press, 1962. Isaac Newton's Papers and Letters on Natural Philosophy, 2nd ed., ed. I. B. Cohen and R. E. Schofield, Cambridge: Harvard University Press, 1978. Contains all the papers on optics published in the early 1670s, the letters to Bentley, and Fontenelle's Elogium, among other things). The Optical Papers of Isaac Newton: Volume 1, The Optical Lectures, 1670–72, ed. Alan E. Shapiro, Cambridge University Press, 1984; volume 2 forthcoming. Philosophical Writings, ed. A. Janiak, Cambridge: Cambridge University Press, 2004. Westfall, Richard S., 1980, Never At Rest: A Biography of Isaac Newton, New York: Cambridge University Press. Hall, A. Rupert, 1992, Isaac Newton: Adventurer in Thought, Oxford: Blackwell. Feingold, Mordechai, 2004, The Newtonian Moment: Isaac Newton and the Making of Modern Culture, Oxford: Oxford University Press. Iliffe, Rob, 2007, Newton: A Very Short Introduction Oxford: Oxford University Press. Cohen, I. B. and Smith, G. E., 2002, The Cambridge Companion to Newton, Cambridge: Cambridge University Press. Cohen, I. B. and Westfall, R. S., 1995, Newton: Texts, Backgrounds, and Commentaries, A Norton Critical Edition, New York: Norton. How to cite this entry. Preview the PDF version of this entry at the Friends of the SEP Society. Look up topics and thinkers related to this entry at the Internet Philosophy Ontology Project (InPhO). Enhanced bibliography for this entry at PhilPapers, with links to its database. Other Internet Resources MacTutor History of Mathematics Archive The Newton Project-Canada The Chymistry of Isaac Newton, Digital Library at Indiana Copernicus, Nicolaus | Descartes, René | Kant, Immanuel | Leibniz, Gottfried Wilhelm | Newton, Isaac: Philosophiae Naturalis Principia Mathematica | scientific revolutions | trinity | Whewell, William Copyright © 2007 by George Smith Open access to the SEP is made possible by a world-wide funding initiative. The Encyclopedia Now Needs Your Support Please Read How You Can Help Keep the Encyclopedia Free Editorial Information PDFs for SEP Friends View this site from another server: USA (Main Site) Philosophy, Stanford University Info about mirror sites The Stanford Encyclopedia of Philosophy is copyright © 2024 by The Metaphysics Research Lab, Department of Philosophy, Stanford University Library of Congress Catalog Data: ISSN 1095-5054 timestamp: 2024-07-29T20:46:15 title: Isaac Newton (Stanford Encyclopedia of Philosophy) url: https://plato.stanford.edu/Entries/newton/ - id: web-search_3 snippet: >- ShowsThis Day In HistoryScheduleTopicsStories Find History on Facebook (Opens in a new window) Find History on Twitter (Opens in a new window) Find History on YouTube (Opens in a new window) Find History on Instagram (Opens in a new window) Find History on TikTok (Opens in a new window) By: History.com Editors Updated: October 16, 2023 | Original: March 10, 2015 copy page linkPrint Page Isaac Newton is best know for his theory about the law of gravity, but his “Principia Mathematica” (1686) with its three laws of motion greatly influenced the Enlightenment in Europe. Born in 1643 in Woolsthorpe, England, Sir Isaac Newton began developing his theories on light, calculus and celestial mechanics while on break from Cambridge University. Years of research culminated with the 1687 publication of “Principia,” a landmark work that established the universal laws of motion and gravity. Newton’s second major book, “Opticks,” detailed his experiments to determine the properties of light. Also a student of Biblical history and alchemy, the famed scientist served as president of the Royal Society of London and master of England’s Royal Mint until his death in 1727. Isaac Newton: Early Life and Education Isaac Newton was born on January 4, 1643, in Woolsthorpe, Lincolnshire, England. The son of a farmer who died three months before he was born, Newton spent most of his early years with his maternal grandmother after his mother remarried. His education was interrupted by a failed attempt to turn him into a farmer, and he attended the King’s School in Grantham before enrolling at the University of Cambridge’s Trinity College in 1661. Newton studied a classical curriculum at Cambridge, but he became fascinated by the works of modern philosophers such as René Descartes, even devoting a set of notes to his outside readings he titled “Quaestiones Quaedam Philosophicae” (“Certain Philosophical Questions”). When the Great Plague shuttered Cambridge in 1665, Newton returned home and began formulating his theories on calculus, light and color, his farm the setting for the supposed falling apple that inspired his work on gravity. History Shorts: Isaac Newton's Genius in Quarantine (Forged in Crisis) Isaac Newton’s Telescope and Studies on Light Newton returned to Cambridge in 1667 and was elected a minor fellow. He constructed the first reflecting telescope in 1668, and the following year he received his Master of Arts degree and took over as Cambridge’s Lucasian Professor of Mathematics. Asked to give a demonstration of his telescope to the Royal Society of London in 1671, he was elected to the Royal Society the following year and published his notes on optics for his peers. Through his experiments with refraction, Newton determined that white light was a composite of all the colors on the spectrum, and he asserted that light was composed of particles instead of waves. His methods drew sharp rebuke from established Society member Robert Hooke, who was unsparing again with Newton’s follow-up paper in 1675. Known for his temperamental defense of his work, Newton engaged in heated correspondence with Hooke before suffering a nervous breakdown and withdrawing from the public eye in 1678. In the following years, he returned to his earlier studies on the forces governing gravity and dabbled in alchemy. Isaac Newton and the Law of Gravity In 1684, English astronomer Edmund Halley paid a visit to the secluded Newton. Upon learning that Newton had mathematically worked out the elliptical paths of celestial bodies, Halley urged him to organize his notes. The result was the 1687 publication of “Philosophiae Naturalis Principia Mathematica” (Mathematical Principles of Natural Philosophy), which established the three laws of motion and the law of universal gravity. Newton’s three laws of motion state that (1) Every object in a state of uniform motion will remain in that state of motion unless an external force acts on it; (2) Force equals mass times acceleration: F=MA and (3) For every action there is an equal and opposite reaction. “Principia” propelled Newton to stardom in intellectual circles, eventually earning universal acclaim as one of the most important works of modern science. His work was a foundational part of the European Enlightenment. With his newfound influence, Newton opposed the attempts of King James II to reinstitute Catholic teachings at English Universities. King James II was replaced by his protestant daughter Mary and her husband William of Orange as part of the Glorious Revolution of 1688, and Newton was elected to represent Cambridge in Parliament in 1689. Newton moved to London permanently after being named warden of the Royal Mint in 1696, earning a promotion to master of the Mint three years later. Determined to prove his position wasn’t merely symbolic, Newton moved the pound sterling from the silver to the gold standard and sought to punish counterfeiters. The death of Hooke in 1703 allowed Newton to take over as president of the Royal Society, and the following year he published his second major work, “Opticks.” Composed largely from his earlier notes on the subject, the book detailed Newton’s painstaking experiments with refraction and the color spectrum, closing with his ruminations on such matters as energy and electricity. In 1705, he was knighted by Queen Anne of England. Isaac Newton: Founder of Calculus? Around this time, the debate over Newton’s claims to originating the field of calculus exploded into a nasty dispute. Newton had developed his concept of “fluxions” (differentials) in the mid 1660s to account for celestial orbits, though there was no public record of his work. In the meantime, German mathematician Gottfried Leibniz formulated his own mathematical theories and published them in 1684. As president of the Royal Society, Newton oversaw an investigation that ruled his work to be the founding basis of the field, but the debate continued even after Leibniz’s death in 1716. Researchers later concluded that both men likely arrived at their conclusions independent of one another. Death of Isaac Newton Newton was also an ardent student of history and religious doctrines, and his writings on those subjects were compiled into multiple books that were published posthumously. Having never married, Newton spent his later years living with his niece at Cranbury Park near Winchester, England. He died in his sleep on March 31, 1727, and was buried in Westminster Abbey. A giant even among the brilliant minds that drove the Scientific Revolution, Newton is remembered as a transformative scholar, inventor and writer. He eradicated any doubts about the heliocentric model of the universe by establishing celestial mechanics, his precise methodology giving birth to what is known as the scientific method. Although his theories of space-time and gravity eventually gave way to those of Albert Einstein, his work remains the bedrock on which modern physics was built. “If I have seen further it is by standing on the shoulders of Giants.” “I can calculate the motion of heavenly bodies but not the madness of people.” “What we know is a drop, what we don't know is an ocean.” “Gravity explains the motions of the planets, but it cannot explain who sets the planets in motion.” “No great discovery was ever made without a bold guess.” HISTORY Vault: Sir Isaac Newton: Gravity of Genius Explore the life of Sir Isaac Newton, who laid the foundations for calculus and defined the laws of gravity. Sign up for Inside History Get HISTORY’s most fascinating stories delivered to your inbox three times a week. By submitting your information, you agree to receive emails from HISTORY and A+E Networks. You can opt out at any time. You must be 16 years or older and a resident of the United States. More details: Privacy Notice | Terms of Use | Contact Us timestamp: 2024-08-13T07:37:00 title: Isaac Newton ‑ Facts, Biography & Laws url: https://www.history.com/topics/inventions/isaac-newton - id: web-search_4 snippet: >- Isaac Newton was an English physicist and mathematician famous for his laws of physics. He was a key figure in the Scientific Revolution of the 17th century. Updated: Nov 05, 2020 10:32 AM EST Photo: Painting by Godfrey Kneller, [Public Domain], via Wikimedia Commons//Getty Images Who Was Isaac Newton? Isaac Newton was a physicist and mathematician who developed the principles of modern physics, including the laws of motion and is credited as one of the great minds of the 17th-century Scientific Revolution. In 1687, he published his most acclaimed work, Philosophiae Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy), which has been called the single most influential book on physics. In 1705, he was knighted by Queen Anne of England, making him Sir Isaac Newton. Early Life and Family Newton was born on January 4, 1643, in Woolsthorpe, Lincolnshire, England. Using the "old" Julian calendar, Newton's birth date is sometimes displayed as December 25, 1642. Newton was the only son of a prosperous local farmer, also named Isaac, who died three months before he was born. A premature baby born tiny and weak, Newton was not expected to survive. When he was 3 years old, his mother, Hannah Ayscough Newton, remarried a well-to-do minister, Barnabas Smith, and went to live with him, leaving young Newton with his maternal grandmother. The experience left an indelible imprint on Newton, later manifesting itself as an acute sense of insecurity. He anxiously obsessed over his published work, defending its merits with irrational behavior. At age 12, Newton was reunited with his mother after her second husband died. She brought along her three small children from her second marriage. Isaac Newton's Education Newton was enrolled at the King's School in Grantham, a town in Lincolnshire, where he lodged with a local apothecary and was introduced to the fascinating world of chemistry. His mother pulled him out of school at age 12. Her plan was to make him a farmer and have him tend the farm. Newton failed miserably, as he found farming monotonous. Newton was soon sent back to King's School to finish his basic education. Perhaps sensing the young man's innate intellectual abilities, his uncle, a graduate of the University of Cambridge's Trinity College, persuaded Newton's mother to have him enter the university. Newton enrolled in a program similar to a work-study in 1661, and subsequently waited on tables and took care of wealthier students' rooms. Scientific Revolution When Newton arrived at Cambridge, the Scientific Revolution of the 17th century was already in full force. The heliocentric view of the universe—theorized by astronomers Nicolaus Copernicus and Johannes Kepler, and later refined by Galileo—was well known in most European academic circles. Philosopher René Descartes had begun to formulate a new concept of nature as an intricate, impersonal and inert machine. Yet, like most universities in Europe, Cambridge was steeped in Aristotelian philosophy and a view of nature resting on a geocentric view of the universe, dealing with nature in qualitative rather than quantitative terms. During his first three years at Cambridge, Newton was taught the standard curriculum but was fascinated with the more advanced science. All his spare time was spent reading from the modern philosophers. The result was a less-than-stellar performance, but one that is understandable, given his dual course of study. It was during this time that Newton kept a second set of notes, entitled "Quaestiones Quaedam Philosophicae" ("Certain Philosophical Questions"). The "Quaestiones" reveal that Newton had discovered the new concept of nature that provided the framework for the Scientific Revolution. Though Newton graduated without honors or distinctions, his efforts won him the title of scholar and four years of financial support for future education. In 1665, the bubonic plague that was ravaging Europe had come to Cambridge, forcing the university to close. After a two-year hiatus, Newton returned to Cambridge in 1667 and was elected a minor fellow at Trinity College, as he was still not considered a standout scholar. In the ensuing years, his fortune improved. Newton received his Master of Arts degree in 1669, before he was 27. During this time, he came across Nicholas Mercator's published book on methods for dealing with infinite series. Newton quickly wrote a treatise, De Analysi, expounding his own wider-ranging results. He shared this with friend and mentor Isaac Barrow, but didn't include his name as author. In June 1669, Barrow shared the unaccredited manuscript with British mathematician John Collins. In August 1669, Barrow identified its author to Collins as "Mr. Newton ... very young ... but of an extraordinary genius and proficiency in these things." Newton's work was brought to the attention of the mathematics community for the first time. Shortly afterward, Barrow resigned his Lucasian professorship at Cambridge, and Newton assumed the chair. Isaac Newton’s Discoveries Newton made discoveries in optics, motion and mathematics. Newton theorized that white light was a composite of all colors of the spectrum, and that light was composed of particles. His momentous book on physics, Principia, contains information on nearly all of the essential concepts of physics except energy, ultimately helping him to explain the laws of motion and the theory of gravity. Along with mathematician Gottfried Wilhelm von Leibniz, Newton is credited for developing essential theories of calculus. Isaac Newton Inventions Newton's first major public scientific achievement was designing and constructing a reflecting telescope in 1668. As a professor at Cambridge, Newton was required to deliver an annual course of lectures and chose optics as his initial topic. He used his telescope to study optics and help prove his theory of light and color. The Royal Society asked for a demonstration of his reflecting telescope in 1671, and the organization's interest encouraged Newton to publish his notes on light, optics and color in 1672. These notes were later published as part of Newton's Opticks: Or, A treatise of the Reflections, Refractions, Inflections and Colours of Light. Photo: Hulton Archive/Getty Images Sir Isaac Newton contemplates the force of gravity, as the famous story goes, on seeing an apple fall in his orchard, circa 1665. Between 1665 and 1667, Newton returned home from Trinity College to pursue his private study, as school was closed due to the Great Plague. Legend has it that, at this time, Newton experienced his famous inspiration of gravity with the falling apple. According to this common myth, Newton was sitting under an apple tree when a fruit fell and hit him on the head, inspiring him to suddenly come up with the theory of gravity. While there is no evidence that the apple actually hit Newton on the head, he did see an apple fall from a tree, leading him to wonder why it fell straight down and not at an angle. Consequently, he began exploring the theories of motion and gravity. It was during this 18-month hiatus as a student that Newton conceived many of his most important insights—including the method of infinitesimal calculus, the foundations for his theory of light and color, and the laws of planetary motion—that eventually led to the publication of his physics book Principia and his theory of gravity. Isaac Newton’s Laws of Motion In 1687, following 18 months of intense and effectively nonstop work, Newton published Philosophiae Naturalis Principia Mathematica (Mathematical Principles of Natural Philosophy), most often known as Principia. Principia is said to be the single most influential book on physics and possibly all of science. Its publication immediately raised Newton to international prominence. Principia offers an exact quantitative description of bodies in motion, with three basic but important laws of motion: A stationary body will stay stationary unless an external force is applied to it. Force is equal to mass times acceleration, and a change in motion (i.e., change in speed) is proportional to the force applied. For every action, there is an equal and opposite reaction. Newton and the Theory of Gravity Newton’s three basic laws of motion outlined in Principia helped him arrive at his theory of gravity. Newton’s law of universal gravitation states that two objects attract each other with a force of gravitational attraction that’s proportional to their masses and inversely proportional to the square of the distance between their centers. These laws helped explain not only elliptical planetary orbits but nearly every other motion in the universe: how the planets are kept in orbit by the pull of the sun’s gravity; how the moon revolves around Earth and the moons of Jupiter revolve around it; and how comets revolve in elliptical orbits around the sun. They also allowed him to calculate the mass of each planet, calculate the flattening of the Earth at the poles and the bulge at the equator, and how the gravitational pull of the sun and moon create the Earth’s tides. In Newton's account, gravity kept the universe balanced, made it work, and brought heaven and Earth together in one great equation. DOWNLOAD BIOGRAPHY'S ISAAC NEWTON FACT CARD Isaac Newton & Robert Hooke Not everyone at the Royal Academy was enthusiastic about Newton’s discoveries in optics and 1672 publication of Opticks: Or, A treatise of the Reflections, Refractions, Inflections and Colours of Light. Among the dissenters was Robert Hooke, one of the original members of the Royal Academy and a scientist who was accomplished in a number of areas, including mechanics and optics. While Newton theorized that light was composed of particles, Hooke believed it was composed of waves. Hooke quickly condemned Newton's paper in condescending terms, and attacked Newton's methodology and conclusions. Hooke was not the only one to question Newton's work in optics. Renowned Dutch scientist Christiaan Huygens and a number of French Jesuits also raised objections. But because of Hooke's association with the Royal Society and his own work in optics, his criticism stung Newton the worst. Unable to handle the critique, he went into a rage—a reaction to criticism that was to continue throughout his life. Newton denied Hooke's charge that his theories had any shortcomings and argued the importance of his discoveries to all of science. In the ensuing months, the exchange between the two men grew more acrimonious, and soon Newton threatened to quit the Royal Society altogether. He remained only when several other members assured him that the Fellows held him in high esteem. The rivalry between Newton and Hooke would continue for several years thereafter. Then, in 1678, Newton suffered a complete nervous breakdown and the correspondence abruptly ended. The death of his mother the following year caused him to become even more isolated, and for six years he withdrew from intellectual exchange except when others initiated correspondence, which he always kept short. During his hiatus from public life, Newton returned to his study of gravitation and its effects on the orbits of planets. Ironically, the impetus that put Newton on the right direction in this study came from Robert Hooke. In a 1679 letter of general correspondence to Royal Society members for contributions, Hooke wrote to Newton and brought up the question of planetary motion, suggesting that a formula involving the inverse squares might explain the attraction between planets and the shape of their orbits. Subsequent exchanges transpired before Newton quickly broke off the correspondence once again. But Hooke's idea was soon incorporated into Newton's work on planetary motion, and from his notes it appears he had quickly drawn his own conclusions by 1680, though he kept his discoveries to himself. In early 1684, in a conversation with fellow Royal Society members Christopher Wren and Edmond Halley, Hooke made his case on the proof for planetary motion. Both Wren and Halley thought he was on to something, but pointed out that a mathematical demonstration was needed. In August 1684, Halley traveled to Cambridge to visit with Newton, who was coming out of his seclusion. Halley idly asked him what shape the orbit of a planet would take if its attraction to the sun followed the inverse square of the distance between them (Hooke's theory). Newton knew the answer, due to his concentrated work for the past six years, and replied, "An ellipse." Newton claimed to have solved the problem some 18 years prior, during his hiatus from Cambridge and the plague, but he was unable to find his notes. Halley persuaded him to work out the problem mathematically and offered to pay all costs so that the ideas might be published, which it was, in Newton’s Principia. Upon the publication of the first edition of Principia in 1687, Robert Hooke immediately accused Newton of plagiarism, claiming that he had discovered the theory of inverse squares and that Newton had stolen his work. The charge was unfounded, as most scientists knew, for Hooke had only theorized on the idea and had never brought it to any level of proof. Newton, however, was furious and strongly defended his discoveries. He withdrew all references to Hooke in his notes and threatened to withdraw from publishing the subsequent edition of Principia altogether. Halley, who had invested much of himself in Newton's work, tried to make peace between the two men. While Newton begrudgingly agreed to insert a joint acknowledgment of Hooke's work (shared with Wren and Halley) in his discussion of the law of inverse squares, it did nothing to placate Hooke. As the years went on, Hooke's life began to unravel. His beloved niece and companion died the same year that Principia was published, in 1687. As Newton's reputation and fame grew, Hooke's declined, causing him to become even more bitter and loathsome toward his rival. To the very end, Hooke took every opportunity he could to offend Newton. Knowing that his rival would soon be elected president of the Royal Society, Hooke refused to retire until the year of his death, in 1703. Following the publication of Principia, Newton was ready for a new direction in life. He no longer found contentment in his position at Cambridge and was becoming more involved in other issues. He helped lead the resistance to King James II's attempts to reinstitute Catholic teaching at Cambridge, and in 1689 he was elected to represent Cambridge in Parliament. While in London, Newton acquainted himself with a broader group of intellectuals and became acquainted with political philosopher John Locke. Though many of the scientists on the continent continued to teach the mechanical world according to Aristotle, a young generation of British scientists became captivated with Newton's new view of the physical world and recognized him as their leader. One of these admirers was Nicolas Fatio de Duillier, a Swiss mathematician whom Newton befriended while in London. However, within a few years, Newton fell into another nervous breakdown in 1693. The cause is open to speculation: his disappointment over not being appointed to a higher position by England's new monarchs, William III and Mary II, or the subsequent loss of his friendship with Duillier; exhaustion from being overworked; or perhaps chronic mercury poisoning after decades of alchemical research. It's difficult to know the exact cause, but evidence suggests that letters written by Newton to several of his London acquaintances and friends, including Duillier, seemed deranged and paranoiac, and accused them of betrayal and conspiracy. Oddly enough, Newton recovered quickly, wrote letters of apology to friends, and was back to work within a few months. He emerged with all his intellectual facilities intact, but seemed to have lost interest in scientific problems and now favored pursuing prophecy and scripture and the study of alchemy. While some might see this as work beneath the man who had revolutionized science, it might be more properly attributed to Newton responding to the issues of the time in turbulent 17th century Britain. Many intellectuals were grappling with the meaning of many different subjects, not least of which were religion, politics and the very purpose of life. Modern science was still so new that no one knew for sure how it measured up against older philosophies. In 1696, Newton was able to attain the governmental position he had long sought: warden of the Mint; after acquiring this new title, he permanently moved to London and lived with his niece, Catherine Barton. Barton was the mistress of Lord Halifax, a high-ranking government official who was instrumental in having Newton promoted, in 1699, to master of the Mint—a position that he would hold until his death. Not wanting it to be considered a mere honorary position, Newton approached the job in earnest, reforming the currency and severely punishing counterfeiters. As master of the Mint, Newton moved the British currency, the pound sterling, from the silver to the gold standard. In 1703, Newton was elected president of the Royal Society upon Robert Hooke's death. However, Newton never seemed to understand the notion of science as a cooperative venture, and his ambition and fierce defense of his own discoveries continued to lead him from one conflict to another with other scientists. By most accounts, Newton's tenure at the society was tyrannical and autocratic; he was able to control the lives and careers of younger scientists with absolute power. In 1705, in a controversy that had been brewing for several years, German mathematician Gottfried Leibniz publicly accused Newton of plagiarizing his research, claiming he had discovered infinitesimal calculus several years before the publication of Principia. In 1712, the Royal Society appointed a committee to investigate the matter. Of course, since Newton was president of the society, he was able to appoint the committee's members and oversee its investigation. Not surprisingly, the committee concluded Newton's priority over the discovery. That same year, in another of Newton's more flagrant episodes of tyranny, he published without permission the notes of astronomer John Flamsteed. It seems the astronomer had collected a massive body of data from his years at the Royal Observatory at Greenwich, England. Newton had requested a large volume of Flamsteed's notes for his revisions to Principia. Annoyed when Flamsteed wouldn't provide him with more information as quickly as he wanted it, Newton used his influence as president of the Royal Society to be named the chairman of the body of "visitors" responsible for the Royal Observatory. He then tried to force the immediate publication of Flamsteed's catalogue of the stars, as well as all of Flamsteed's notes, edited and unedited. To add insult to injury, Newton arranged for Flamsteed's mortal enemy, Edmund Halley, to prepare the notes for press. Flamsteed was finally able to get a court order forcing Newton to cease his plans for publication and return the notes—one of the few times that Newton was bested by one of his rivals. Toward the end of this life, Newton lived at Cranbury Park, near Winchester, England, with his niece, Catherine (Barton) Conduitt, and her husband, John Conduitt. By this time, Newton had become one of the most famous men in Europe. His scientific discoveries were unchallenged. He also had become wealthy, investing his sizable income wisely and bestowing sizable gifts to charity. Despite his fame, Newton's life was far from perfect: He never married or made many friends, and in his later years, a combination of pride, insecurity and side trips on peculiar scientific inquiries led even some of his few friends to worry about his mental stability. By the time he reached 80 years of age, Newton was experiencing digestion problems and had to drastically change his diet and mobility. In March 1727, Newton experienced severe pain in his abdomen and blacked out, never to regain consciousness. He died the next day, on March 31, 1727, at the age of 84. Newton's fame grew even more after his death, as many of his contemporaries proclaimed him the greatest genius who ever lived. Maybe a slight exaggeration, but his discoveries had a large impact on Western thought, leading to comparisons to the likes of Plato, Aristotle and Galileo. Although his discoveries were among many made during the Scientific Revolution, Newton's universal principles of gravity found no parallels in science at the time. Of course, Newton was proven wrong on some of his key assumptions. In the 20th century, Albert Einstein would overturn Newton's concept of the universe, stating that space, distance and motion were not absolute but relative and that the universe was more fantastic than Newton had ever conceived. Newton might not have been surprised: In his later life, when asked for an assessment of his achievements, he replied, "I do not know what I may appear to the world; but to myself I seem to have been only like a boy playing on the seashore, and diverting myself now and then in finding a smoother pebble or prettier shell than ordinary, while the great ocean of truth lay all undiscovered before me." Birth date: January 4, 1643 Birth City: Woolsthorpe, Lincolnshire, England Birth Country: United Kingdom Best Known For: Isaac Newton was an English physicist and mathematician famous for his laws of physics. He was a key figure in the Scientific Revolution of the 17th century. Science and Medicine Technology and Engineering Education and Academia Astrological Sign: Capricorn University of Cambridge, Trinity College Isaac Newton helped develop the principles of modern physics, including the laws of motion, and is credited as one of the great minds of the 17th-century Scientific Revolution. In 1687, Newton published his most acclaimed work, 'Philosophiae Naturalis Principia Mathematica' ('Mathematical Principles of Natural Philosophy'), which has been called the single most influential book on physics. Newton's theory of gravity states that two objects attract each other with a force of gravitational attraction that’s proportional to their masses and inversely proportional to the square of the distance between their centers. Death date: March 31, 1727 Death City: London, England Death Country: United Kingdom We strive for accuracy and fairness.If you see something that doesn't look right,contact us! CITATION INFORMATION Article Title: Isaac Newton Biography Author: Biography.com Editors Website Name: The Biography.com website Url: https://www.biography.com/scientists/isaac-newton Publisher: A&E; Television Networks Last Updated: November 5, 2020 Original Published Date: April 3, 2014 I do not know what I may appear to the world; but to myself I seem to have been only like a boy playing on the seashore, and diverting myself now and then in finding a smoother pebble or prettier shell than ordinary, while the great ocean of truth lay all undiscovered before me. Plato is my friend, Aristotle is my friend, but my greatest friend is truth. If I have seen further it is by standing on the shoulders of giants. It is the perfection of God's works that they are all done with the greatest simplicity. Every body continues in its state of rest, or of uniform motion in a right line, unless it is compelled to change that state by forces impressed upon it. To every action there is always opposed an equal reaction: or, the mutual actions of two bodies upon each other are always equal, and directed to contrary parts. I see I have made myself a slave to philosophy. The changing of bodies into light, and light into bodies, is very conformable to the course of nature, which seems delighted with transmutations. To explain all nature is too difficult a task for any one man or even for any one age. Tis much better to do a little with certainty and leave the rest for others that come after, then to explain all things by conjecture without making sure of any thing. Truth is ever to be found in simplicity, and not in the multiplicity and confusion of things. Atheism is so senseless and odious to mankind that it never had many professors. Newton was not the first of the age of reason. He was the last of the magicians, the last of the Babylonians and Sumerians, the last great mind that looked out on the visible and intellectual world with the same eyes as those who began to build our intellectual inheritance rather less than 10,000 years ago. Advertisement - Continue Reading Below Famous British People Advertisement - Continue Reading Below The Real Royal Scheme Depicted in ‘Mary & George’ Advertisement - Continue Reading Below timestamp: 2024-08-13T07:52:50 title: Isaac Newton - Quotes, Facts & Laws url: https://www.biography.com/scientists/isaac-newton - id: web-search_5 snippet: >- Join our email list and be the first to learn about new programs, events, and collections updates!Sign Up Wednesday, August 14, 2024 Open today 4 PM - 11 PM Wednesday, August 14, 2024 Open today 4 PM - 11 PM Scientist of the Day Isaac Newton was born Jan. 4, 1643. It used to be that we celebrated Newton’s birthday on Dec. 25, for his own birth records attest that he came into the world on Christmas Day, 1642. But the Julian calendar in use in England at the time of Newton’s... Scientist of the Day - Isaac Newton Isaac Newton was born Jan. 4, 1643. It used to be that we celebrated Newton’s birthday on Dec. 25, for his own birth records attest that he came into the world on Christmas Day, 1642. But the Julian calendar in use in England at the time of Newton’s birth was 10 days behind the Gregorian calendar that had been adopted by most of the Continent, so if you had asked Christiaan Huygens or Pierre Fermat for Newton’s birthday, they would have said Jan. 4, 1643. The generally accepted practice among historians today is to convert all Julian dates between 1582 (when the Gregorian calendar was first implemented) and 1752 (when England finally adopted the “new style” calendar) to Gregorian dates, and we have done so here. Nearly everyone has heard of Isaac Newton and knows that he “discovered gravity”. What Newton actually proposed is the existence of a universal force of gravitation, so that any two objects in the universe are attracted to one another by a force that increases with the product of the masses of the two objects, and decreases with the square of the distance between them. With this force, Newton was able to explain: the rate at which an apple falls, the orbits of the moon and planets, the swing of a pendulum, the ebb and flow of the tides, and even the shape of the earth. Even though Newton did not know how this force acted at a distance, its explanatory power was so great that universal gravitation was almost universally adopted within twenty-five years of his death in 1727. Newton’s equation for the force of gravitation, and his famous “laws of motion”, first appeared in his Mathematical Principles of Natural Philosophy (1687), usually referred to as the Principia, after the third word of the Latin title. We have nearly every edition of the Principia ever published, including the first, in our History of Science Collection. The first English translation of 1729 includes a frontispiece that not only deifies Newton, but nicely represents the solar system as bound together by gravitational forces (third image). The copy of the 1687 Principia shown above (second image) is not our copy, but rather Newton’s own corrected copy, in the Cambridge University Library. Dr. William B. Ashworth, Jr., Consultant for the History of Science, Linda Hall Library and Associate Professor, Department of History, University of Missouri-Kansas City. Comments or corrections are welcome; please direct to ashworthw@umkc.edu. Margaret Lindsay Huggins Scientist of the Day Scientist of the Day Scientist of the Day Scientist of the Day Scientist of the Day Monday - Friday 10 AM - 5 PM Telephone816.363.4600 5109 Cherry Street Kansas City, Missouri 64110-2498 Acceptable Use Policy Terms and Conditions Linda Hall Library on FacebookLinda Hall Library on TwitterLinda Hall Library on TumblrLinda Hall Library on VimeoLinda Hall Library on InstagramLinda Hall Library on Youtube timestamp: 2024-08-14T18:39:29 title: Isaac Newton - Linda Hall Library url: https://www.lindahall.org/about/news/scientist-of-the-day/isaac-newton/ search_results: - search_query: text: Isaac Newton birth year generation_id: 9a497980-c3e2-4460-b81c-ef44d293f95d document_ids: - web-search_0 - web-search_1 - web-search_2 - web-search_3 - web-search_4 - web-search_5 connector: id: web-search search_queries: - text: Isaac Newton birth year generation_id: 9a497980-c3e2-4460-b81c-ef44d293f95d - code-samples: - sdk: go name: Documents code: > package main import ( "context" "errors" "io" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.ChatStream( context.TODO(), &cohere.ChatStreamRequest{ ChatHistory: []*cohere.Message{ { Role: "USER", User: &cohere.ChatMessage{ Message: "Who discovered gravity?", }, }, { Role: "CHATBOT", Chatbot: &cohere.ChatMessage{ Message: "The man who is widely credited with discovering gravity is Sir Isaac Newton", }, }}, Message: "What year was he born?", Connectors: []*cohere.ChatConnector{ {Id: "web-search"}, }, }, ) if err != nil { log.Fatal(err) } // Make sure to close the stream when you're done reading. // This is easily handled with defer. defer resp.Close() for { message, err := resp.Recv() if errors.Is(err, io.EOF) { // An io.EOF error means the server is done sending messages // and should be treated as a success. break } if message.TextGeneration != nil { log.Printf("%+v", resp) } } } - sdk: typescript name: Documents code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const response = await cohere.chat({ message: 'Who is more popular: Nsync or Backstreet Boys?', documents: [ { title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters', snippet: '↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak.', }, { title: 'CSPC: NSYNC Popularity Analysis - ChartMasters', snippet: "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold.", }, { title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters', snippet: ' 1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\n\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\n\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers.', }, { title: 'CSPC: NSYNC Popularity Analysis - ChartMasters', snippet: ' Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\n\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures.', }, ], }); console.log(response); })(); - sdk: java name: Documents code: > /* (C)2024 */ package chatpost; import com.cohere.api.Cohere; import com.cohere.api.requests.ChatRequest; import com.cohere.api.types.NonStreamedChatResponse; import java.util.List; import java.util.Map; public class Documents { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); NonStreamedChatResponse response = cohere.chat( ChatRequest.builder() .message("What year was he born?") .documents( List.of( Map.of( "title", "CSPC: Backstreet Boys Popularity" + " Analysis - ChartMasters", "snippet", "↓ Skip to Main Content\n\n" + "Music industry – One step" + " closer to being" + " accurate\n\n" + "CSPC: Backstreet Boys" + " Popularity Analysis\n\n" + "Hernán Lopez Posted on" + " February 9, 2017 Posted in" + " CSPC 72 Comments Tagged" + " with Backstreet Boys, Boy" + " band\n\n" + "At one point, Backstreet" + " Boys defined success:" + " massive albums sales across" + " the globe, great singles" + " sales, plenty of chart" + " topping releases, hugely" + " hyped tours and tremendous" + " media coverage.\n\n" + "It is true that they" + " benefited from" + " extraordinarily good market" + " conditions in all markets." + " After all, the all-time" + " record year for the music" + " business, as far as" + " revenues in billion dollars" + " are concerned, was actually" + " 1999. That is, back when" + " this five men group was at" + " its peak."), Map.of( "title", "CSPC: NSYNC Popularity Analysis -" + " ChartMasters", "snippet", "↓ Skip to Main Content\n\n" + "Music industry – One step" + " closer to being" + " accurate\n\n" + "CSPC: NSYNC Popularity" + " Analysis\n\n" + "MJD Posted on February 9," + " 2018 Posted in CSPC 27" + " Comments Tagged with Boy" + " band, N'Sync\n\n" + "At the turn of the" + " millennium three teen acts" + " were huge in the US, the" + " Backstreet Boys, Britney" + " Spears and NSYNC. The" + " latter is the only one we" + " haven’t study so far. It" + " took 15 years and Adele to" + " break their record of 2,4" + " million units sold of No" + " Strings Attached in its" + " first week alone.\n\n" + "It wasn’t a fluke, as the" + " second fastest selling" + " album of the Soundscan era" + " prior 2015, was also theirs" + " since Celebrity debuted" + " with 1,88 million units" + " sold."), Map.of( "title", "CSPC: Backstreet Boys Popularity" + " Analysis - ChartMasters", "snippet", " 1997, 1998, 2000 and 2001 also" + " rank amongst some of the" + " very best years.\n\n" + "Yet the way many music" + " consumers – especially" + " teenagers and young women’s" + " – embraced their output" + " deserves its own chapter." + " If Jonas Brothers and more" + " recently One Direction" + " reached a great level of" + " popularity during the past" + " decade, the type of success" + " achieved by Backstreet Boys" + " is in a completely" + " different level as they" + " really dominated the" + " business for a few years" + " all over the world," + " including in some countries" + " that were traditionally" + " hard to penetrate for" + " Western artists.\n\n" + "We will try to analyze the" + " extent of that hegemony" + " with this new article with" + " final results which will" + " more than surprise many" + " readers."), Map.of( "title", "CSPC: NSYNC Popularity Analysis -" + " ChartMasters", "snippet", " Was the teen group led by Justin" + " Timberlake really that big? Was it" + " only in the US where they found" + " success? Or were they a global" + " phenomenon?\n\n" + "As usual, I’ll be using the" + " Commensurate Sales to Popularity" + " Concept in order to relevantly" + " gauge their results. This concept" + " will not only bring you sales" + " information for all NSYNC‘s albums," + " physical and download singles, as" + " well as audio and video streaming," + " but it will also determine their" + " true popularity. If you are not yet" + " familiar with the CSPC method, the" + " next page explains it with a short" + " video. I fully recommend watching" + " the video before getting into the" + " sales figures."))) .build()); System.out.println(response); } } - sdk: python name: Documents code: > import cohere co = cohere.Client() response = co.chat( model="command-r-plus-08-2024", message="Who is more popular: Nsync or Backstreet Boys?", documents=[ { "title": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters", "snippet": "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: Backstreet Boys Popularity Analysis\n\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\n\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\n\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak.", }, { "title": "CSPC: NSYNC Popularity Analysis - ChartMasters", "snippet": "↓ Skip to Main Content\n\nMusic industry – One step closer to being accurate\n\nCSPC: NSYNC Popularity Analysis\n\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync\n\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\n\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold.", }, { "title": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters", "snippet": " 1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\n\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\n\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers.", }, { "title": "CSPC: NSYNC Popularity Analysis - ChartMasters", "snippet": " Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\n\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures.", }, ], ) print(response) - sdk: curl name: Documents code: >- curl --request POST \ --url https://api.cohere.com/v1/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "message": "Who is more popular: Nsync or Backstreet Boys?", "documents": [ { "title": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters", "snippet": "↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: Backstreet Boys Popularity Analysis\\n\\nHernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band\\n\\nAt one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage.\\n\\nIt is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak." }, { "title": "CSPC: NSYNC Popularity Analysis - ChartMasters", "snippet": "↓ Skip to Main Content\\n\\nMusic industry – One step closer to being accurate\\n\\nCSPC: NSYNC Popularity Analysis\\n\\nMJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, NSync\\n\\nAt the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone.\\n\\nIt wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold." }, { "title": "CSPC: Backstreet Boys Popularity Analysis - ChartMasters", "snippet": " 1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\\n\\nYet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists.\\n\\nWe will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers." }, { "title": "CSPC: NSYNC Popularity Analysis - ChartMasters", "snippet": " Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon?\\n\\nAs usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures." } ] }' request: message: "Who is more popular: Nsync or Backstreet Boys?" documents: - title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. - title: "CSPC: NSYNC Popularity Analysis - ChartMasters" snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: NSYNC Popularity Analysis MJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync At the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone. It wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold. - title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" snippet: >- 1997, 1998, 2000 and 2001 also rank amongst some of the very best years. Yet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists. We will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers. - title: "CSPC: NSYNC Popularity Analysis - ChartMasters" snippet: >- Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon? As usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures. stream: false response: body: text: >- Both NSync and Backstreet Boys were extremely popular at the turn of the millennium. Backstreet Boys had massive album sales across the globe, great singles sales, plenty of chart-topping releases, hyped tours, and tremendous media coverage. NSync also had huge sales, with their album No Strings Attached selling 2.4 million units in its first week. They also had the second fastest-selling album of the Soundscan era before 2015, with Celebrity debuting at 1.88 million units sold. While it is difficult to say for sure which of the two bands was more popular, Backstreet Boys did have success in some countries that were traditionally hard to penetrate for Western artists. generation_id: c14c80c3-18eb-4519-9460-6c92edd8cfb4 chat_history: - role: USER message: "Who is more popular: Nsync or Backstreet Boys?" - role: CHATBOT message: >- Both NSync and Backstreet Boys were extremely popular at the turn of the millennium. Backstreet Boys had massive album sales across the globe, great singles sales, plenty of chart-topping releases, hyped tours, and tremendous media coverage. NSync also had huge sales, with their album No Strings Attached selling 2.4 million units in its first week. They also had the second fastest-selling album of the Soundscan era before 2015, with Celebrity debuting at 1.88 million units sold. While it is difficult to say for sure which of the two bands was more popular, Backstreet Boys did have success in some countries that were traditionally hard to penetrate for Western artists. finish_reason: COMPLETE meta: api_version: version: "1" billed_units: input_tokens: 682 output_tokens: 143 tokens: input_tokens: 1380 output_tokens: 434 citations: - start: 36 end: 84 text: extremely popular at the turn of the millennium. document_ids: - doc_1 - start: 105 end: 141 text: massive album sales across the globe document_ids: - doc_0 - start: 143 end: 162 text: great singles sales document_ids: - doc_0 - start: 164 end: 196 text: plenty of chart-topping releases document_ids: - doc_0 - start: 198 end: 209 text: hyped tours document_ids: - doc_0 - start: 215 end: 241 text: tremendous media coverage. document_ids: - doc_0 - start: 280 end: 350 text: album No Strings Attached selling 2.4 million units in its first week. document_ids: - doc_1 - start: 369 end: 430 text: second fastest-selling album of the Soundscan era before 2015 document_ids: - doc_1 - start: 437 end: 483 text: Celebrity debuting at 1.88 million units sold. document_ids: - doc_1 - start: 589 end: 677 text: success in some countries that were traditionally hard to penetrate for Western artists. document_ids: - doc_2 documents: - id: doc_1 snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: NSYNC Popularity Analysis MJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync At the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone. It wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold. title: "CSPC: NSYNC Popularity Analysis - ChartMasters" - id: doc_0 snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" - id: doc_2 snippet: >- 1997, 1998, 2000 and 2001 also rank amongst some of the very best years. Yet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists. We will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" - code-samples: - sdk: go name: Streaming code: > package main import ( "context" "errors" "io" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.ChatStream( context.TODO(), &cohere.ChatStreamRequest{ ChatHistory: []*cohere.Message{ { Role: "USER", User: &cohere.ChatMessage{ Message: "Who discovered gravity?", }, }, { Role: "CHATBOT", Chatbot: &cohere.ChatMessage{ Message: "The man who is widely credited with discovering gravity is Sir Isaac Newton", }, }}, Message: "What year was he born?", Connectors: []*cohere.ChatConnector{ {Id: "web-search"}, }, }, ) if err != nil { log.Fatal(err) } // Make sure to close the stream when you're done reading. // This is easily handled with defer. defer resp.Close() for { message, err := resp.Recv() if errors.Is(err, io.EOF) { // An io.EOF error means the server is done sending messages // and should be treated as a success. break } if message.TextGeneration != nil { log.Printf("%+v", resp) } } } - sdk: typescript name: Streaming code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const chatStream = await cohere.chatStream({ chatHistory: [ { role: 'USER', message: 'Who discovered gravity?' }, { role: 'CHATBOT', message: 'The man who is widely credited with discovering gravity is Sir Isaac Newton', }, ], message: 'What year was he born?', // perform web search before answering the question. You can also use your own custom connector. connectors: [{ id: 'web-search' }], }); for await (const message of chatStream) { if (message.eventType === 'text-generation') { process.stdout.write(message); } } })(); - sdk: java name: Streaming code: > /* (C)2024 */ package chatpost; import com.cohere.api.Cohere; import com.cohere.api.requests.ChatStreamRequest; import com.cohere.api.types.ChatMessage; import com.cohere.api.types.ChatTextGenerationEvent; import com.cohere.api.types.Message; import com.cohere.api.types.StreamedChatResponse; import java.util.List; public class Stream { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); Iterable response = cohere.chatStream( ChatStreamRequest.builder() .message("What year was he born?") .chatHistory( List.of( Message.user( ChatMessage.builder().message("Who discovered gravity?").build()), Message.chatbot( ChatMessage.builder() .message( "The man who is widely" + " credited with" + " discovering gravity" + " is Sir Isaac" + " Newton") .build()))) .build()); for (StreamedChatResponse chatResponse : response) { if (chatResponse.isTextGeneration()) { System.out.println( chatResponse.getTextGeneration().map(ChatTextGenerationEvent::getText).orElse("")); } } System.out.println(response); } } - sdk: python name: Streaming code: > import cohere co = cohere.Client() response = co.chat_stream( chat_history=[ {"role": "USER", "message": "Who discovered gravity?"}, { "role": "CHATBOT", "message": "The man who is widely credited with discovering gravity is Sir Isaac Newton", }, ], message="What year was he born?", # perform web search before answering the question. You can also use your own custom connector. connectors=[{"id": "web-search"}], ) for event in response: if event.event_type == "text-generation": print(event.text, end="") - sdk: curl name: Streaming code: >- curl --request POST \ --url https://api.cohere.com/v1/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "stream": true, "chatHistory": [ { "role": "USER", "message": "Who discovered gravity?" }, { "role": "CHATBOT", "message": "The man who is widely credited with discovering gravity is Sir Isaac Newton" } ], "message": "What year was he born?", "connectors": [ { "id": "web-search" } ] }' request: message: hello world! stream: true response: stream: - event_type: stream-start generation_id: 29f14a5a-11de-4cae-9800-25e4747408ea - event_type: text-generation text: Hello - event_type: text-generation text: "!" - event_type: text-generation text: " How" - event_type: text-generation text: " can" - event_type: text-generation text: " I" - event_type: text-generation text: " help" - event_type: text-generation text: " you" - event_type: text-generation text: " today" - event_type: text-generation text: "?" - event_type: stream-end response: text: Hello! How can I help you today? generation_id: 29f14a5a-11de-4cae-9800-25e4747408ea chat_history: - role: USER message: hello world! - role: CHATBOT message: Hello! How can I help you today? finish_reason: COMPLETE meta: api_version: version: '1' billed_units: input_tokens: 3 output_tokens: 9 tokens: input_tokens: 69 output_tokens: 9 finish_reason: COMPLETE - code-samples: - sdk: go name: Tools code: > package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Chat( context.TODO(), &cohere.ChatRequest{ Message: "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?", Tools: []*cohere.Tool{ { Name: "query_daily_sales_report", Description: "Connects to a database to retrieve overall sales volumes and sales information for a given day.", ParameterDefinitions: map[string]*cohere.ToolParameterDefinitionsValue{ "day": { Description: cohere.String("Retrieves sales data for this day, formatted as YYYY-MM-DD."), Type: "str", Required: cohere.Bool(true), }, }, }, { Name: "query_product_catalog", Description: "Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.", ParameterDefinitions: map[string]*cohere.ToolParameterDefinitionsValue{ "category": { Description: cohere.String("Retrieves product information data for all products in this category."), Type: "str", Required: cohere.Bool(true), }, }, }, }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Tools code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const response = await cohere.chat({ message: "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?", tools: [ { name: 'query_daily_sales_report', description: 'Connects to a database to retrieve overall sales volumes and sales information for a given day.', parameterDefinitions: { day: { description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.', type: 'str', required: true, }, }, }, { name: 'query_product_catalog', description: 'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.', parameterDefinitions: { category: { description: 'Retrieves product information data for all products in this category.', type: 'str', required: true, }, }, }, ], }); console.log(response); })(); - sdk: java name: Tools code: > /* (C)2024 */ package chatpost; import com.cohere.api.Cohere; import com.cohere.api.requests.ChatRequest; import com.cohere.api.types.NonStreamedChatResponse; import com.cohere.api.types.Tool; import com.cohere.api.types.ToolParameterDefinitionsValue; import java.util.List; import java.util.Map; public class Tools { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); NonStreamedChatResponse response = cohere.chat( ChatRequest.builder() .message( "Can you provide a sales summary for 29th September 2023," + " and also give me some details about the products in" + " the 'Electronics' category, for example their" + " prices and stock levels?") .tools( List.of( Tool.builder() .name("query_daily_sales_report") .description( "Connects to a database to retrieve" + " overall sales volumes and" + " sales information for a" + " given day.") .parameterDefinitions( Map.of( "day", ToolParameterDefinitionsValue.builder() .type("str") .description( "Retrieves" + " sales" + " data" + " for this" + " day," + " formatted" + " as YYYY-MM-DD.") .required(true) .build())) .build(), Tool.builder() .name("query_product_catalog") .description( "Connects to a a product catalog" + " with information about all" + " the products being sold," + " including categories," + " prices, and stock levels.") .parameterDefinitions( Map.of( "category", ToolParameterDefinitionsValue.builder() .type("str") .description( "Retrieves" + " product" + " information" + " data" + " for all" + " products" + " in this" + " category.") .required(true) .build())) .build())) .build()); System.out.println(response); } } - sdk: python name: Tools code: > import cohere co = cohere.Client() # tool descriptions that the model has access to tools = [ { "name": "query_daily_sales_report", "description": "Connects to a database to retrieve overall sales volumes and sales information for a given day.", "parameter_definitions": { "day": { "description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.", "type": "str", "required": True, } }, }, { "name": "query_product_catalog", "description": "Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.", "parameter_definitions": { "category": { "description": "Retrieves product information data for all products in this category.", "type": "str", "required": True, } }, }, ] # user request message = "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?" response = co.chat( message=message, tools=tools, ) print(response) - sdk: curl name: Tools code: > curl --request POST \ --url https://api.cohere.com/v1/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "message": "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?", "tools": [ { "name": "query_daily_sales_report", "description": "Connects to a database to retrieve overall sales volumes and sales information for a given day.", "parameterDefinitions": { "day": { "description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.", "type": "str", "required": true } } }, { "name": "query_product_catalog", "description": "Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.", "parameterDefinitions": { "category": { "description": "Retrieves product information data for all products in this category.", "type": "str", "required": true } } } ] }' request: message: Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels? tools: - name: query_daily_sales_report description: Connects to a database to retrieve overall sales volumes and sales information for a given day. parameter_definitions: day: description: Retrieves sales data for this day, formatted as YYYY-MM-DD. type: str required: true - name: query_product_catalog description: Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels. parameter_definitions: category: description: Retrieves product information data for all products in this category. type: str required: true stream: false response: body: text: I will first find the sales summary for 29th September 2023. Then, I will find the details of the products in the 'Electronics' category. generation_id: 9e5f00aa-bf1e-481a-abe3-0eceac18c3ec chat_history: - role: USER message: Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels? - role: CHATBOT message: I will first find the sales summary for 29th September 2023. Then, I will find the details of the products in the 'Electronics' category. tool_calls: - name: query_daily_sales_report parameters: day: 2023-09-29 - name: query_product_catalog parameters: category: Electronics finish_reason: COMPLETE meta: api_version: version: "1" billed_units: input_tokens: 127 output_tokens: 69 tokens: input_tokens: 1032 output_tokens: 124 tool_calls: - name: query_daily_sales_report parameters: day: 2023-09-29 - name: query_product_catalog parameters: category: Electronics description: | Generates a text response to a user message. To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api). requestBody: content: application/json: schema: type: object x-fern-audiences: - public x-examples: Chat: value: message: Can you give me a global market overview of solar panels? temperature: 0.3 stream: false chat_history: - role: User message: Hi! - role: Chatbot message: How can I help you today? prompt_truncation: OFF Chat with web search: value: message: Can you give me a global market overview of solar panels? temperature: 0.3 stream: false chat_history: [] connectors: - id: web-search prompt_truncation: AUTO Chat with connector: value: message: How do I expense a meal? stream: false connectors: - id: custom-connector-id prompt_truncation: AUTO required: - message properties: message: type: string x-fern-audiences: - public description: | Text input for the model to respond to. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments model: type: string x-fern-audiences: - public description: | Defaults to `command-r-plus-08-2024`. The name of a compatible [Cohere model](https://docs.cohere.com/docs/models) or the ID of a [fine-tuned](https://docs.cohere.com/docs/chat-fine-tuning) model. Compatible Deployments: Cohere Platform, Private Deployments stream: description: | Defaults to `false`. When `true`, the response will be a JSON stream of events. The final event will contain the complete response, and will have an `event_type` of `"stream-end"`. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments type: boolean x-fern-audiences: - public preamble: description: | When specified, the default Cohere preamble will be replaced with the provided one. Preambles are a part of the prompt used to adjust the model's overall behavior and conversation style, and use the `SYSTEM` role. The `SYSTEM` role is also used for the contents of the optional `chat_history=` parameter. When used with the `chat_history=` parameter it adds content throughout a conversation. Conversely, when used with the `preamble=` parameter it adds content at the start of the conversation only. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments type: string x-fern-audiences: - public chat_history: type: array x-fern-audiences: - public minItems: 0 items: $ref: "#/components/schemas/Message" description: | A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`. Each item represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content. The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments conversation_id: type: string x-fern-audiences: - public description: | An alternative to `chat_history`. Providing a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string. Compatible Deployments: Cohere Platform prompt_truncation: type: string x-fern-audiences: - public enum: - OFF - AUTO - AUTO_PRESERVE_ORDER description: | Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases. Dictates how the prompt will be constructed. With `prompt_truncation` set to "AUTO", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be changed and ranked by relevance. With `prompt_truncation` set to "AUTO_PRESERVE_ORDER", some elements from `chat_history` and `documents` will be dropped in an attempt to construct a prompt that fits within the model's context length limit. During this process the order of the documents and chat history will be preserved as they are inputted into the API. With `prompt_truncation` set to "OFF", no elements will be dropped. If the sum of the inputs exceeds the model's context length limit, a `TooManyTokens` error will be returned. Compatible Deployments: - AUTO: Cohere Platform Only - AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments connectors: type: array x-fern-audiences: - public minItems: 0 items: $ref: "#/components/schemas/ChatConnector" description: | Accepts `{"id": "web-search"}`, and/or the `"id"` for a custom [connector](https://docs.cohere.com/docs/connectors), if you've [created](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) one. When specified, the model's reply will be enriched with information found by querying each of the connectors (RAG). Compatible Deployments: Cohere Platform search_queries_only: type: boolean x-fern-audiences: - public description: | Defaults to `false`. When `true`, the response will only contain a list of generated search queries, but no search will take place, and no reply from the model to the user's `message` will be generated. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments documents: description: | A list of relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary. Example: ``` [ { "title": "Tall penguins", "text": "Emperor penguins are the tallest." }, { "title": "Penguin habitats", "text": "Emperor penguins only live in Antarctica." }, ] ``` Keys and values from each document will be serialized to a string and passed to the model. The resulting generation will include citations that reference some of these documents. Some suggested keys are "text", "author", and "date". For better generation quality, it is recommended to keep the total word count of the strings in the dictionary to under 300 words. An `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model. An `_excludes` field (array of strings) can be optionally supplied to omit some key-value pairs from being shown to the model. The omitted fields will still show up in the citation object. The "_excludes" field will not be passed to the model. See ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments type: array x-fern-audiences: - public items: $ref: "#/components/schemas/ChatDocument" citation_quality: type: string x-fern-audiences: - public description: | Defaults to `"accurate"`. Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments enum: - fast - accurate - off temperature: type: number x-fern-audiences: - public format: float minimum: 0 maximum: 1 description: | Defaults to `0.3`. A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations. Randomness can be further maximized by increasing the value of the `p` parameter. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments max_tokens: type: integer x-fern-audiences: - public description: | The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments writeOnly: true max_input_tokens: type: integer x-fern-audiences: - public description: | The maximum number of input tokens to send to the model. If not specified, `max_input_tokens` is the model's context length limit minus a small buffer. Input will be truncated according to the `prompt_truncation` parameter. Compatible Deployments: Cohere Platform writeOnly: true k: type: integer x-fern-audiences: - public description: | Ensures only the top `k` most likely tokens are considered for generation at each step. Defaults to `0`, min value of `0`, max value of `500`. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments writeOnly: true default: 0 minimum: 0 maximum: 500 p: type: number x-fern-audiences: - public description: | Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`. Defaults to `0.75`. min value of `0.01`, max value of `0.99`. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments writeOnly: true default: 0.75 minimum: 0.01 maximum: 0.99 seed: x-fern-audiences: - public minimum: 0 maximum: 18446744073709552000 type: integer description: | If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments stop_sequences: x-fern-audiences: - public writeOnly: true type: array items: type: string description: | A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments frequency_penalty: type: number x-fern-audiences: - public description: | Defaults to `0.0`, min value of `0.0`, max value of `1.0`. Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments writeOnly: true presence_penalty: type: number x-fern-audiences: - public description: | Defaults to `0.0`, min value of `0.0`, max value of `1.0`. Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments writeOnly: true tools: x-fern-audiences: - public description: | A list of available tools (functions) that the model may suggest invoking before producing a text response. When `tools` is passed (without `tool_results`), the `text` field in the response will be `""` and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments type: array items: $ref: "#/components/schemas/Tool" minItems: 0 tool_results: x-fern-audiences: - public description: | A list of results from invoking tools recommended by the model in the previous chat turn. Results are used to produce a text response and will be referenced in citations. When using `tool_results`, `tools` must be passed as well. Each tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries. **Note**: `outputs` must be a list of objects. If your tool returns a single object (eg `{"status": 200}`), make sure to wrap it in a list. ``` tool_results = [ { "call": { "name": , "parameters": { : } }, "outputs": [{ : }] }, ... ] ``` **Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments type: array minItems: 0 items: $ref: "#/components/schemas/ToolResult" force_single_step: x-fern-audiences: - public type: boolean description: Forces the chat to be single step. Defaults to `false`. response_format: x-fern-audiences: - public $ref: "#/components/schemas/ResponseFormat" safety_mode: x-fern-audiences: - public x-fern-availability: beta enum: - CONTEXTUAL - STRICT - NONE description: | Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`. When `NONE` is specified, the safety instruction will be omitted. Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters. **Note**: This parameter is only compatible with models [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release), [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release) and newer. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments responses: "200": description: OK content: application/json: schema: oneOf: - $ref: "#/components/schemas/NonStreamedChatResponse" - $ref: "#/components/schemas/StreamedChatResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" /v2/chat: post: summary: Chat with the model operationId: chatv2 x-fern-audiences: - v2-beta x-fern-sdk-group-name: v2 x-fern-sdk-method-name: chat x-fern-streaming: format: sse stream-condition: $request.stream stream-description: | Generates a text response to a user message. To learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api). Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2. response: required: - id - finish_reason - message properties: id: type: string description: Unique identifier for the generated reply. Useful for submitting feedback. finish_reason: $ref: "#/components/schemas/ChatFinishReason" message: $ref: "#/components/schemas/AssistantMessageResponse" usage: $ref: "#/components/schemas/Usage" logprobs: type: array items: $ref: "#/components/schemas/LogprobItem" response-stream: description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). oneOf: - $ref: "#/components/schemas/ChatMessageStartEvent" - $ref: "#/components/schemas/ChatContentStartEvent" - $ref: "#/components/schemas/ChatContentDeltaEvent" - $ref: "#/components/schemas/ChatContentEndEvent" - $ref: "#/components/schemas/ChatToolPlanDeltaEvent" - $ref: "#/components/schemas/ChatToolCallStartEvent" - $ref: "#/components/schemas/ChatToolCallDeltaEvent" - $ref: "#/components/schemas/ChatToolCallEndEvent" - $ref: "#/components/schemas/ChatMessageEndEvent" discriminator: propertyName: type mapping: message-start: "#/components/schemas/ChatMessageStartEvent" content-start: "#/components/schemas/ChatContentStartEvent" content-delta: "#/components/schemas/ChatContentDeltaEvent" content-end: "#/components/schemas/ChatContentEndEvent" tool-plan-delta: "#/components/schemas/ChatToolPlanDeltaEvent" tool-call-start: "#/components/schemas/ChatToolCallStartEvent" tool-call-delta: "#/components/schemas/ChatToolCallDeltaEvent" tool-call-end: "#/components/schemas/ChatToolCallEndEvent" citation-start: "#/components/schemas/CitationStartEvent" citation-end: "#/components/schemas/CitationEndEvent" message-end: "#/components/schemas/ChatMessageEndEvent" description: | Generates a text response to a user message and streams it down, token by token. To learn how to use the Chat API with streaming follow our [Text Generation guides](https://docs.cohere.com/v2/docs/chat-api). Follow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2. parameters: - $ref: "#/components/parameters/RequestSource" requestBody: content: application/json: schema: type: object required: - messages - model properties: model: type: string description: The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models) (such as command-r or command-r-plus) or the ID of a [fine-tuned](https://docs.cohere.com/v2/docs/chat-fine-tuning) model. messages: $ref: "#/components/schemas/ChatMessages" tools: type: array items: $ref: "#/components/schemas/ToolV2" description: | A list of available tools (functions) that the model may suggest invoking before producing a text response. When `tools` is passed (without `tool_results`), the `text` content in the response will be empty and the `tool_calls` field in the response will be populated with a list of tool calls that need to be made. If no calls need to be made, the `tool_calls` array will be empty. documents: type: array items: oneOf: - type: string - $ref: "#/components/schemas/Document" description: | A list of relevant documents that the model can cite to generate a more accurate reply. Each document is either a string or document object with content and metadata. citation_options: $ref: "#/components/schemas/CitationOptions" response_format: $ref: "#/components/schemas/ResponseFormatV2" safety_mode: enum: - CONTEXTUAL - STRICT - OFF description: | Used to select the [safety instruction](https://docs.cohere.com/v2/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`. When `OFF` is specified, the safety instruction will be omitted. Safety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters. **Note**: This parameter is only compatible with models [Command R 08-2024](https://docs.cohere.com/v2/docs/command-r#august-2024-release), [Command R+ 08-2024](https://docs.cohere.com/v2/docs/command-r-plus#august-2024-release) and newer. max_tokens: type: integer description: | The maximum number of tokens the model will generate as part of the response. **Note**: Setting a low value may result in incomplete generations. stop_sequences: type: array items: type: string description: | A list of up to 5 strings that the model will use to stop generation. If the model generates a string that matches any of the strings in the list, it will stop generating tokens and return the generated text up to that point not including the stop sequence. temperature: type: number format: float minimum: 0 maximum: 1 description: | Defaults to `0.3`. A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations. Randomness can be further maximized by increasing the value of the `p` parameter. seed: type: integer minimum: 0 maximum: 18446744073709552000 description: | If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed. frequency_penalty: type: number format: float description: | Defaults to `0.0`, min value of `0.0`, max value of `1.0`. Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. presence_penalty: type: number format: float description: | Defaults to `0.0`, min value of `0.0`, max value of `1.0`. Used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. k: type: number format: float default: 0 minimum: 0 maximum: 500 description: | Ensures that only the top `k` most likely tokens are considered for generation at each step. When `k` is set to `0`, k-sampling is disabled. Defaults to `0`, min value of `0`, max value of `500`. p: type: number format: float default: 0.75 minimum: 0.01 maximum: 0.99 description: | Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`. Defaults to `0.75`. min value of `0.01`, max value of `0.99`. logprobs: type: boolean description: | Whether to return the log probabilities of the generated tokens. Defaults to false. responses: "200": description: OK content: application/json: schema: oneOf: - $ref: "#/components/schemas/ChatResponse" - $ref: "#/components/schemas/StreamedChatResponseV2" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: typescript name: Default code: | const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const response = await cohere.chat({ model: 'command-r-plus-08-2024', messages: [ { role: 'user', content: 'hello world!', }, ], }); console.log(response); })(); - sdk: python name: Default code: | import cohere co = cohere.ClientV2() response = co.chat( model="command-r-plus-08-2024", messages=[{"role": "user", "content": "hello world!"}], ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClientV2() async def main(): response = await co.chat( model="command-r-plus-08-2024", messages=[cohere.UserChatMessageV2(content="hello world!")], ) print(response) asyncio.run(main()) - sdk: java name: Default code: > /* (C)2024 */ package chatv2post; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2ChatRequest; import com.cohere.api.types.*; import java.util.List; public class Default { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ChatResponse response = cohere .v2() .chat( V2ChatRequest.builder() .model("command-r-plus-08-2024") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content(UserMessageContent.of("Who discovered" + " gravity?")) .build()), ChatMessageV2.assistant( AssistantMessage.builder() .content( AssistantMessageContent.of( "The man" + " who is" + " widely" + " credited" + " with" + " discovering" + " gravity" + " is Sir" + " Isaac" + " Newton")) .build()))) .build()); System.out.println(response); } } - sdk: curl name: Default code: |- curl --request POST \ --url https://api.cohere.com/v2/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "command-r-plus-08-2024", "messages": [ { "role": "user", "content": "Hello world!" } ], }' request: model: "command-r" messages: - role: "user" content: "Tell me about LLMs" stream: false response: body: id: c14c80c3-18eb-4519-9460-6c92edd8cfb4 message: role: "assistant" content: - type: "text" text: "LLMs stand for Large Language Models, which are a type of neural network model specialized in processing and generating human language. They are designed to understand and respond to natural language input and have become increasingly popular and valuable in recent years. LLMs are trained on vast amounts of text data, enabling them to learn patterns, grammar, and semantic meanings present in the language. These models can then be used for various natural language processing tasks, such as text generation, summarization, question answering, machine translation, sentiment analysis, and even some aspects of natural language understanding. Some well-known examples of LLMs include: 1. GPT-3 (Generative Pre-trained Transformer 3) — An open-source LLM developed by OpenAI, capable of generating human-like text and performing various language tasks. 2. BERT (Bidirectional Encoder Representations from Transformers) — A Google-developed LLM that is particularly good at understanding contextual relationships in text, and is widely used for natural language understanding tasks like sentiment analysis and named entity recognition. 3. T5 (Text-to-Text Transfer Transformer) — Also from Google, T5 is a flexible LLM that frames all language tasks as text-to-text problems, where the model learns to generate output text based on input text prompts. 4. RoBERTa (Robustly Optimized BERT Approach) — A variant of BERT that uses additional training techniques to improve performance. 5. DeBERTa (Decoding-enhanced BERT with disentangled attention) — Another variant of BERT that introduces a new attention mechanism. LLMs have become increasingly powerful and larger in scale, improving the accuracy and sophistication of language tasks. They are also being used as a foundation for developing various applications, including chatbots, content recommendation systems, language translation services, and more.\ The future of LLMs holds the potential for even more sophisticated language technologies, with ongoing research and development focused on enhancing their capabilities, improving efficiency, and exploring their applications in various domains." finish_reason: COMPLETE usage: billed_units: input_tokens: 5 output_tokens: 418 tokens: input_tokens: 71 output_tokens: 418 - code-samples: - sdk: typescript name: Documents code: | const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const response = await cohere.chat({ model: 'command-r-plus-08-2024', documents: [{ id: '1', data: 'Cohere is the best!' }], messages: [ { role: 'user', content: [{ type: 'text', text: "Who's the best?" }], }, ], }); console.log(response); })(); - sdk: python name: Documents code: > import cohere co = cohere.ClientV2() response = co.chat( model="command-r-plus-08-2024", documents=[ {"id": "1", "data": {"text": "Cohere is the best!", "title": "The best"}} ], messages=[{"role": "user", "content": "Who's the best?"}], ) print(response) - sdk: java name: Documents code: > /* (C)2024 */ package chatv2post; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2ChatRequest; import com.cohere.api.resources.v2.types.V2ChatRequestDocumentsItem; import com.cohere.api.types.*; import java.util.List; public class Documents { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ChatResponse response = cohere .v2() .chat( V2ChatRequest.builder() .model("command-r-plus-08-2024") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content( UserMessageContent.of("Who is" + " the most" + " popular?")) .build()))) .documents( List.of( V2ChatRequestDocumentsItem.of( "↓ Skip to Main Content\n\n" + "Music industry – One step" + " closer to being" + " accurate\n\n" + "CSPC: Backstreet Boys" + " Popularity Analysis\n\n" + "Hernán Lopez Posted on" + " February 9, 2017 Posted in" + " CSPC 72 Comments Tagged" + " with Backstreet Boys, Boy" + " band\n\n" + "At one point, Backstreet" + " Boys defined success:" + " massive albums sales across" + " the globe, great singles" + " sales, plenty of chart" + " topping releases, hugely" + " hyped tours and tremendous" + " media coverage.\n\n" + "It is true that they" + " benefited from" + " extraordinarily good market" + " conditions in all markets." + " After all, the all-time" + " record year for the music" + " business, as far as" + " revenues in billion dollars" + " are concerned, was actually" + " 1999. That is, back when" + " this five men group was at" + " its peak."), V2ChatRequestDocumentsItem.of( "↓ Skip to Main Content\n\n" + "Music industry – One step" + " closer to being" + " accurate\n\n" + "CSPC: NSYNC Popularity" + " Analysis\n\n" + "MJD Posted on February 9," + " 2018 Posted in CSPC 27" + " Comments Tagged with Boy" + " band, N'Sync\n\n" + "At the turn of the" + " millennium three teen acts" + " were huge in the US, the" + " Backstreet Boys, Britney" + " Spears and NSYNC. The" + " latter is the only one we" + " haven’t study so far. It" + " took 15 years and Adele to" + " break their record of 2,4" + " million units sold of No" + " Strings Attached in its" + " first week alone.\n\n" + "It wasn’t a fluke, as the" + " second fastest selling" + " album of the Soundscan era" + " prior 2015, was also theirs" + " since Celebrity debuted" + " with 1,88 million units" + " sold."), V2ChatRequestDocumentsItem.of( " 1997, 1998, 2000 and 2001 also" + " rank amongst some of the" + " very best years.\n\n" + "Yet the way many music" + " consumers – especially" + " teenagers and young women’s" + " – embraced their output" + " deserves its own chapter." + " If Jonas Brothers and more" + " recently One Direction" + " reached a great level of" + " popularity during the past" + " decade, the type of success" + " achieved by Backstreet Boys" + " is in a completely" + " different level as they" + " really dominated the" + " business for a few years" + " all over the world," + " including in some countries" + " that were traditionally" + " hard to penetrate for" + " Western artists.\n\n" + "We will try to analyze the" + " extent of that hegemony" + " with this new article with" + " final results which will" + " more than surprise many" + " readers."), V2ChatRequestDocumentsItem.of( " Was the teen group led by Justin" + " Timberlake really that big?" + " Was it only in the US where" + " they found success? Or were" + " they a global" + " phenomenon?\n\n" + "As usual, I’ll be using the" + " Commensurate Sales to" + " Popularity Concept in order" + " to relevantly gauge their" + " results. This concept will" + " not only bring you sales" + " information for all NSYNC‘s" + " albums, physical and" + " download singles, as well" + " as audio and video" + " streaming, but it will also" + " determine their true" + " popularity. If you are not" + " yet familiar with the CSPC" + " method, the next page" + " explains it with a short" + " video. I fully recommend" + " watching the video before" + " getting into the sales" + " figures."))) .build()); System.out.println(response); } } - sdk: curl name: Documents code: |- curl --request POST \ --url https://api.cohere.com/v2/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "command-r-plus-08-2024", "documents": [ { "id": "1", "data": "Cohere is the best!" } ], "messages": [ { "role": "user", "content": "Who's the best?" } ] }' request: model: "command-r" documents: - data: content: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. - data: content: "CSPC: NSYNC Popularity Analysis - ChartMasters" snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: NSYNC Popularity Analysis MJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync At the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone. It wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold. - data: content: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" snippet: >- 1997, 1998, 2000 and 2001 also rank amongst some of the very best years. Yet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists. We will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers. - data: content: "CSPC: NSYNC Popularity Analysis - ChartMasters" snippet: >- Was the teen group led by Justin Timberlake really that big? Was it only in the US where they found success? Or were they a global phenomenon? As usual, I’ll be using the Commensurate Sales to Popularity Concept in order to relevantly gauge their results. This concept will not only bring you sales information for all NSYNC‘s albums, physical and download singles, as well as audio and video streaming, but it will also determine their true popularity. If you are not yet familiar with the CSPC method, the next page explains it with a short video. I fully recommend watching the video before getting into the sales figures. messages: - role: "user" content: "Who is more popular: Nsync or Backstreet Boys?" stream: false response: body: id: c14c80c3-18eb-4519-9460-6c92edd8cfb4 message: role: "assistant" content: - type: "text" text: >- Both NSync and Backstreet Boys were extremely popular at the turn of the millennium. Backstreet Boys had massive album sales across the globe, great singles sales, plenty of chart-topping releases, hyped tours, and tremendous media coverage. NSync also had huge sales, with their album No Strings Attached selling 2.4 million units in its first week. They also had the second fastest-selling album of the Soundscan era before 2015, with Celebrity debuting at 1.88 million units sold. While it is difficult to say for sure which of the two bands was more popular, Backstreet Boys did have success in some countries that were traditionally hard to penetrate for Western artists. citations: - start: 36 end: 84 text: extremely popular at the turn of the millennium. sources: - type: document id: doc:1 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: NSYNC Popularity Analysis MJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync At the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone. It wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold. title: "CSPC: NSYNC Popularity Analysis - ChartMasters" - start: 105 end: 141 text: massive album sales across the globe sources: - type: document id: doc:0 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" - start: 143 end: 162 text: great singles sales sources: - type: document id: doc:0 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" - start: 164 end: 196 text: plenty of chart-topping releases sources: - type: document id: doc:0 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" - start: 198 end: 209 text: hyped tours sources: - type: document id: doc:0 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" - start: 215 end: 241 text: tremendous media coverage. sources: - type: document id: doc:0 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: Backstreet Boys Popularity Analysis Hernán Lopez Posted on February 9, 2017 Posted in CSPC 72 Comments Tagged with Backstreet Boys, Boy band At one point, Backstreet Boys defined success: massive albums sales across the globe, great singles sales, plenty of chart topping releases, hugely hyped tours and tremendous media coverage. It is true that they benefited from extraordinarily good market conditions in all markets. After all, the all-time record year for the music business, as far as revenues in billion dollars are concerned, was actually 1999. That is, back when this five men group was at its peak. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" - start: 280 end: 350 text: album No Strings Attached selling 2.4 million units in its first week. sources: - type: document id: doc:1 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: NSYNC Popularity Analysis MJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync At the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone. It wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold. title: "CSPC: NSYNC Popularity Analysis - ChartMasters" - start: 369 end: 430 text: second fastest-selling album of the Soundscan era before 2015 sources: - type: document id: doc:1 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: NSYNC Popularity Analysis MJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync At the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone. It wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold. title: "CSPC: NSYNC Popularity Analysis - ChartMasters" - start: 437 end: 483 text: Celebrity debuting at 1.88 million units sold. sources: - type: document id: doc:1 document: snippet: >- ↓ Skip to Main Content Music industry – One step closer to being accurate CSPC: NSYNC Popularity Analysis MJD Posted on February 9, 2018 Posted in CSPC 27 Comments Tagged with Boy band, N'Sync At the turn of the millennium three teen acts were huge in the US, the Backstreet Boys, Britney Spears and NSYNC. The latter is the only one we haven’t study so far. It took 15 years and Adele to break their record of 2,4 million units sold of No Strings Attached in its first week alone. It wasn’t a fluke, as the second fastest selling album of the Soundscan era prior 2015, was also theirs since Celebrity debuted with 1,88 million units sold. title: "CSPC: NSYNC Popularity Analysis - ChartMasters" - start: 589 end: 677 text: success in some countries that were traditionally hard to penetrate for Western artists. sources: - type: document id: doc:2 document: snippet: >- 1997, 1998, 2000 and 2001 also rank amongst some of the very best years. Yet the way many music consumers – especially teenagers and young women’s – embraced their output deserves its own chapter. If Jonas Brothers and more recently One Direction reached a great level of popularity during the past decade, the type of success achieved by Backstreet Boys is in a completely different level as they really dominated the business for a few years all over the world, including in some countries that were traditionally hard to penetrate for Western artists. We will try to analyze the extent of that hegemony with this new article with final results which will more than surprise many readers. title: "CSPC: Backstreet Boys Popularity Analysis - ChartMasters" finish_reason: COMPLETE usage: billed_units: input_tokens: 682 output_tokens: 143 tokens: input_tokens: 1380 output_tokens: 434 - code-samples: - sdk: typescript name: Streaming code: | const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const stream = await cohere.chatStream({ model: 'command-r-plus-08-2024', messages: [ { role: 'user', content: 'hello world!', }, ], }); for await (const chatEvent of stream) { if (chatEvent.type === 'content-delta') { console.log(chatEvent.delta?.message); } } })(); - sdk: python name: Streaming code: | import cohere co = cohere.ClientV2() response = co.chat_stream( model="command-r-plus-08-2024", messages=[{"role": "user", "content": "hello world!"}], ) for event in response: if event.type == "content-delta": print(event.delta.message.content.text, end="") - sdk: java name: Streaming code: > /* (C)2024 */ package chatv2post; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2ChatStreamRequest; import com.cohere.api.types.*; import java.util.List; public class Stream { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); Iterable response = cohere .v2() .chatStream( V2ChatStreamRequest.builder() .model("command-r-plus-08-2024") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content(UserMessageContent.of("Who discovered" + " gravity?")) .build()), ChatMessageV2.assistant( AssistantMessage.builder() .content( AssistantMessageContent.of( "The man" + " who is" + " widely" + " credited" + " with" + " discovering" + " gravity" + " is Sir" + " Isaac" + " Newton")) .build()))) .build()); for (StreamedChatResponseV2 chatResponse : response) { if (chatResponse.isContentDelta()) { System.out.println( chatResponse .getContentDelta() .flatMap(ChatContentDeltaEvent::getDelta) .flatMap(ChatContentDeltaEventDelta::getMessage) .flatMap(ChatContentDeltaEventDeltaMessage::getContent) .flatMap(ChatContentDeltaEventDeltaMessageContent::getText) .orElse("")); } } System.out.println(response); } } - sdk: curl name: Streaming code: |- curl --request POST \ --url https://api.cohere.com/v2/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "stream": true, "model": "command-r-plus-08-2024", "messages": [ { "role": "user", "content": "Hello world!" } ], }' request: model: "command-r" messages: - role: "user" content: "Hello!" stream: true response: stream: - event: stream-start data: type: message-start id: 29f14a5a-11de-4cae-9800-25e4747408ea delta: message: role: "assistant" # content: [] # tool_plan: "" # tool_calls: [] # citations: [] - event: text-generation data: type: content-start index: 0 delta: message: content: type: "text" text: "" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: "Hello" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: "!" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: " How" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: " can" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: " I" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: " help" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: " you" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: " today" - event: text-generation data: type: content-delta index: 0 delta: message: content: text: "?" - event: text-generation data: type: content-end index: 0 - event: stream-end data: type: message-end delta: finish_reason: COMPLETE usage: # api_version: # version: '2' billed_units: input_tokens: 3 output_tokens: 9 tokens: input_tokens: 69 output_tokens: 9 - code-samples: - sdk: typescript name: Tools code: > const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const response = await cohere.chat({ model: 'command-r-plus-08-2024', tools: [ { type: 'function', function: { name: 'query_daily_sales_report', description: 'Connects to a database to retrieve overall sales volumes and sales information for a given day.', parameters: { type: 'object', properties: { day: { description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.', type: 'string', }, }, }, }, }, { type: 'function', function: { name: 'query_product_catalog', description: 'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.', parameters: { type: 'object', properties: { category: { description: 'Retrieves product information data for all products in this category.', type: 'string', }, }, }, }, }, ], messages: [ { role: 'user', content: "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?", }, ], }); console.log(response); })(); - sdk: python name: Tools code: > import cohere co = cohere.Client() response = co.chat( model="command-r-plus-08-2024", tools=[ cohere.ToolV2( type="function", function={ "name": "query_daily_sales_report", "description": "Connects to a database to retrieve overall sales volumes and sales information for a given day.", "parameters": { "type": "object", "properties": { "day": { "description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.", "type": "string", } }, }, }, ), cohere.ToolV2( type="function", function={ "name": "query_product_catalog", "description": "Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.", "parameters": { "type": "object", "properties": { "category": { "description": "Retrieves product information data for all products in this category.", "type": "string", } }, }, }, ), ], messages=[ { "role": "user", "content": "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?", } ], ) print(response) - sdk: java name: Tools code: > /* (C)2024 */ package chatv2post; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2ChatRequest; import com.cohere.api.types.*; import java.util.List; import java.util.Map; public class Tools { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ChatResponse response = cohere .v2() .chat( V2ChatRequest.builder() .model("command-r-plus-08-2024") .tools( List.of( ToolV2.builder() .function( ToolV2Function.builder() .name("query_daily_sales_report") .description( "Connects" + " to a" + " database" + " to retrieve" + " overall" + " sales" + " volumes" + " and sales" + " information" + " for a" + " given" + " day.") .parameters( Map.of( "day", ToolParameterDefinitionsValue.builder() .type("str") .description( "Retrieves" + " sales" + " data" + " for this" + " day," + " formatted" + " as YYYY-MM-DD.") .required(true) .build())) .build()) .build(), ToolV2.builder() .function( ToolV2Function.builder() .name("query_product_catalog") .description( "Connects" + " to a" + " a product" + " catalog" + " with" + " information" + " about" + " all the" + " products" + " being" + " sold," + " including" + " categories," + " prices," + " and stock" + " levels.") .parameters( Map.of( "category", ToolParameterDefinitionsValue.builder() .type("str") .description( "Retrieves" + " product" + " information" + " data" + " for all" + " products" + " in this" + " category.") .required(true) .build())) .build()) .build())) .build()); System.out.println(response); } } - sdk: curl name: Tools code: > curl --request POST \ --url https://api.cohere.com/v2/chat \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "command-r-plus-08-2024", "tools": [ { "type": "function", "function": { "name": "query_daily_sales_report", "description": "Connects to a database to retrieve overall sales volumes and sales information for a given day.", "parameters": { "type": "object", "properties": { "day": { "description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.", "type": "string" } } } } }, { "type": "function", "function": { "name": "query_product_catalog", "description": "Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.", "parameters": { "type": "object", "properties": { "category": { "description": "Retrieves product information data for all products in this category.", "type": "string" } } } } } ], "messages": [ { "role": "user", "content": "Can you provide a sales summary for 29th September 2023, and also give me some details about the products in the 'Electronics' category, for example their prices and stock levels?" } ] }' request: model: "command-r" messages: - role: "user" content: "Tell me about LLMs" tools: - type: function function: name: query_daily_sales_report description: Connects to a database to retrieve overall sales volumes and sales information for a given day. parameters: type: object properties: day: description: Retrieves sales data for this day, formatted as YYYY-MM-DD. type: str required: - day - type: function function: name: query_product_catalog description: Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels. parameters: type: object properties: category: description: Retrieves product information data for all products in this category. type: str required: - category stream: false response: body: id: 9e5f00aa-bf1e-481a-abe3-0eceac18c3ec message: role: "assistant" tool_plan: "I will first find the sales summary for 29th September 2023. Then, I will find the details of the products in the 'Electronics' category." tool_calls: - id: query_daily_sales_report_hgxxmkby3wta type: function function: name: query_daily_sales_report arguments: "{\"day\": \"2023-09-29\"}" - id: query_product_catalog_rpg0z5h8yyz2 type: function function: name: query_product_catalog arguments: "{\"category\": \"Electronics\"}" finish_reason: "TOOL_CALL" usage: billed_units: input_tokens: 127 output_tokens: 69 tokens: input_tokens: 1032 output_tokens: 124 /v1/generate: post: x-fern-audiences: - public summary: Generate operationId: generate x-fern-streaming: stream-condition: $request.stream response: type: object x-fern-type-name: Generation required: - id - generations properties: id: type: string x-fern-audiences: - public prompt: type: string x-fern-audiences: - public description: Prompt used for generations. generations: type: array x-fern-audiences: - public description: List of generated results items: type: object x-fern-audiences: - public $ref: "#/components/schemas/SingleGeneration" meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public response-stream: description: Response in content type stream when `stream` is `true` in the request parameters. Generation tokens are streamed with the GenerationStream response. The final response is of type GenerationFinalResponse. x-fern-type-name: GenerateStreamedResponse oneOf: - $ref: "#/components/schemas/GenerateStreamText" - $ref: "#/components/schemas/GenerateStreamEnd" - $ref: "#/components/schemas/GenerateStreamError" discriminator: propertyName: event_type mapping: text-generation: "#/components/schemas/GenerateStreamText" stream-end: "#/components/schemas/GenerateStreamEnd" stream-error: "#/components/schemas/GenerateStreamError" parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "errors" "io" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.GenerateStream( context.TODO(), &cohere.GenerateStreamRequest{ Prompt: "Please explain to me how LLMs work", }, ) if err != nil { log.Fatal(err) } // Make sure to close the stream when you're done reading. // This is easily handled with defer. defer resp.Close() for { message, err := resp.Recv() if errors.Is(err, io.EOF) { // An io.EOF error means the server is done sending messages // and should be treated as a success. break } if message.TextGeneration != nil { log.Printf("%+v", resp) } } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const generate = await cohere.generate({ prompt: 'Please explain to me how LLMs work', }); console.log(generate); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.generate( prompt="Please explain to me how LLMs work", ) print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.generate( prompt="Please explain to me how LLMs work", ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.GenerateRequest; import com.cohere.api.types.Generation; public class GeneratePost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); Generation response = cohere.generate( GenerateRequest.builder().prompt("Please explain to me how LLMs work").build()); System.out.println(response); } } - sdk: curl name: cURL code: |- curl --request POST \ --url https://api.cohere.com/v1/generate \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "prompt": "Please explain to me how LLMs work" }' request: prompt: Please explain to me how LLMs work stream: false response: body: id: 6afae9c2-3375-4d0e-8d18-2e9eb7f2c3ec generations: - id: 8e6de35d-3007-43ab-9253-ac4f95dcb8a2 text: >- LLMs, or Large Language Models, are a type of neural network-based AI model that has been trained on massive amounts of text data and have become ubiquitous in the AI landscape. They possess astounding capabilities for comprehending and generating human-like language. These models leverage neural networks that operate on a large scale, often involving millions or even billions of parameters. This substantial scale enables them to capture intricate patterns and connections within the vast amounts of text they have been trained on. The training process for LLMs is fueled by colossal datasets of textual information, ranging from books and articles to websites and conversational transcripts. This extensive training enables them to develop a nuanced understanding of language patterns, grammar, and semantics. When posed with a new text input, LLMs employ their finely honed understanding of language to generate informed responses or undertake tasks such as language translation, text completion, or question answering. They do this by manipulating the input text through adding, removing, or altering elements to craft a desired output. One of the underlying principles of their efficacy is the recurrent neural network (RNN) architecture they often adopt. This design enables them to process sequential data like natural language effectively. RNNs possess "memory" aspects via loops between layers, which allows them to retain and manipulate information gathered across long sequences, akin to the way humans process information. However, it's their size that arguably constitutes their most notable aspect. The sheer volume of these models – with counts of parameters often exceeding 100 million – enables them to capture correlations and patterns within language data effectively. This empowers them to generate coherent and contextually appropriate responses, posing a remarkable advancement in conversational AI. While LLMs have demonstrated extraordinary language prowess, it's vital to acknowledge their limitations and potential for improvement. Their biases often reflect those of the training data, and they may struggle with logical inconsistencies or factual errors. Ongoing research aims to enhance their robustness, diversity, and overall usability. In essence, LLMs are a groundbreaking manifestation of AI's potential to simulate and even extend human language capabilities, while also serving as a testament to the ongoing journey towards refining and perfecting these technologies. prompt: Please explain to me how LLMs work meta: api_version: version: "1" billed_units: input_tokens: 8 output_tokens: 442 responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Generation" application/stream+json: schema: $ref: "#/components/schemas/GenerateStreamedResponse" headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: | This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API. Generates realistic text conditioned on a given input. requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: prompt: type: string x-fern-audiences: - public example: Please explain to me how LLMs work description: | The input text that serves as the starting point for generating the response. Note: The prompt will be pre-processed and modified before reaching the model. writeOnly: true model: type: string x-fern-audiences: - public description: |- The identifier of the model to generate with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID. writeOnly: true num_generations: type: integer x-fern-audiences: - public description: | The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`. writeOnly: true stream: type: boolean x-fern-audiences: - public description: | When `true`, the response will be a JSON stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated. The final event will contain the complete response, and will contain an `is_finished` field set to `true`. The event will also contain a `finish_reason`, which can be one of the following: - `COMPLETE` - the model sent back a finished reply - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length - `ERROR` - something went wrong when generating the reply - `ERROR_TOXIC` - the model generated a reply that was deemed toxic max_tokens: type: integer x-fern-audiences: - public description: | The maximum number of tokens the model will generate as part of the response. Note: Setting a low value may result in incomplete generations. This parameter is off by default, and if it's not specified, the model will continue generating until it emits an EOS completion token. See [BPE Tokens](/bpe-tokens-wiki) for more details. Can only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt. writeOnly: true truncate: type: string x-fern-audiences: - public default: END enum: - NONE - START - END description: |- One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length. Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model. If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned. writeOnly: true temperature: type: number x-fern-audiences: - public description: | A non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations. See [Temperature](/temperature-wiki) for more details. Defaults to `0.75`, min value of `0.0`, max value of `5.0`. writeOnly: true seed: x-fern-audiences: - public minimum: 0 maximum: 18446744073709552000 type: integer description: | If specified, the backend will make a best effort to sample tokens deterministically, such that repeated requests with the same seed and parameters should return the same result. However, determinism cannot be totally guaranteed. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments preset: type: string x-fern-audiences: - public example: my-preset-a58sbd description: | Identifier of a custom preset. A preset is a combination of parameters, such as prompt, temperature etc. You can create presets in the [playground](https://dashboard.cohere.com/playground/generate). When a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters. writeOnly: true end_sequences: type: array x-fern-audiences: - public description: The generated text will be cut at the beginning of the earliest occurrence of an end sequence. The sequence will be excluded from the text. items: type: string x-fern-audiences: - public writeOnly: true stop_sequences: type: array x-fern-audiences: - public description: The generated text will be cut at the end of the earliest occurrence of a stop sequence. The sequence will be included the text. items: type: string x-fern-audiences: - public writeOnly: true k: type: integer x-fern-audiences: - public description: | Ensures only the top `k` most likely tokens are considered for generation at each step. Defaults to `0`, min value of `0`, max value of `500`. writeOnly: true p: type: number x-fern-audiences: - public description: | Ensures that only the most likely tokens, with total probability mass of `p`, are considered for generation at each step. If both `k` and `p` are enabled, `p` acts after `k`. Defaults to `0.75`. min value of `0.01`, max value of `0.99`. writeOnly: true frequency_penalty: type: number x-fern-audiences: - public description: | Used to reduce repetitiveness of generated tokens. The higher the value, the stronger a penalty is applied to previously present tokens, proportional to how many times they have already appeared in the prompt or prior generation. Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. writeOnly: true presence_penalty: type: number x-fern-audiences: - public description: | Defaults to `0.0`, min value of `0.0`, max value of `1.0`. Can be used to reduce repetitiveness of generated tokens. Similar to `frequency_penalty`, except that this penalty is applied equally to all tokens that have already appeared, regardless of their exact frequencies. Using `frequency_penalty` in combination with `presence_penalty` is not supported on newer models. writeOnly: true return_likelihoods: type: string x-fern-audiences: - public description: |- One of `GENERATION|ALL|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`. If `GENERATION` is selected, the token likelihoods will only be provided for generated text. If `ALL` is selected, the token likelihoods will be provided both for the prompt and the generated text. enum: - GENERATION - ALL - NONE default: NONE raw_prompting: type: boolean x-fern-audiences: - public description: When enabled, the user's prompt will be sent to the model without any pre-processing. required: - prompt writeOnly: true description: "" /v1/embed: post: x-fern-audiences: - public summary: Embed operationId: embed parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Images code: > package main import ( "context" "encoding/base64" "fmt" "io" "log" "net/http" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { // Fetch the image resp, err := http.Get("https://cohere.com/favicon-32x32.png") if err != nil { log.Println("Error fetching the image:", err) return } defer resp.Body.Close() // Read the image content buffer, err := io.ReadAll(resp.Body) if err != nil { log.Println("Error reading the image content:", err) return } stringifiedBuffer := base64.StdEncoding.EncodeToString(buffer) contentType := resp.Header.Get("Content-Type") imageBase64 := fmt.Sprintf("data:%s;base64,%s", contentType, stringifiedBuffer) co := client.NewClient() embed, err := co.Embed( context.TODO(), &cohere.EmbedRequest{ Images: []string{imageBase64}, Model: cohere.String("embed-english-v3.0"), InputType: cohere.EmbedInputTypeImage.Ptr(), EmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat}, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", embed) } - sdk: typescript name: Images code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const image = await fetch('https://cohere.com/favicon-32x32.png'); const buffer = await image.arrayBuffer(); const stringifiedBuffer = Buffer.from(buffer).toString('base64'); const contentType = image.headers.get('content-type'); const imageBase64 = `data:${contentType};base64,${stringifiedBuffer}`; const embed = await cohere.embed({ model: 'embed-english-v3.0', inputType: 'image', embeddingTypes: ['float'], images: [imageBase64], }); console.log(embed); })(); - sdk: python name: Images code: > import cohere import requests import base64 co = cohere.Client() image = requests.get("https://cohere.com/favicon-32x32.png") stringified_buffer = base64.b64encode(image.content).decode("utf-8") content_type = image.headers["Content-Type"] image_base64 = f"data:{content_type};base64,{stringified_buffer}" response = co.embed( model="embed-english-v3.0", input_type="image", embedding_types=["float"], images=[image_base64], ) print(response) - sdk: java name: Images code: > package embedpost; /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.EmbedRequest; import com.cohere.api.types.EmbedInputType; import com.cohere.api.types.EmbedResponse; import com.cohere.api.types.EmbeddingType; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URI; import java.net.URL; import java.util.Base64; import java.util.List; public class EmbedImagePost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); URL url = URI.toUrl( "https://cohere.com/favicon-32x32.png"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.connect(); InputStream inputStream = connection.getInputStream(); byte[] buffer = inputStream.readAllBytes(); inputStream.close(); String imageBase64 = String.format( "data:%s;base64,%s", connection.getHeaderField("Content-Type"), Base64.getEncoder().encodeToString(buffer)); EmbedResponse response = cohere.embed( EmbedRequest.builder() .images(List.of(imageBase64)) .model("embed-english-v3.0") .inputType(EmbedInputType.IMAGE) .embeddingTypes(List.of(EmbeddingType.FLOAT)) .build()); System.out.println(response); } } - sdk: curl name: Images code: >- curl --request POST \ --url https://api.cohere.com/v1/embed \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "embed-english-v3.0", "input_type": "image", "embedding_types": ["float"], "images": ["data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAQEBAQEBAQEBAQGBgUGBggHBwcHCAwJCQkJCQwTDA4MDA4MExEUEA8QFBEeFxUVFx4iHRsdIiolJSo0MjRERFwBBAQEBAQEBAQEBAYGBQYGCAcHBwcIDAkJCQkJDBMMDgwMDgwTERQQDxAUER4XFRUXHiIdGx0iKiUlKjQyNEREXP/CABEIAZABkAMBIgACEQEDEQH/xAAdAAEAAQQDAQAAAAAAAAAAAAAABwEFBggCAwQJ/9oACAEBAAAAAN/gAAAAA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G8/p9OrIDAg8CKkTQd07iRsdBcPV3ucSkX9H9KP1O8naIBBBG410gsBh2K3MCDKNjrE/2tSLpuqDtIFKAqhRwA6y9GVw/mAdjohEEwK2I4u0jH/Lb6exgXljL2tEwP9pq0GdzF69bfHO4fyAGx0ScPgVpl9JkB/yO309cG6w9O0ROeZq3bQnib/UOsJyBJqV9ZI7952Ogl8DDdYezfEra1B5HcdvpTfC+xicoc44QIl/t4/z7LaUTRK3bwPr1d9PoJqlPxN/A2cOvpsNvIbyA/Eh3jvHaDWHYjbYnapdWzgg/qHap7js9JseTDLZreBwbuVSAB9AP1GiSSSeJ9ltcGB8/pPEUjq6hlOYPU3FykC97dgp3aRi7HMnaw3FbzCptdaSZeJDvVh5isO6aYdcqq3gNvJ25705ikxXDJAGS/gI/5FqfHMIt10pb+H0DBjyGdYr03XRaLCojnw1sg/6FTTSzyPNNIXkc5szHMnYhuJIDmh3doPCo7+F9z5oaE0R4SrzrWR/cXnWsj+4vOtZH9xeYrWx/cXmKe6gTjID6b6lxAnMQrl5mmYsSzEkn92//2Q=="] }' request: model: embed-english-v3.0 input_type: image embedding_types: - float images: - data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAQEBAQEBAQEBAQGBgUGBggHBwcHCAwJCQkJCQwTDA4MDA4MExEUEA8QFBEeFxUVFx4iHRsdIiolJSo0MjRERFwBBAQEBAQEBAQEBAYGBQYGCAcHBwcIDAkJCQkJDBMMDgwMDgwTERQQDxAUER4XFRUXHiIdGx0iKiUlKjQyNEREXP/CABEIAZABkAMBIgACEQEDEQH/xAAdAAEAAQQDAQAAAAAAAAAAAAAABwEFBggCAwQJ/9oACAEBAAAAAN/gAAAAAAAAAAAAAAAAAAAAAAAAAAHTg9j6agAAp23/ADjsAAAPFrlAUYeagAAArdZ12uzcAAKax6jWUAAAAO/bna+oAC1aBxAAAAAAbM7rVABYvnRgYAAAAAbw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b6exgXljL2tEwP9pq0GdzF69bfHO4fyAGx0ScPgVpl9JkB/yO309cG6w9O0ROeZq3bQnib/UOsJyBJqV9ZI7952Ogl8DDdYezfEra1B5HcdvpTfC+xicoc44QIl/t4/z7LaUTRK3bwPr1d9PoJqlPxN/A2cOvpsNvIbyA/Eh3jvHaDWHYjbYnapdWzgg/qHap7js9JseTDLZreBwbuVSAB9AP1GiSSSeJ9ltcGB8/pPEUjq6hlOYPU3FykC97dgp3aRi7HMnaw3FbzCptdaSZeJDvVh5isO6aYdcqq3gNvJ25705ikxXDJAGS/gI/5FqfHMIt10pb+H0DBjyGdYr03XRaLCojnw1sg/6FTTSzyPNNIXkc5szHMnYhuJIDmh3doPCo7+F9z5oaE0R4SrzrWR/cXnWsj+4vOtZH9xeYrWx/cXmKe6gTjID6b6lxAnMQrl5mmYsSzEkn92//2Q== response: body: id: 5807ee2e-0cda-445a-9ec8-864c60a06606 texts: [] images: - width: 400 height: 400 format: jpeg bit_depth: 24 embeddings: float: - - -0.007247925 - -0.041229248 - -0.023223877 - -0.08392334 - -0.03378296 - -0.008308411 - -0.049926758 - 0.041625977 - 0.043151855 - 0.03652954 - -0.05154419 - 0.011787415 - -0.02784729 - -0.024230957 - -0.018295288 - -0.0440979 - 0.032928467 - -0.015007019 - 0.009315491 - -0.028213501 - -0.00022602081 - -0.0074157715 - -0.000975132 - 0.05783081 - 0.029510498 - 0.024871826 - -0.009422302 - -0.028701782 - -0.021118164 - -0.019088745 - -0.0038433075 - 0.04083252 - 0.03024292 - -0.010154724 - -0.008163452 - 0.04269409 - 0.017471313 - -0.010017395 - 0.006629944 - 0.011047363 - 0.013542175 - -0.007926941 - -0.024932861 - -0.05960083 - -0.05404663 - 0.037384033 - -0.049621582 - -0.024002075 - 0.040039062 - 0.02645874 - 0.010261536 - -0.028244019 - 0.016479492 - 0.014266968 - -0.043823242 - -0.022262573 - -0.0057678223 - -0.04800415 - 0.041015625 - 0.01537323 - -0.021530151 - -0.014663696 - 0.051849365 - -0.025558472 - 0.045776367 - -0.025665283 - -0.005821228 - 0.02973938 - 0.053131104 - 0.020706177 - -0.004600525 - 0.0046920776 - 0.02558899 - -0.05319214 - -0.058013916 - 0.080444336 - -0.00068187714 - 0.031311035 - 0.032440186 - -0.051086426 - -0.003534317 - 0.046325684 - -0.032440186 - -0.03894043 - -0.0071907043 - -0.004627228 - -0.01826477 - -0.027755737 - 0.040802002 - 0.019363403 - -0.009727478 - 0.0064468384 - 0.056488037 - 0.018585205 - -0.017974854 - -0.08514404 - 5.0604343e-5 - -0.014839172 - 0.01586914 - 0.00017666817 - 0.02267456 - -0.05105591 - 0.007785797 - -0.02684021 - 0.0064849854 - 0.014411926 - 0.0013427734 - -0.012611389 - 0.043701172 - 0.012290955 - -0.030731201 - 0.034729004 - 0.015289307 - -0.037475586 - -0.030838013 - 0.010009766 - -0.028244019 - 0.051635742 - 0.01725769 - 0.013977051 - 0.008102417 - 0.028121948 - 0.02079773 - 0.0027256012 - 0.009185791 - 0.0016012192 - -0.038116455 - -0.008331299 - -0.028076172 - 0.018463135 - -0.02154541 - 0.021240234 - 0.023376465 - 0.02961731 - -0.028305054 - -0.023101807 - -0.010681152 - -0.0072021484 - -0.04321289 - 0.0058517456 - 0.030792236 - -0.021102905 - 0.050933838 - 0.0060157776 - 0.0128479 - 0.025146484 - -0.006099701 - 0.023345947 - 0.023971558 - 0.015510559 - -0.009895325 - -0.04071045 - 0.049835205 - 0.0053100586 - -0.028930664 - 0.017578125 - -0.0048217773 - -0.0042762756 - -0.034240723 - -0.03253174 - 0.035827637 - 0.01574707 - 0.034851074 - 0.070129395 - 0.011749268 - -0.009223938 - 0.02470398 - -0.005115509 - 0.016723633 - 0.04937744 - -0.032928467 - 0.031280518 - -0.00023400784 - 0.010169983 - -0.01071167 - 0.010520935 - 0.022338867 - -0.0259552 - 0.044769287 - 0.0070610046 - -0.012451172 - -0.04156494 - 0.047088623 - -0.017578125 - 0.012741089 - -0.016479492 - 0.0023078918 - -0.008331299 - 0.021591187 - 0.01473999 - -0.018081665 - 0.033081055 - -0.057556152 - 0.008621216 - 0.013954163 - -0.009742737 - -0.015548706 - 0.015281677 - -0.005958557 - 0.0065307617 - 0.01979065 - 0.041778564 - -0.02684021 - 0.027709961 - -0.07672119 - 0.023406982 - -0.037902832 - 0.035339355 - -0.021881104 - 0.056732178 - 0.03466797 - 0.0059318542 - -0.058654785 - 0.025375366 - 0.015029907 - 0.002380371 - -0.024230957 - 0.014541626 - -0.006641388 - -0.01864624 - 0.012290955 - 0.0007929802 - -0.009277344 - 0.04953003 - -0.004081726 - 0.0029258728 - -0.017181396 - 0.0074920654 - -0.0001707077 - 0.04220581 - 0.008972168 - -0.0071525574 - 0.0015583038 - 0.034362793 - -0.019058228 - 0.013626099 - 0.022613525 - -0.0061149597 - 0.017669678 - 0.015586853 - 0.034973145 - 0.02217102 - -0.045013428 - -0.009864807 - 0.07244873 - 0.010177612 - 0.029724121 - -0.018829346 - -0.034057617 - -0.018859863 - 0.059936523 - -0.0076408386 - 0.021331787 - -0.013786316 - 0.015281677 - 0.016235352 - -0.039855957 - -0.02748108 - -0.033416748 - 0.016174316 - 0.026489258 - 0.0049095154 - -0.026000977 - 0.00831604 - -0.019851685 - -0.021408081 - 0.023010254 - 0.030075073 - 0.0335083 - -0.05493164 - 0.019515991 - -0.020401001 - -0.0061073303 - 0.018997192 - 0.020126343 - -0.027740479 - -0.038116455 - 0.0052948 - -0.008613586 - -0.016494751 - -0.001247406 - 0.022644043 - 0.008300781 - -0.02104187 - 0.016693115 - -0.0032901764 - 0.012046814 - -0.023468018 - -0.007259369 - 0.031234741 - 0.06604004 - 0.051635742 - 0.0009441376 - -0.006084442 - 0.025619507 - -0.006881714 - 0.02999878 - 0.050964355 - 0.017715454 - -0.024856567 - -0.010070801 - 0.05319214 - -0.03652954 - 0.011810303 - -0.011978149 - 0.013046265 - -0.016662598 - 0.017166138 - -0.005542755 - -0.07989502 - 0.029220581 - 0.056488037 - 0.015914917 - -0.011184692 - -0.018203735 - -0.03894043 - -0.026626587 - 0.0010070801 - -0.07397461 - -0.060333252 - 0.046020508 - -0.017440796 - -0.020385742 - -0.0211792 - -0.018295288 - -0.01802063 - 0.003211975 - -0.012969971 - -0.034576416 - -0.022079468 - 0.034606934 - -0.022079468 - -0.02154541 - -0.0039367676 - 0.015419006 - -0.027023315 - 0.024642944 - -0.0007047653 - -0.008293152 - 0.02708435 - 0.05267334 - 0.010177612 - 0.017822266 - -0.021759033 - -0.051116943 - -0.02583313 - -0.06427002 - 0.03213501 - -0.009635925 - -0.04547119 - 0.018997192 - -0.024032593 - -0.011024475 - 0.033935547 - 0.050842285 - 0.011009216 - -0.002527237 - 0.04852295 - 0.038360596 - -0.035583496 - -0.021377563 - -0.016052246 - -0.072143555 - 0.03665161 - 0.02897644 - -0.03842163 - -0.00068187714 - 0.022415161 - -0.0030879974 - 0.043762207 - 0.05392456 - -0.0362854 - -0.04647827 - -0.034057617 - -0.040374756 - -0.03942871 - 0.030761719 - -0.068115234 - 0.011329651 - 0.011413574 - -0.012435913 - 0.01576233 - 0.022766113 - 0.05609131 - 0.07092285 - 0.017593384 - 0.024337769 - 0.027923584 - 0.06994629 - 0.00655365 - -0.020248413 - -0.03945923 - -0.0491333 - -0.049194336 - 0.020050049 - 0.010910034 - 0.013511658 - 0.01676941 - -0.041900635 - -0.046142578 - 0.012268066 - 0.026748657 - -0.036499023 - 0.021713257 - -0.036590576 - 0.014411926 - 0.029174805 - -0.029388428 - 0.04119873 - 0.04852295 - 0.007068634 - -0.00090408325 - 0.0048332214 - -0.015777588 - -0.01499939 - -0.0068206787 - -0.02708435 - 0.010543823 - 0.004085541 - -0.026901245 - -0.0045661926 - 0.0061912537 - -0.0014343262 - 0.028945923 - -0.03552246 - 0.030441284 - -0.029281616 - 0.050628662 - -0.033599854 - -0.085510254 - -0.052520752 - -0.07507324 - -0.008003235 - -0.026382446 - -0.078063965 - -0.025161743 - -0.025421143 - -0.0073165894 - 0.01889038 - -0.05999756 - -0.0051612854 - 0.0072517395 - -0.011497498 - 0.01687622 - 0.002231598 - -0.034423828 - -0.0013084412 - -0.012413025 - 0.008888245 - 0.017486572 - -0.03353882 - 0.0069885254 - -0.02722168 - 0.02015686 - -0.04510498 - -0.038726807 - -0.0031356812 - 0.033233643 - 0.025268555 - -0.015106201 - 0.02407837 - -0.00024700165 - -0.07409668 - -0.012367249 - 0.014785767 - -0.04486084 - 0.074401855 - -0.020690918 - -0.025222778 - 0.029083252 - -0.018997192 - 0.0017557144 - 0.03857422 - -0.020111084 - 0.03338623 - -0.028213501 - 0.0063705444 - -0.010124207 - -0.03112793 - -0.03286743 - 0.0046043396 - -0.0052223206 - 0.00023317337 - 0.0423584 - 0.028030396 - 0.0005788803 - -0.02708435 - 0.006324768 - 0.019821167 - -0.0042686462 - -0.026428223 - -0.02293396 - 0.036590576 - -0.023376465 - -0.022537231 - 0.032226562 - -0.020629883 - 0.017929077 - 0.0440979 - -0.014038086 - -0.022216797 - 0.020446777 - -0.05496216 - -0.018859863 - -0.039855957 - 0.008300781 - 0.07281494 - 0.018295288 - 0.042114258 - 0.005519867 - 0.017990112 - -0.008773804 - 0.011123657 - -0.008239746 - -0.045532227 - 0.026153564 - -0.015853882 - 0.027557373 - -0.049041748 - -0.0022945404 - -0.009399414 - -0.045898438 - 0.05053711 - 0.038513184 - -0.031799316 - 0.012329102 - 0.024871826 - 0.04348755 - -0.04788208 - 0.01423645 - 0.021240234 - 0.05493164 - 0.008956909 - -0.056243896 - 0.032043457 - -0.01574707 - -0.01285553 - -0.009498596 - -0.018951416 - -0.029556274 - 0.0069274902 - -0.032348633 - -0.022445679 - -0.00093603134 - -0.015808105 - -0.027175903 - 0.014091492 - 0.025665283 - -0.023468018 - -0.03250122 - -0.0004544258 - 0.042633057 - -0.06036377 - -0.039611816 - -0.042938232 - -0.02418518 - -0.0703125 - 0.045135498 - -0.001036644 - -0.017913818 - -0.004043579 - 0.0138549805 - -0.02532959 - 0.010765076 - 0.021575928 - 0.013114929 - 0.033935547 - -0.010574341 - 0.017990112 - -0.026107788 - -0.029144287 - -0.046569824 - -0.0030517578 - -0.022994995 - -0.017471313 - -0.0070495605 - -9.846687e-5 - 0.029281616 - 0.017440796 - 0.045532227 - 0.025650024 - 0.0491333 - -0.013145447 - 0.070129395 - -0.0051879883 - -0.04043579 - 0.023864746 - 0.016830444 - -0.014152527 - -0.06359863 - -0.005065918 - -0.009880066 - -0.0034618378 - -0.081726074 - -0.0289917 - -0.007461548 - -0.0013504028 - 0.020523071 - 0.0076446533 - -0.011650085 - 0.014549255 - 0.010955811 - 0.02180481 - -0.027572632 - -0.012252808 - 0.009033203 - -0.0048980713 - 0.031173706 - -0.020309448 - 0.022979736 - -0.013900757 - -0.004108429 - 0.018325806 - -0.031402588 - 0.01737976 - 0.03201294 - -0.02508545 - -0.015625 - -0.04626465 - -0.014656067 - 0.016036987 - -0.030639648 - 0.041748047 - -0.0032978058 - -0.03277588 - 0.037719727 - 0.023788452 - -0.008140564 - -0.041809082 - 0.034698486 - -0.022994995 - -0.009979248 - -0.03729248 - -0.0904541 - 0.00028443336 - 0.080566406 - -0.035125732 - -0.054229736 - -0.017700195 - 0.060668945 - 0.008979797 - 0.015052795 - -0.0072364807 - -0.001490593 - 0.0065231323 - -0.014579773 - 0.016067505 - -0.020339966 - -0.020217896 - 0.02909851 - 0.050628662 - 0.04510498 - -0.01979065 - 0.008918762 - 0.031799316 - 0.031951904 - -0.016906738 - 0.031036377 - 0.0040664673 - -0.046905518 - -0.04928589 - 0.044403076 - -0.0524292 - -0.012832642 - 0.049835205 - 0.0040283203 - -0.012649536 - 0.06878662 - -0.02859497 - -0.014137268 - 0.0036144257 - -0.06262207 - 0.046813965 - 0.024978638 - 0.0017976761 - -0.032409668 - -0.004108429 - -0.013557434 - -0.07196045 - 0.026733398 - 0.0024261475 - -0.022735596 - -0.0022182465 - -0.0064315796 - -0.03652954 - 0.04135132 - -0.032562256 - 0.004524231 - 0.020019531 - -0.0113220215 - -0.071777344 - -0.03451538 - 0.0022583008 - -0.06512451 - -0.005317688 - 0.020248413 - -0.036712646 - 0.005809784 - -0.018951416 - -0.0026855469 - 0.027572632 - -0.00036668777 - 0.0073623657 - -0.018829346 - 0.009101868 - 0.051971436 - 0.023132324 - -0.022537231 - 0.00932312 - 0.00944519 - 0.014183044 - 0.020889282 - 0.0032844543 - -0.0073776245 - -0.05807495 - -0.032440186 - 0.033996582 - 0.0423584 - 0.014259338 - 0.061676025 - -0.02154541 - -0.031982422 - 0.005493164 - -0.01512146 - 0.023101807 - -0.011383057 - -0.059539795 - 0.021820068 - 0.015487671 - -0.004875183 - -0.015640259 - 0.015319824 - -0.0054359436 - -0.026229858 - 0.0061454773 - -0.032348633 - 0.038513184 - 0.004840851 - -0.016021729 - -0.017608643 - -0.019577026 - -0.009178162 - 0.045013428 - -0.01007843 - 0.022323608 - 0.034179688 - 0.00566864 - 0.055511475 - -0.033355713 - -0.019317627 - -8.481741e-5 - 0.017547607 - -0.053344727 - 0.012229919 - 0.022384644 - 0.018051147 - 0.010734558 - 0.004501343 - -0.05911255 - -0.0030918121 - -0.0513916 - -0.0050086975 - -0.01600647 - 0.05343628 - -0.0008234978 - 0.07293701 - -0.056610107 - -0.06549072 - -0.01776123 - -0.0022678375 - 0.023239136 - 0.01020813 - -0.005153656 - -0.00630188 - -0.009880066 - 0.022109985 - 0.033203125 - -0.03567505 - -0.014129639 - 0.015625 - 0.022888184 - -0.038726807 - -0.026321411 - -0.007259369 - 0.005924225 - 0.0010814667 - 0.06665039 - -0.008880615 - 0.053771973 - 0.062194824 - 0.018981934 - 0.022338867 - 0.01361084 - 0.025604248 - 0.022109985 - 0.0044288635 - -0.008331299 - -0.0019416809 - 0.006454468 - -0.045013428 - -0.02519226 - -0.012268066 - -0.032165527 - 7.2181225e-5 - -0.021575928 - -0.006324768 - 0.029785156 - 0.0063438416 - -0.01210022 - 0.029403687 - 0.00592041 - 0.008369446 - 0.00818634 - -0.04498291 - -0.041809082 - 0.0078086853 - -0.05935669 - -0.043518066 - 0.007270813 - 0.060424805 - 0.033996582 - 0.055908203 - 0.013755798 - 0.03982544 - 0.014640808 - -0.01373291 - 0.033325195 - -0.0047073364 - 0.015899658 - -0.00043344498 - 0.022338867 - -0.007095337 - 0.02949524 - 0.042633057 - 0.030670166 - 0.022415161 - -0.0033683777 - 0.018814087 - -0.013031006 - 0.031951904 - 0.022094727 - -0.009986877 - 0.025665283 - -0.0138168335 - 0.049743652 - 0.024307251 - 0.0088272095 - -0.03479004 - 0.07318115 - 0.009849548 - 0.051635742 - -0.05331421 - -0.053131104 - -0.0044898987 - 0.029342651 - 0.005596161 - 0.044189453 - -0.042388916 - -0.012939453 - -0.0007529259 - -0.06088257 - 0.036010742 - -0.02355957 - 0.004497528 - -0.0023822784 - -0.053588867 - -0.04168701 - -0.017868042 - -0.01927185 - -0.06011963 - 0.028884888 - 0.061401367 - -0.005584717 - 0.014823914 - -0.02255249 - 4.631281e-5 - 0.039031982 - -0.0055389404 - 0.007194519 - 0.0037631989 - 0.008834839 - 0.018692017 - 0.033111572 - -0.056274414 - -0.021774292 - 0.04727173 - -0.03265381 - 0.022140503 - 0.027801514 - 0.004043579 - -0.016525269 - -0.041809082 - 0.024520874 - 0.008529663 - 0.049072266 - 0.033447266 - -0.028839111 - 0.048675537 - 0.021453857 - -0.08087158 - 0.034606934 - -0.002910614 - 0.012176514 - 0.035705566 - 0.040161133 - -0.02355957 - -0.01626587 - -0.033721924 - -0.013893127 - -0.04156494 - 0.06719971 - 0.043151855 - -0.033813477 - 0.028045654 - 0.0029525757 - -0.022033691 - -0.093811035 - -0.0056114197 - 0.00026154518 - 0.058746338 - -0.05065918 - 0.02897644 - -0.01550293 - -0.02947998 - -0.018249512 - 0.034942627 - -0.04574585 - -0.037109375 - -0.006160736 - 0.006149292 - -0.0012207031 - -0.042907715 - -0.016448975 - 0.0052719116 - 0.036590576 - -0.045318604 - -0.04220581 - -0.018859863 - -0.031021118 - 0.06439209 - -0.0056533813 - -0.037200928 - -0.026550293 - 0.027786255 - -0.028427124 - 0.09161377 - -0.0088272095 - -0.003643036 - -0.053253174 - -0.01826477 - -0.016540527 - -0.012535095 - -0.03942871 - -0.0049095154 - 0.031311035 - 0.049468994 - -0.066589355 - -0.05029297 - 7.5519085e-5 - -0.0017404556 - -0.013214111 - -0.03756714 - -0.009147644 - -0.025466919 - 0.026672363 - 0.020965576 - -0.0073432922 - 0.0011005402 - -0.04937744 - -0.018463135 - 0.00274086 - -0.013252258 - 0.0126953125 - -0.077697754 - 0.014045715 - 0.00039935112 - -0.019515991 - -0.0027618408 - -0.011672974 - -0.043884277 - 0.009231567 - 0.062805176 - -0.0137786865 - -0.026229858 - -0.034362793 - -0.015090942 - 0.016937256 - 0.030639648 - -0.02420044 - 0.02482605 - -0.0033740997 - 0.046417236 - -0.012008667 - -0.04031372 - -0.00032520294 - 0.01525116 - -0.0066375732 - 0.0062713623 - -0.01171875 - -0.027191162 - -0.014137268 - -0.025390625 - 0.002111435 - -0.06561279 - 0.031555176 - -0.07519531 - -0.04547119 - 0.014472961 - -0.0158844 - -0.091552734 - -0.03366089 - 0.050323486 - -0.0013589859 - -0.033203125 - 0.046539307 - -0.030288696 - 0.0046195984 - 0.049835205 - 0.02003479 - -0.004196167 - 0.013168335 - -0.016403198 - 0.01676941 - -0.00340271 meta: api_version: version: '2' billed_units: images: 1 response_type: embeddings_by_type - code-samples: - sdk: go name: Texts code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Embed( context.TODO(), &cohere.EmbedRequest{ Texts: []string{"hello", "goodbye"}, Model: cohere.String("embed-english-v3.0"), InputType: cohere.EmbedInputTypeSearchDocument.Ptr(), }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Texts code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const embed = await cohere.embed({ texts: ['hello', 'goodbye'], model: 'embed-english-v3.0', inputType: 'classification', embeddingTypes: ['float'], }); console.log(embed); })(); - sdk: python name: Texts code: > import cohere co = cohere.Client() response = co.embed( texts=["hello", "goodbye"], model="embed-english-v3.0", input_type="classification" ) print(response) - sdk: python name: Texts (async) code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.embed( texts=["hello", "goodbye"], model="embed-english-v3.0", input_type="classification", ) print(response) asyncio.run(main()) - sdk: java name: Texts code: > package embedpost; /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.EmbedRequest; import com.cohere.api.types.EmbedInputType; import com.cohere.api.types.EmbedResponse; import java.util.List; public class EmbedPost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); EmbedResponse response = cohere.embed( EmbedRequest.builder() .texts(List.of("hello", "goodbye")) .model("embed-english-v3.0") .inputType(EmbedInputType.CLASSIFICATION) .build()); System.out.println(response); } } - sdk: curl name: Texts code: |- curl --request POST \ --url https://api.cohere.com/v1/embed \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "embed-english-v3.0", "texts": ["hello", "goodbye"], "input_type": "classification" }' request: texts: - hello - goodbye model: embed-english-v3.0 input_type: classification response: body: id: 1c62213a-1f15-46f1-ac62-36f6bbaf3972 texts: - hello - goodbye embeddings: - - 0.016296387 - -0.008354187 - -0.04699707 - -0.07104492 - 0.00013196468 - -0.014892578 - -0.018661499 - 0.019134521 - 0.008476257 - 0.04159546 - -0.036895752 - -0.00048303604 - 0.06414795 - -0.036346436 - 0.045806885 - -0.03125 - 0.03793335 - 0.048583984 - 0.0062179565 - 0.0071144104 - -0.020935059 - 0.04196167 - -0.039398193 - 0.03463745 - 0.051879883 - 0.030838013 - -0.0048103333 - -0.00036287308 - -0.017944336 - -0.039611816 - 0.013389587 - 0.0044021606 - 0.018951416 - 0.020767212 - -0.0025997162 - 0.0904541 - -0.0121154785 - -0.026184082 - 0.012413025 - 0.004119873 - 0.030654907 - -0.030792236 - -0.041107178 - -0.02368164 - -0.043304443 - -0.00077438354 - -0.017074585 - -0.019729614 - 0.078125 - -0.031585693 - 0.020217896 - -0.01524353 - 0.017471313 - -0.0008010864 - -0.03717041 - 0.011062622 - -0.072143555 - -0.013175964 - 0.01058197 - 0.030853271 - 0.044799805 - 0.0045928955 - 0.03253174 - 0.047698975 - -0.0039024353 - -0.01965332 - 0.024475098 - -0.013755798 - 0.018951416 - -0.015487671 - 0.015594482 - 0.00096321106 - -0.006450653 - -0.04748535 - -0.021972656 - 0.06323242 - -0.009498596 - 0.014297485 - 0.0038471222 - -0.023117065 - -0.02180481 - -0.01928711 - -0.08758545 - -0.04852295 - 0.029510498 - 0.011276245 - -0.013504028 - -0.009391785 - -0.0064468384 - 0.010978699 - -0.014404297 - 0.053741455 - 0.046569824 - 0.00042700768 - -0.037719727 - 0.011985779 - -0.009643555 - 0.0067749023 - 0.008071899 - 0.018829346 - -0.05419922 - -0.020950317 - -0.02659607 - -0.028869629 - -0.015716553 - 0.022705078 - -0.0046958923 - 0.02192688 - 0.032440186 - 0.048034668 - -0.006843567 - 0.045074463 - -0.02293396 - 0.010238647 - -0.04534912 - 0.01638794 - -0.00680542 - 0.0038871765 - -0.032836914 - 0.051361084 - 0.0395813 - 0.032928467 - -0.00843811 - 0.007858276 - -0.040802002 - -0.008346558 - -0.013252258 - -0.046173096 - 0.051727295 - -0.027175903 - -0.011497498 - 0.04940796 - -0.095214844 - -0.0345459 - -0.021453857 - 0.0051002502 - -0.01725769 - -0.045196533 - -0.0016956329 - 0.021575928 - 0.07720947 - -0.00094270706 - 0.020904541 - 0.05001831 - -0.033111572 - 0.032287598 - -0.0052833557 - -0.00007402897 - 0.035125732 - 0.019424438 - -0.06665039 - -0.02557373 - 0.010887146 - 0.05807495 - 0.015022278 - 0.0657959 - -0.015350342 - 0.008468628 - -0.017944336 - 0.029388428 - -0.005126953 - 0.015914917 - 0.051879883 - -0.015975952 - -0.039031982 - -0.012374878 - 0.0032424927 - 0.0008568764 - 0.014579773 - 0.021530151 - -0.0061912537 - 0.028717041 - 0.046844482 - 0.032836914 - 0.0071372986 - -0.023406982 - -0.03717041 - 0.016723633 - 0.03994751 - 0.025390625 - 0.03427124 - -0.01914978 - -0.026000977 - 0.07342529 - -0.03213501 - -0.058258057 - 0.029144287 - 0.001042366 - 0.030517578 - 0.011474609 - 0.058410645 - 0.005027771 - -0.038635254 - -0.015029907 - -0.015655518 - -0.03918457 - -0.016342163 - -0.020858765 - -0.0043907166 - 0.03857422 - 0.007423401 - -0.0473938 - 0.04257202 - -0.043823242 - -0.03842163 - -0.033691406 - -0.010925293 - 0.012260437 - 0.0009822845 - 0.0058937073 - -0.008644104 - -0.031585693 - 0.0055618286 - -0.06976318 - -0.030578613 - -0.038970947 - -0.08880615 - -0.00315094 - 0.00020766258 - 0.04058838 - 0.0028266907 - -0.0018129349 - -0.01625061 - -0.022277832 - -0.008956909 - -0.009292603 - -0.040771484 - -0.008705139 - -0.065979004 - -0.010414124 - -0.0152282715 - 0.033447266 - -0.033599854 - -0.008049011 - -0.020828247 - 0.0053901672 - 0.0002875328 - 0.037078857 - 0.015159607 - -0.0016326904 - 0.012397766 - 0.0026817322 - -0.032196045 - -0.0079422 - 0.03567505 - -0.0010242462 - 0.03652954 - -0.0035171509 - 0.01802063 - 0.026641846 - 0.0107421875 - -0.021942139 - 0.035095215 - -0.0236969 - -0.015975952 - 0.039215088 - 0.0038166046 - 0.020462036 - -0.039764404 - 0.035888672 - -0.038604736 - -0.008621216 - -0.012619019 - -0.014602661 - -0.036102295 - -0.02368164 - -0.0121536255 - -0.0054512024 - -0.015701294 - -0.016296387 - 0.016433716 - -0.005672455 - -0.019332886 - 0.00025129318 - 0.0803833 - 0.04248047 - -0.05960083 - -0.009147644 - -0.0021247864 - 0.012481689 - -0.015129089 - -0.021133423 - -0.01878357 - 0.0027332306 - 0.036956787 - -0.0053253174 - -0.0007238388 - 0.016983032 - -0.0034694672 - 0.059387207 - 0.076660156 - 0.015312195 - -0.015823364 - 0.02456665 - 0.012901306 - 0.020126343 - -0.032440186 - 0.011291504 - -0.001876831 - -0.052215576 - 0.004634857 - 0.036956787 - 0.006164551 - -0.023422241 - -0.025619507 - 0.024261475 - 0.023849487 - 0.015007019 - 0.020050049 - -0.044067383 - 0.030029297 - 0.021377563 - 0.011657715 - 0.017196655 - -0.032318115 - -0.031555176 - -0.00982666 - -0.0039787292 - -0.079589844 - -0.006416321 - 0.00844574 - -0.007434845 - -0.045013428 - -0.02557373 - -0.01537323 - 0.027633667 - -0.076538086 - -0.0025749207 - -0.05279541 - 0.029373169 - 0.047912598 - 0.00083875656 - -0.01234436 - -0.017059326 - 0.01159668 - 0.014228821 - 0.029571533 - -0.055114746 - 0.006389618 - 0.028869629 - 0.09375 - -0.014251709 - 0.029418945 - 0.007633209 - 0.010848999 - -0.004055023 - -0.02116394 - 0.007194519 - -0.0062217712 - -0.01209259 - 0.024749756 - -0.037506104 - -0.029510498 - -0.028442383 - 0.03189087 - 0.0008239746 - 0.007419586 - -0.016723633 - 0.06964111 - -0.07232666 - 0.022201538 - -0.019882202 - -0.0385437 - -0.022567749 - 0.010353088 - -0.027755737 - -0.006713867 - -0.023406982 - -0.025054932 - -0.013076782 - 0.015808105 - -0.0073165894 - 0.02949524 - -0.036499023 - -0.07287598 - -0.01876831 - -0.02709961 - -0.06567383 - 0.050567627 - 0.004047394 - 0.030471802 - 0.025405884 - 0.046783447 - 0.01763916 - 0.053466797 - 0.049072266 - -0.015197754 - 0.0013389587 - 0.049591064 - 0.006965637 - -0.00014233589 - 0.01335907 - -0.04675293 - -0.026733398 - 0.03024292 - 0.0012464523 - -0.037200928 - 0.030166626 - -0.08544922 - -0.013893127 - -0.014823914 - 0.0014219284 - -0.023620605 - -0.0010480881 - -0.072387695 - 0.057922363 - -0.04067993 - -0.025299072 - 0.020446777 - 0.06451416 - 0.007205963 - 0.015838623 - -0.008674622 - 0.0002270937 - -0.026321411 - 0.027130127 - -0.01828003 - -0.011482239 - 0.03463745 - 0.00724411 - -0.010406494 - 0.025268555 - -0.023651123 - 0.04034424 - -0.036834717 - 0.05014038 - -0.026184082 - 0.036376953 - 0.03253174 - -0.01828003 - -0.023376465 - -0.034576416 - -0.00598526 - -0.023239136 - -0.032409668 - 0.07672119 - -0.038604736 - 0.056884766 - -0.012550354 - -0.03778076 - -0.013061523 - 0.017105103 - 0.010482788 - -0.005077362 - -0.010719299 - -0.018661499 - 0.019760132 - 0.022018433 - -0.058746338 - 0.03564453 - -0.0892334 - 0.025421143 - -0.015716553 - 0.07910156 - -0.009361267 - 0.016921997 - 0.048736572 - 0.035247803 - 0.01864624 - 0.011413574 - 0.018295288 - 0.00052690506 - -0.07122803 - -0.01890564 - -0.017669678 - 0.027694702 - 0.0152282715 - 0.006511688 - -0.045837402 - -0.009765625 - 0.013877869 - -0.0146102905 - 0.033294678 - -0.0019874573 - 0.023040771 - 0.025619507 - -0.015823364 - -0.020858765 - -0.023529053 - 0.0070152283 - -0.0647583 - 0.036224365 - 0.0023403168 - -0.062286377 - -0.036315918 - 0.021209717 - -0.037353516 - -0.03656006 - 0.01889038 - 0.023239136 - 0.011764526 - 0.005970001 - 0.049346924 - -0.006893158 - -0.015068054 - -0.0008716583 - -0.0034999847 - 0.04034424 - 0.017913818 - -0.06707764 - -0.07531738 - 0.00042319298 - -0.00680542 - -0.0023174286 - 0.04425049 - -0.05105591 - -0.016967773 - 0.020507812 - 0.038604736 - 0.029846191 - 0.04309082 - -0.00084733963 - -0.008911133 - 0.0082092285 - -0.0050239563 - 0.05038452 - 0.014595032 - 0.015182495 - 0.007247925 - -0.04046631 - -0.011169434 - -0.010292053 - 0.068603516 - 0.02470398 - -0.0023403168 - 0.005996704 - -0.0010709763 - 0.008178711 - -0.029205322 - -0.025253296 - 0.05822754 - 0.04269409 - 0.059295654 - -0.0011911392 - -0.031311035 - 0.023712158 - -0.037506104 - 0.004589081 - 0.014923096 - -0.019866943 - -0.019180298 - -0.0020999908 - -0.008972168 - 0.01348114 - 0.014801025 - -0.02645874 - 0.019897461 - 0.081970215 - -0.05822754 - 0.09399414 - 0.001209259 - -0.050750732 - 0.062316895 - -0.014892578 - -0.019104004 - -0.036987305 - -0.040618896 - -0.008163452 - -0.0035247803 - 0.06774902 - -0.001420021 - -0.0013103485 - -0.031799316 - -0.0023651123 - 0.012298584 - 0.003583908 - 0.050964355 - -0.01802063 - -0.007091522 - 0.01448822 - -0.016159058 - -0.019439697 - -0.022491455 - -0.036346436 - -0.03491211 - -0.0032920837 - 0.003528595 - -0.0016469955 - 0.01612854 - -0.003709793 - 0.012840271 - 0.0043182373 - -0.030456543 - 0.007369995 - 0.0039787292 - 0.036499023 - 0.021362305 - 0.00062942505 - 0.0047073364 - 0.026382446 - -0.0020542145 - -0.038757324 - -0.00095272064 - 0.0019435883 - 0.007232666 - -0.0031471252 - 0.019943237 - -0.062042236 - 0.010826111 - 0.0026607513 - -0.04727173 - 0.020126343 - 0.046417236 - -0.03881836 - 0.011222839 - 0.011428833 - -0.056396484 - 0.010879517 - -0.011772156 - -0.0038414001 - 0.010246277 - -0.020141602 - -0.011169434 - 0.006916046 - -0.022659302 - 0.010299683 - 0.046966553 - 0.0234375 - -0.0016288757 - -0.03262329 - -0.01689148 - -0.00031924248 - 0.028152466 - 0.004234314 - 0.03878784 - -0.03579712 - 0.007457733 - -0.0036907196 - 0.0073051453 - -0.00028276443 - -0.0067100525 - 0.003206253 - -0.0021209717 - -0.05960083 - 0.024337769 - 0.076171875 - -0.012062073 - -0.0032787323 - -0.08380127 - 0.024917603 - 0.019073486 - -0.012031555 - -0.03237915 - -0.0042686462 - -0.01525116 - -0.0158844 - -0.0014514923 - -0.024429321 - -0.028442383 - 0.020843506 - 0.007133484 - 0.024230957 - 0.0002002716 - -0.005466461 - -0.0032367706 - 0.012718201 - 0.032806396 - 0.062042236 - -0.040283203 - -0.025497437 - 0.045013428 - 0.054473877 - -0.033599854 - -0.0039482117 - 0.02268982 - -0.0012645721 - 0.045166016 - 0.0501709 - -0.0022602081 - 0.019897461 - 0.007926941 - 0.017364502 - 0.011650085 - -0.042510986 - -0.059448242 - 0.030014038 - 0.039611816 - 0.015571594 - 0.04031372 - -0.0006723404 - -0.03353882 - -0.05569458 - 0.040283203 - 0.019058228 - -0.032592773 - 0.004470825 - 0.06359863 - 0.029693604 - 0.01826477 - -0.0104522705 - -0.043945312 - -0.01802063 - 0.0075187683 - -0.02456665 - 0.02798462 - 0.0047340393 - -0.017623901 - -0.014335632 - -0.04550171 - -0.0039711 - 0.023864746 - -0.015281677 - 0.055755615 - -0.04864502 - 0.033599854 - 0.024810791 - -0.03048706 - -0.043121338 - 0.011291504 - 0.024932861 - -0.0020275116 - 0.032287598 - -0.0234375 - 0.006942749 - -0.007221222 - -0.03869629 - -0.03765869 - -0.03475952 - -0.046936035 - 0.03012085 - -0.021362305 - -0.023452759 - 0.051239014 - -0.009925842 - 0.04925537 - -0.00944519 - -0.040008545 - -0.019485474 - -0.00022566319 - -0.017028809 - 0.03277588 - 0.0066375732 - -0.013328552 - 0.01864624 - -0.011726379 - 0.023849487 - 0.04006958 - 0.03793335 - 0.060821533 - 0.005504608 - -0.0395813 - -0.010131836 - 0.046539307 - 0.030136108 - 0.002231598 - 0.042236328 - 0.014755249 - 0.047058105 - -0.017318726 - 0.008598328 - 0.01966858 - 0.0064430237 - 0.03616333 - -0.011985779 - -0.003446579 - -0.06616211 - -0.0657959 - 0.014137268 - 0.044677734 - -0.03515625 - -0.05215454 - -0.012710571 - 0.0047416687 - 0.05368042 - 0.013900757 - 0.05001831 - 0.027709961 - 0.02557373 - -0.025512695 - 0.0031032562 - 0.072143555 - 0.018829346 - 0.0073928833 - 0.009269714 - -0.011299133 - 0.0048828125 - 0.014808655 - -0.0184021 - -0.00089359283 - -0.0015716553 - -0.012863159 - 0.0074386597 - -0.020767212 - 0.02204895 - -0.027404785 - -0.021972656 - 0.02494812 - 0.044006348 - -0.011581421 - 0.06298828 - 0.009010315 - 0.03842163 - -0.00005555153 - 0.06774902 - 0.036254883 - -0.016311646 - -0.000004887581 - 0.0057373047 - 0.03704834 - -0.041503906 - 0.0074043274 - -0.012290955 - -0.020263672 - -0.0057792664 - -0.025878906 - -0.021652222 - -0.008079529 - 0.022613525 - -0.012069702 - 0.050079346 - -0.004283905 - -0.021118164 - -0.010559082 - -0.0041160583 - -0.00026345253 - -0.01260376 - 0.050628662 - -0.03137207 - 0.027526855 - -0.052642822 - -0.0046463013 - 0.04937744 - -0.0017156601 - 0.014625549 - -0.022476196 - 0.02571106 - 0.043884277 - -0.016952515 - -0.021011353 - 0.056396484 - 0.056762695 - 0.013473511 - -0.02357483 - 0.043792725 - 0.032470703 - -0.052612305 - -0.017837524 - -0.000067055225 - 0.039276123 - -0.012283325 - -0.0029888153 - -0.024719238 - 0.012870789 - -0.032287598 - 0.028839111 - 0.008056641 - 0.011100769 - -0.034210205 - 0.028198242 - 0.01940918 - 0.029052734 - 0.030303955 - 0.03475952 - -0.03982544 - 0.026870728 - 0.02079773 - 0.03012085 - -0.044281006 - 0.006462097 - -0.008705139 - -0.024734497 - 0.02458191 - -0.050201416 - -0.028778076 - 0.036956787 - 0.025634766 - -0.025650024 - 0.020629883 - -0.04385376 - 0.009536743 - -0.0027256012 - 0.031158447 - 0.008712769 - -0.039855957 - -0.018249512 - -0.011268616 - 0.009689331 - -0.032073975 - 0.023010254 - 0.04925537 - 0.013168335 - 0.02734375 - 0.031707764 - -0.024032593 - -0.010604858 - -0.00258255 - 0.0054092407 - 0.033569336 - 0.0068359375 - 0.019882202 - 0.018096924 - -0.05392456 - -0.0030059814 - -0.01374054 - -0.008483887 - 0.016494751 - -0.015487671 - 0.016143799 - -0.028198242 - -0.016326904 - -0.013160706 - -0.046905518 - 0.026428223 - -0.02420044 - -0.022262573 - 0.041748047 - 0.05557251 - -0.0044059753 - -0.030960083 - -0.023544312 - 0.0103302 - -0.013534546 - -0.016830444 - 0.028167725 - 0.0061950684 - 0.02178955 - -0.06945801 - -0.040039062 - -0.0024642944 - -0.06359863 - -0.020812988 - 0.029006958 - 0.0072364807 - -0.028747559 - -0.057891846 - 0.022155762 - -0.035369873 - -0.025909424 - -0.04095459 - 0.0019893646 - -0.0038146973 - -0.030639648 - -0.038970947 - -0.0026626587 - -0.0047454834 - -0.014816284 - 0.008575439 - -0.032165527 - -0.011062622 - 0.003622055 - -0.0129852295 - -0.0007658005 - -0.009902954 - 0.03704834 - -0.02456665 - 0.020385742 - 0.0019044876 - -0.008552551 - -0.028137207 - -0.006500244 - 0.017227173 - -0.0077285767 - -0.05496216 - 0.038024902 - -0.0335083 - 0.047668457 - -0.02998352 - -0.0395813 - -0.0068359375 - -0.024627686 - -0.005756378 - 0.025863647 - 0.032104492 - -0.029022217 - -0.08685303 - -0.014724731 - -0.035583496 - 0.024002075 - 0.008422852 - 0.012931824 - -0.0055656433 - -0.013748169 - -0.021530151 - -0.034332275 - -0.008766174 - -0.025222778 - 0.019836426 - -0.011619568 - -0.037963867 - 0.013519287 - -0.035736084 - 0.049102783 - -0.011398315 - 0.050598145 - -0.066833496 - 0.080566406 - -0.061553955 - -0.041778564 - 0.01864624 - 0.014907837 - -0.010482788 - 0.035217285 - -0.0473938 - -0.031951904 - 0.052886963 - -0.022109985 - 0.031677246 - -0.01977539 - 0.08282471 - 0.012901306 - -0.009490967 - 0.0030956268 - 0.023895264 - 0.012611389 - -0.0011844635 - -0.007633209 - 0.019195557 - -0.05404663 - 0.006187439 - -0.06762695 - -0.049468994 - 0.028121948 - -0.004032135 - -0.043151855 - 0.028121948 - -0.0058555603 - 0.019454956 - 0.0028438568 - -0.0036354065 - -0.015411377 - -0.026535034 - 0.03704834 - -0.01802063 - 0.009765625 - - 0.04663086 - -0.023239136 - 0.008163452 - -0.03945923 - -0.018051147 - -0.011123657 - 0.0022335052 - -0.0015516281 - -0.002336502 - 0.031799316 - -0.049591064 - -0.049835205 - 0.019317627 - -0.013328552 - -0.01838684 - -0.067871094 - 0.02671814 - 0.038085938 - 0.03265381 - -0.0043907166 - 0.026321411 - 0.0070114136 - -0.037628174 - 0.008026123 - 0.015525818 - 0.066589355 - -0.018005371 - -0.0017309189 - -0.052368164 - -0.055511475 - -0.00504303 - 0.043029785 - -0.013328552 - 0.08581543 - -0.038269043 - 0.051971436 - -0.04675293 - 0.038146973 - 0.05328369 - -0.028762817 - 0.01625061 - -0.008644104 - -0.060150146 - -0.0259552 - -0.05432129 - -0.00680542 - -0.012649536 - 0.0025501251 - 0.060272217 - -0.013168335 - 0.046691895 - 0.030395508 - 0.039733887 - 0.00044679642 - -0.034240723 - 0.01828003 - -0.047546387 - -0.036499023 - 0.024505615 - 0.027374268 - 0.015197754 - -0.003932953 - 0.03475952 - 0.013633728 - 0.020858765 - -0.025344849 - -0.056732178 - 0.008178711 - 0.043304443 - 0.014625549 - -0.0020503998 - -0.033569336 - -0.00178051 - -0.0446167 - -0.045837402 - 0.089538574 - 0.00440979 - 0.03741455 - 0.0015287399 - -0.035339355 - 0.017654419 - -0.008956909 - -0.035064697 - -0.014251709 - 0.008331299 - 0.0077781677 - 0.0020999908 - -0.021636963 - -0.014625549 - -0.0209198 - -0.009429932 - 0.070617676 - 0.013923645 - -0.025558472 - -0.0519104 - -0.0049552917 - 0.000998497 - -0.01448822 - -0.027175903 - -0.04083252 - -0.032043457 - -0.0096588135 - -0.047088623 - -0.0012331009 - -0.025878906 - 0.031799316 - -0.023712158 - 0.015701294 - 0.017730713 - 0.062927246 - 0.009178162 - -0.046295166 - -0.014701843 - -0.007751465 - -0.021148682 - 0.033966064 - -0.013664246 - 0.03945923 - -0.02520752 - 0.08905029 - -0.039520264 - -0.012435913 - -0.057403564 - 0.007068634 - 0.006061554 - -0.040161133 - -0.015548706 - 0.080078125 - 0.08862305 - 0.008003235 - -0.048339844 - 0.037750244 - -0.04498291 - -0.065979004 - -0.032470703 - -0.03225708 - 0.004890442 - -0.013023376 - -0.020965576 - 0.035095215 - 0.035491943 - -0.01486969 - 0.027023315 - 0.009552002 - -0.01285553 - 0.044891357 - 0.00062322617 - -0.030639648 - 0.024108887 - 0.0035648346 - -0.06585693 - -0.011070251 - 0.037506104 - 0.05697632 - -0.027236938 - 0.03475952 - 0.0143585205 - -0.014442444 - -0.011405945 - -0.013648987 - -0.028625488 - 0.024902344 - 0.09387207 - -0.012741089 - -0.040985107 - -0.018814087 - 0.0046920776 - -0.017715454 - 0.013839722 - 0.0022621155 - 0.0024433136 - -0.028366089 - -0.0046310425 - 0.028717041 - -0.00013160706 - 0.006690979 - -0.053863525 - 0.03302002 - 0.040802002 - 0.03201294 - 0.032073975 - -0.03125 - -0.005241394 - 0.048828125 - -0.016204834 - -0.0014667511 - -0.013572693 - 0.007949829 - 0.019744873 - -0.004776001 - -0.0022506714 - 0.033111572 - 0.00039958954 - 0.008369446 - -0.021057129 - -0.033935547 - -0.03692627 - 0.0042762756 - -0.030380249 - -0.01876831 - -0.023529053 - 0.004764557 - 0.026947021 - -0.013267517 - -0.023666382 - 0.0024929047 - -0.017990112 - 0.035217285 - 0.0034389496 - 0.030380249 - 0.02015686 - -0.013061523 - -0.047790527 - 0.042633057 - 0.009559631 - -0.03186035 - -0.02796936 - -0.0151901245 - -0.0039482117 - 0.0345459 - -0.018096924 - 0.012062073 - -0.02180481 - 0.031402588 - 0.041412354 - -0.052459717 - 0.006286621 - -0.033203125 - -0.0013237 - -0.012466431 - -0.041748047 - 0.027313232 - -0.0284729 - -0.05682373 - -0.02809143 - 0.030899048 - 0.023773193 - 0.044677734 - -0.0064353943 - -0.0000064373016 - 0.011512756 - 0.0028190613 - -0.041870117 - -0.028182983 - 0.014595032 - -0.0143966675 - 0.022949219 - -0.004371643 - 0.01461792 - 0.0035171509 - 0.01398468 - -0.04473877 - 0.04232788 - -0.033599854 - -0.000647068 - 0.034606934 - 0.006160736 - -0.014640808 - 0.028137207 - -0.02470398 - 0.0043563843 - 0.00039553642 - -0.039886475 - 0.014251709 - -0.035736084 - -0.021347046 - -0.029663086 - -0.011688232 - -0.038085938 - -0.0034008026 - 0.029144287 - -0.010948181 - -0.024978638 - 0.009468079 - 0.093933105 - 0.014205933 - -0.08569336 - -0.011657715 - 0.02027893 - 0.0063095093 - -0.0035533905 - 0.020446777 - 0.029968262 - -0.002008438 - 0.03253174 - 0.029891968 - 0.019577026 - -0.002922058 - -0.009994507 - 0.029418945 - 0.049987793 - 0.046295166 - -0.0072898865 - 0.019638062 - 0.042816162 - 0.0066108704 - 0.06591797 - 0.04714966 - -0.026062012 - -0.019470215 - 0.009979248 - 0.018081665 - 0.000009059906 - -0.043060303 - -0.0043907166 - 0.064331055 - 0.051605225 - -0.0040893555 - 0.018081665 - -0.024749756 - -0.014915466 - -0.048614502 - 0.023483276 - 0.013282776 - -0.011741638 - -0.036346436 - -0.0076293945 - 0.023086548 - -0.051849365 - 0.023223877 - 0.033721924 - -0.003929138 - -0.044647217 - 0.020019531 - -0.029678345 - -0.0031986237 - 0.030548096 - -0.040161133 - -0.020874023 - 0.028793335 - 0.037872314 - 0.011314392 - -0.030838013 - -0.051818848 - -0.007774353 - 0.0070724487 - 0.02507019 - -0.0112838745 - 0.014930725 - 0.010543823 - 0.085998535 - 0.019332886 - 0.0107803345 - 0.00014901161 - 0.001613617 - -0.024993896 - -0.04940796 - 0.010643005 - 0.04269409 - -0.02571106 - 0.001124382 - -0.018844604 - -0.014953613 - 0.027786255 - 0.033447266 - 0.0038719177 - 0.011268616 - 0.004295349 - 0.028656006 - -0.078063965 - -0.012619019 - -0.03527832 - -0.061279297 - 0.0625 - 0.038116455 - -0.008308411 - -0.017913818 - 0.031311035 - -0.018722534 - 0.0362854 - -0.019363403 - 0.021362305 - -0.0029010773 - -0.030288696 - -0.07293701 - 0.008544922 - 0.006755829 - -0.068237305 - 0.0491333 - 0.016494751 - -0.021621704 - 0.020980835 - 0.026443481 - 0.051879883 - 0.035583496 - 0.030548096 - -0.03366089 - -0.017532349 - 0.066101074 - 0.03930664 - 0.013633728 - -0.008621216 - 0.031982422 - -0.042388916 - -0.00042247772 - -0.020492554 - 0.04006958 - 0.052825928 - -0.0044136047 - -0.02243042 - -0.04260254 - 0.02418518 - -0.020584106 - -0.0027770996 - -0.05908203 - 0.026611328 - -0.046051025 - -0.03451538 - 0.017944336 - 0.054260254 - 0.019348145 - 0.0070114136 - 0.014205933 - -0.019454956 - -0.021514893 - 0.010383606 - 0.050109863 - 0.020584106 - -0.031677246 - -0.048187256 - 0.01449585 - 0.04650879 - 0.025222778 - 0.004135132 - 0.02017212 - 0.044311523 - -0.03427124 - -0.023757935 - 0.03479004 - -0.012031555 - -0.030380249 - -0.021560669 - -0.010375977 - -0.05041504 - -0.060821533 - 0.012283325 - -0.026367188 - 0.061920166 - 0.026367188 - -0.037078857 - -0.015136719 - 0.033355713 - -0.010055542 - 0.025314331 - -0.027893066 - -0.010032654 - 0.017684937 - -0.00002783537 - -0.061157227 - 0.030273438 - -0.103759766 - 0.035583496 - -0.028167725 - 0.07171631 - -0.0211792 - -0.013725281 - 0.04437256 - 0.041137695 - 0.027145386 - 0.032073975 - 0.008926392 - -0.021560669 - 0.007381439 - 0.019165039 - 0.0012969971 - -0.01928711 - 0.026672363 - -0.01222229 - -0.056365967 - 0.010398865 - -0.02255249 - 0.00093221664 - -0.009353638 - 0.016082764 - 0.022872925 - 0.025024414 - -0.024459839 - 0.040618896 - -0.049224854 - -0.0035133362 - -0.047698975 - 0.01727295 - 0.034057617 - -0.004096985 - -0.009361267 - 0.011291504 - -0.010093689 - -0.017990112 - 0.04107666 - -0.058563232 - -0.03387451 - -0.046905518 - 0.015411377 - -0.02003479 - -0.010528564 - -0.01689148 - 0.010391235 - -0.040618896 - 0.029205322 - -0.020492554 - -0.082092285 - 0.0004811287 - 0.043518066 - -0.044830322 - 0.020141602 - -0.02319336 - 0.0024662018 - 0.012825012 - 0.04977417 - 0.06225586 - 0.027801514 - 0.005153656 - 0.04147339 - 0.0011873245 - 0.004486084 - -0.02494812 - 0.061706543 - 0.012184143 - -0.0027637482 - -0.018447876 - -0.008987427 - -0.0362854 - 0.10205078 - 0.026138306 - -0.056549072 - 0.015899658 - 0.04449463 - -0.017837524 - -0.0044898987 - -0.04348755 - 0.06689453 - 0.008728027 - 0.047454834 - 0.03289795 - -0.034851074 - 0.04675293 - -0.058807373 - 0.03164673 - 0.01322937 - -0.06958008 - -0.042816162 - -0.022918701 - -0.019760132 - 0.008293152 - 0.02709961 - -0.05822754 - 0.011459351 - -0.0008597374 - -0.01574707 - 0.027954102 - -0.029785156 - -0.03665161 - 0.017562866 - -0.027297974 - -0.024017334 - -0.0423584 - -0.039245605 - 0.0028457642 - -0.0010719299 - 0.01763916 - 0.009902954 - -0.023849487 - -0.009399414 - -0.016464233 - 0.045074463 - -0.0056762695 - 0.04537964 - -0.04397583 - -0.025817871 - 0.037353516 - -0.018737793 - 0.01084137 - 0.0038528442 - -0.04547119 - -0.024475098 - -0.05545044 - -0.005756378 - 0.008132935 - 0.014541626 - -0.0020751953 - 0.03793335 - -0.004421234 - -0.037261963 - -0.00818634 - 0.026733398 - 0.04776001 - -0.012313843 - 0.0019369125 - -0.0006084442 - 0.01335907 - -0.033813477 - -0.024459839 - 0.046783447 - -0.006389618 - -0.055999756 - -0.059295654 - 0.008743286 - -0.033966064 - 0.022537231 - -0.018722534 - -0.041259766 - 0.040039062 - 0.028747559 - -0.03515625 - 0.0019016266 - 0.041778564 - -0.0046539307 - 0.00014257431 - 0.011451721 - 0.016998291 - 0.00522995 - -0.04837036 - -0.024520874 - 0.025466919 - -0.020706177 - 0.017608643 - 0.062042236 - -0.0039596558 - -0.021911621 - -0.013893127 - -0.0000885129 - 0.00075626373 - 0.03414917 - 0.011314392 - 0.018661499 - -0.009719849 - 0.012748718 - -0.026809692 - -0.01436615 - 0.021469116 - -0.036254883 - 0.00907135 - -0.026016235 - -0.01625061 - 0.030075073 - 0.011817932 - -0.0038528442 - -0.0028858185 - -0.021820068 - 0.037475586 - 0.0115356445 - -0.0077285767 - -0.05328369 - -0.051361084 - 0.040649414 - -0.005958557 - -0.02279663 - 0.01953125 - -0.016937256 - 0.03781128 - -0.0016212463 - 0.015098572 - -0.01626587 - 0.0067443848 - 0.027175903 - 0.011459351 - 0.038513184 - 0.06222534 - -0.0073547363 - -0.010383606 - 0.0017681122 - 0.045043945 - -0.044921875 - -0.0104599 - 0.035858154 - -0.008323669 - 0.0025901794 - 0.021514893 - -0.010971069 - 0.016738892 - 0.0018157959 - -0.0071258545 - -0.029022217 - -0.047027588 - -0.02670288 - 0.029220581 - -0.022750854 - 0.025054932 - -0.008544922 - 0.006164551 - -0.029052734 - -0.031066895 - 0.06304932 - -0.044647217 - -0.017562866 - -0.0068511963 - 0.06604004 - 0.039916992 - -0.007041931 - -0.02772522 - -0.05795288 - -0.022247314 - -0.02810669 - -0.03845215 - 0.045074463 - -0.014060974 - -0.016174316 - 0.046722412 - -0.0006046295 - -0.019500732 - -0.025985718 - 0.032989502 - 0.028366089 - 0.0021324158 - 0.0020503998 - 0.051574707 - 0.009117126 - -0.03112793 - -0.006565094 - 0.019226074 - 0.009971619 - -0.0064735413 - -0.017700195 - 0.0024414062 - -0.0008454323 - -0.04071045 - -0.034820557 - -0.031066895 - -0.044677734 - 0.039398193 - -0.012580872 - -0.06549072 - 0.027130127 - -0.0309906 - 0.023727417 - -0.019760132 - 0.0066490173 - -0.004798889 - 0.009155273 - -0.009902954 - 0.047576904 - 0.005466461 - 0.001537323 - 0.014862061 - -0.0027828217 - -0.0079956055 - 0.043182373 - 0.0051841736 - 0.034484863 - -0.028015137 - -0.012870789 - -0.019714355 - 0.036071777 - 0.015716553 - -0.016860962 - 0.0034122467 - -0.014289856 - 0.039031982 - 0.017730713 - -0.013549805 - 0.046691895 - 0.022094727 - 0.04647827 - 0.008033752 - 0.028747559 - -0.030288696 - -0.018722534 - -0.015113831 - 0.051971436 - -0.040893555 - -0.039978027 - -0.0042266846 - -0.008346558 - 0.059814453 - 0.0011167526 - 0.056030273 - -0.08166504 - -0.059631348 - -0.015731812 - 0.009529114 - 0.025756836 - 0.022232056 - -0.0049819946 - 0.021118164 - -0.020446777 - 0.0032253265 - 0.017105103 - -0.030944824 - 0.010154724 - -0.021881104 - -0.018081665 - 0.029342651 - 0.024047852 - 0.017700195 - -0.02268982 - 0.018356323 - 0.026519775 - 0.032226562 - -0.004711151 - 0.018753052 - 0.007789612 - 0.033172607 - -0.034423828 - 0.035247803 - -0.019729614 - -0.021194458 - 0.0071411133 - -0.014549255 - -0.0073165894 - -0.05596924 - 0.015060425 - -0.014305115 - -0.030090332 - 0.001613617 - -0.026809692 - -0.02571106 - -0.0041275024 - 0.027389526 - -0.0059509277 - 0.0473938 - -0.0002002716 - 0.00037145615 - 0.0031642914 - -0.0044441223 - 0.0023765564 - 0.0121154785 - 0.04260254 - -0.035736084 - 0.019424438 - -0.005558014 - 0.0038166046 - 0.03717041 - -0.0031261444 - 0.0446167 - 0.015098572 - -0.0022087097 - 0.0385437 - 0.024505615 - -0.03353882 - -0.028533936 - 0.06048584 - -0.019332886 - -0.046539307 - 0.007232666 - -0.031585693 - 0.02168274 - 0.0046195984 - -0.041412354 - 0.032592773 - 0.056671143 - 0.031173706 - -0.011398315 - 0.033416748 - 0.01802063 - -0.0259552 - -0.0028705597 - 0.046539307 - -0.040008545 - 0.022567749 - 0.020980835 - 0.024383545 - 0.02861023 - 0.010574341 - -0.008300781 - 0.024261475 - 0.030319214 - -0.011238098 - -0.030197144 - 0.013389587 - 0.010879517 - -0.031311035 - 0.035308838 - -0.014755249 - 0.01612854 - 0.05722046 - -0.019470215 - -0.014045715 - 0.022842407 - -0.085998535 - 0.017166138 - 0.011474609 - 0.018325806 - 0.010398865 - 0.00434494 - -0.013153076 - 0.025482178 - 0.007217407 - -0.0017223358 - 0.041046143 - 0.036895752 - -0.028656006 - -0.008026123 - 0.026550293 - -0.0146102905 - 0.0053215027 - -0.057037354 - 0.008743286 - 0.018066406 - 0.0025310516 - -0.0035171509 - -0.02230835 - -0.018218994 - 0.0069618225 - -0.006111145 - 0.017532349 - 0.034210205 - -0.040496826 - 0.031433105 - -0.006587982 - -0.031097412 - -0.0154418945 - -0.009414673 - 0.006729126 - 0.004711151 - 0.00920105 - 0.0025501251 - -0.0016479492 - -0.0107803345 - -0.070129395 - -0.046203613 - 0.06616211 - -0.019622803 - -0.06298828 - -0.022628784 - 0.04156494 - 0.026672363 - -0.11505127 - -0.080200195 - -0.0491333 - -0.03744507 - -0.0178833 - 0.016326904 - 0.03201294 - -0.013259888 - -0.042114258 - 0.0023727417 - 0.005683899 - -0.027908325 - 0.040039062 - -0.055847168 - -0.03781128 - -0.018753052 - 0.03274536 - 0.0121536255 - 0.04360962 - -0.0110321045 - 0.017913818 - -0.0231781 - -0.018936157 - -0.002658844 - 0.011222839 - -0.0082473755 - -0.0039043427 - 0.011512756 - -0.014328003 - 0.037994385 - -0.020767212 - 0.025314331 - -0.023727417 - 0.030303955 - 0.03302002 - 0.0040512085 - -0.074401855 - 0.027450562 - -0.030838013 - 0.042053223 - -0.04425049 - -0.022613525 - 0.0025463104 - 0.029449463 - -0.0023975372 - 0.03717041 - 0.020751953 - -0.000009357929 - -0.06842041 - -0.045074463 - -0.035980225 - 0.03060913 - 0.00049352646 - -0.0013618469 - 0.018676758 - 0.00070238113 - -0.015472412 - -0.035736084 - -0.008995056 - 0.008773804 - 0.009635925 - 0.023330688 - -0.027008057 - -0.0074501038 - -0.0040893555 - 0.010391235 - -0.030014038 - -0.04119873 - -0.06329346 - 0.049926758 - -0.016952515 - -0.015045166 - -0.0010814667 - 0.020309448 - -0.0034770966 - 0.05996704 - -0.043273926 - -0.035491943 - 0.017654419 - 0.033325195 - -0.015403748 - 0.03942871 - -0.003692627 - -0.008995056 - -0.012290955 - -0.004722595 - 0.010276794 - -0.027023315 - -0.0052871704 - 0.019729614 - 0.026519775 - -0.029541016 - -0.05505371 - 0.007499695 - -0.030639648 - 0.00042963028 - -0.016693115 - 0.03125 - 0.03543091 - 0.010482788 - 0.018081665 - 0.030441284 - 0.030960083 - -0.008422852 - -0.00983429 - 0.047332764 - 0.0023212433 - 0.0052719116 meta: api_version: version: "1" billed_units: input_tokens: 2 response_type: embeddings_floats responses: "200": description: OK content: application/json: schema: oneOf: - $ref: "#/components/schemas/EmbedFloatsResponse" - $ref: "#/components/schemas/EmbedByTypeResponse" discriminator: propertyName: response_type mapping: embeddings_floats: "#/components/schemas/EmbedFloatsResponse" embeddings_by_type: "#/components/schemas/EmbedByTypeResponse" headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: |- This endpoint returns text and image embeddings. An embedding is a list of floating point numbers that captures semantic information about the content that it represents. Embeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](https://docs.cohere.com/docs/semantic-search). requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: texts: type: array x-fern-audiences: - public minItems: 1 maxItems: 96 description: An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality. items: type: string x-fern-audiences: - public writeOnly: true writeOnly: true images: type: array x-fern-audiences: - public minItems: 1 maxItems: 1 description: |- An array of image data URIs for the model to embed. Maximum number of images per call is `1`. The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg` or `image/png` format and has a maximum size of 5MB. items: type: string x-fern-audiences: - public writeOnly: true model: type: string x-fern-audiences: - public description: |- Defaults to embed-english-v2.0 The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID. Available models and corresponding embedding dimensions: * `embed-english-v3.0` 1024 * `embed-multilingual-v3.0` 1024 * `embed-english-light-v3.0` 384 * `embed-multilingual-light-v3.0` 384 * `embed-english-v2.0` 4096 * `embed-english-light-v2.0` 1024 * `embed-multilingual-v2.0` 768 writeOnly: true input_type: x-fern-audiences: - public $ref: "#/components/schemas/EmbedInputType" embedding_types: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/EmbeddingType" description: |- Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types. * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models. * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models. * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models. * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models. * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. writeOnly: true truncate: type: string x-fern-audiences: - public default: END enum: - NONE - START - END description: |- One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length. Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model. If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned. writeOnly: true description: "" /v2/embed: post: x-fern-audiences: - v2-beta x-fern-sdk-group-name: v2 x-fern-sdk-method-name: embed summary: Embed operationId: embedv2 parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Images code: > package main import ( "context" "encoding/base64" "fmt" "io" "log" "net/http" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { // Fetch the image resp, err := http.Get("https://cohere.com/favicon-32x32.png") if err != nil { log.Println("Error fetching the image:", err) return } defer resp.Body.Close() // Read the image content buffer, err := io.ReadAll(resp.Body) if err != nil { log.Println("Error reading the image content:", err) return } stringifiedBuffer := base64.StdEncoding.EncodeToString(buffer) contentType := resp.Header.Get("Content-Type") imageBase64 := fmt.Sprintf("data:%s;base64,%s", contentType, stringifiedBuffer) co := client.NewClient() embed, err := co.V2.Embed( context.TODO(), &cohere.V2EmbedRequest{ Images: []string{imageBase64}, Model: "embed-english-v3.0", InputType: cohere.EmbedInputTypeImage, EmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat}, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", embed) } - sdk: typescript name: Images code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const image = await fetch('https://cohere.com/favicon-32x32.png'); const buffer = await image.arrayBuffer(); const stringifiedBuffer = Buffer.from(buffer).toString('base64'); const contentType = image.headers.get('content-type'); const imageBase64 = `data:${contentType};base64,${stringifiedBuffer}`; const embed = await cohere.v2.embed({ model: 'embed-english-v3.0', inputType: 'image', embeddingTypes: ['float'], images: [imageBase64], }); console.log(embed); })(); - sdk: python name: Images code: > import cohere import requests import base64 co = cohere.ClientV2() image = requests.get("https://cohere.com/favicon-32x32.png") stringified_buffer = base64.b64encode(image.content).decode("utf-8") content_type = image.headers["Content-Type"] image_base64 = f"data:{content_type};base64,{stringified_buffer}" response = co.embed( model="embed-english-v3.0", input_type="image", embedding_types=["float"], images=[image_base64], ) print(response) - sdk: java name: Images code: > package embedv2post; /* (C)2024 */ import java.io.InputStream; import java.net.HttpURLConnection; import java.net.URI; import java.net.URL; import java.util.Base64; import java.util.List; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2EmbedRequest; import com.cohere.api.types.EmbedByTypeResponse; import com.cohere.api.types.EmbedInputType; import com.cohere.api.types.EmbeddingType; public class EmbedImagePost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); URL url = URI.toUrl( "https://cohere.com/favicon-32x32.png"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.connect(); InputStream inputStream = connection.getInputStream(); byte[] buffer = inputStream.readAllBytes(); inputStream.close(); String imageBase64 = String.format( "data:%s;base64,%s", connection.getHeaderField("Content-Type"), Base64.getEncoder().encodeToString(buffer)); EmbedByTypeResponse response = cohere .v2() .embed( V2EmbedRequest.builder() .model("embed-english-v3.0") .inputType(EmbedInputType.IMAGE) .images(List.of(imageBase64)) .embeddingTypes(List.of(EmbeddingType.FLOAT)) .build()); System.out.println(response); } } - sdk: curl name: Images code: >- curl --request POST \ --url https://api.cohere.com/v2/embed \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "embed-english-v3.0", "input_type": "image", "embedding_types": ["float"], "images": ["data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAQEBAQEBAQEBAQGBgUGBggHBwcHCAwJCQkJCQwTDA4MDA4MExEUEA8QFBEeFxUVFx4iHRsdIiolJSo0MjRERFwBBAQEBAQEBAQEBAYGBQYGCAcHBwcIDAkJCQkJDBMMDgwMDgwTERQQDxAUER4XFRUXHiIdGx0iKiUlKjQyNEREXP/CABEIAZABkAMBIgACEQEDEQH/xAAdAAEAAQQDAQAAAAAAAAAAAAAABwEFBggCAwQJ/9oACAEBAAAAAN/gAAAAAAAAAAAAAAAAAAAAAAAAAAHTg9j6agAAp23/ADjsAAAPFrlAUYeagAAArdZ12uzcAAKax6jWUAAAAO/bna+oAC1aBxAAAAAAbM7rVABYvnRgYAAAAAbwbIABw+cMYAAAAAAvH1CuwA091RAAAAAAbpbPAGJfMXzAAAAAAJk+hdQGlmsQAAAAABk31JqBx+V1iAAAAAALp9W6gRp826AAAAAAGS/UqoGuGjwAAAAAAl76I1A1K1EAAAAAAG5G1ADUHU0AAAAAAu/1Cu4DVbTgAAAAAA3n2JAIG0IAAAAAArt3toAMV+XfEAAAAAL1uzPlQBT5qR2AAAAAenZDbm/AAa06SgAAAAerYra/LQADp+YmIAAAAC77J7Q5KAACIPnjwAAAAzbZzY24gAAGq+m4AAA7Zo2cmaoAAANWdOOAAAMl2N2Tys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qfHMIt10pb+H0DBjyGdYr03XRaLCojnw1sg/6FTTSzyPNNIXkc5szHMnYhuJIDmh3doPCo7+F9z5oaE0R4SrzrWR/cXnWsj+4vOtZH9xeYrWx/cXmKe6gTjID6b6lxAnMQrl5mmYsSzEkn92//2Q=="] }' request: model: embed-english-v3.0 input_type: image embedding_types: - float images: - data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD//gAfQ29tcHJlc3NlZCBieSBqcGVnLXJlY29tcHJlc3P/2wCEAAQEBAQEBAQEBAQGBgUGBggHBwcHCAwJCQkJCQwTDA4MDA4MExEUEA8QFBEeFxUVFx4iHRsdIiolJSo0MjRERFwBBAQEBAQEBAQEBAYGBQYGCAcHBwcIDAkJCQkJDBMMDgwMDgwTERQQDxAUER4XFRUXHiIdGx0iKiUlKjQyNEREXP/CABEIAZABkAMBIgACEQEDEQH/xAAdAAEAAQQDAQAAAAAAAAAAAAAABwEFBggCAwQJ/9oACAEBAAAAAN/gAAAAAAAAAAAAAAAAAAAAAAAAAAHTg9j6agAAp23/ADjsAAAPFrlAUYeagAAArdZ12uzcAAKax6jWUAAAAO/bna+oAC1aBxAAAAAAbM7rVABYvnRgYAAAAAbwbIABw+cMYAAAAAAvH1CuwA091RAAAAAAbpbPAGJfMXzAAAAAAJk+hdQGlmsQAAAAABk31JqBx+V1iAAAAAALp9W6gRp826AAAAAAGS/UqoGuGjwAAAAAAl76I1A1K1EAAAAAAG5G1ADUHU0AAAAAAu/1Cu4DVbTgAAAAAA3n2JAIG0IAAAAAArt3toAMV+XfEAAAAAL1uzPlQBT5qR2AAAAAenZDbm/AAa06SgAAAAerYra/LQADp+YmIAAAAC77J7Q5KAACIPnjwAAAAzbZzY24gAAGq+m4AAA7Zo2cmaoAAANWdOOAAAMl2N2TysAAAApEOj2HgAOyYtl5w5jw4zZPJyuGQ5H2AAAdes+suDUAVyfYbZTLajG8HxjgD153n3IAABH8QxxiVo4XPKpGlyTKjowvCbUAF4mD3AAACgqCzYPiPQ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Ke6gTjID6b6lxAnMQrl5mmYsSzEkn92//2Q== response: body: id: 5807ee2e-0cda-445a-9ec8-864c60a06606 texts: [] images: - width: 400 height: 400 format: jpeg bit_depth: 24 embeddings: float: - - -0.007247925 - -0.041229248 - -0.023223877 - -0.08392334 - -0.03378296 - -0.008308411 - -0.049926758 - 0.041625977 - 0.043151855 - 0.03652954 - -0.05154419 - 0.011787415 - -0.02784729 - -0.024230957 - -0.018295288 - -0.0440979 - 0.032928467 - -0.015007019 - 0.009315491 - -0.028213501 - -0.00022602081 - -0.0074157715 - -0.000975132 - 0.05783081 - 0.029510498 - 0.024871826 - -0.009422302 - -0.028701782 - -0.021118164 - -0.019088745 - -0.0038433075 - 0.04083252 - 0.03024292 - -0.010154724 - -0.008163452 - 0.04269409 - 0.017471313 - -0.010017395 - 0.006629944 - 0.011047363 - 0.013542175 - -0.007926941 - -0.024932861 - -0.05960083 - -0.05404663 - 0.037384033 - -0.049621582 - -0.024002075 - 0.040039062 - 0.02645874 - 0.010261536 - -0.028244019 - 0.016479492 - 0.014266968 - -0.043823242 - -0.022262573 - -0.0057678223 - -0.04800415 - 0.041015625 - 0.01537323 - -0.021530151 - -0.014663696 - 0.051849365 - -0.025558472 - 0.045776367 - -0.025665283 - -0.005821228 - 0.02973938 - 0.053131104 - 0.020706177 - -0.004600525 - 0.0046920776 - 0.02558899 - -0.05319214 - -0.058013916 - 0.080444336 - -0.00068187714 - 0.031311035 - 0.032440186 - -0.051086426 - -0.003534317 - 0.046325684 - -0.032440186 - -0.03894043 - -0.0071907043 - -0.004627228 - -0.01826477 - -0.027755737 - 0.040802002 - 0.019363403 - -0.009727478 - 0.0064468384 - 0.056488037 - 0.018585205 - -0.017974854 - -0.08514404 - 5.0604343e-5 - -0.014839172 - 0.01586914 - 0.00017666817 - 0.02267456 - -0.05105591 - 0.007785797 - -0.02684021 - 0.0064849854 - 0.014411926 - 0.0013427734 - -0.012611389 - 0.043701172 - 0.012290955 - -0.030731201 - 0.034729004 - 0.015289307 - -0.037475586 - -0.030838013 - 0.010009766 - -0.028244019 - 0.051635742 - 0.01725769 - 0.013977051 - 0.008102417 - 0.028121948 - 0.02079773 - 0.0027256012 - 0.009185791 - 0.0016012192 - -0.038116455 - -0.008331299 - -0.028076172 - 0.018463135 - -0.02154541 - 0.021240234 - 0.023376465 - 0.02961731 - -0.028305054 - -0.023101807 - -0.010681152 - -0.0072021484 - -0.04321289 - 0.0058517456 - 0.030792236 - -0.021102905 - 0.050933838 - 0.0060157776 - 0.0128479 - 0.025146484 - -0.006099701 - 0.023345947 - 0.023971558 - 0.015510559 - -0.009895325 - -0.04071045 - 0.049835205 - 0.0053100586 - -0.028930664 - 0.017578125 - -0.0048217773 - -0.0042762756 - -0.034240723 - -0.03253174 - 0.035827637 - 0.01574707 - 0.034851074 - 0.070129395 - 0.011749268 - -0.009223938 - 0.02470398 - -0.005115509 - 0.016723633 - 0.04937744 - -0.032928467 - 0.031280518 - -0.00023400784 - 0.010169983 - -0.01071167 - 0.010520935 - 0.022338867 - -0.0259552 - 0.044769287 - 0.0070610046 - -0.012451172 - -0.04156494 - 0.047088623 - -0.017578125 - 0.012741089 - -0.016479492 - 0.0023078918 - -0.008331299 - 0.021591187 - 0.01473999 - -0.018081665 - 0.033081055 - -0.057556152 - 0.008621216 - 0.013954163 - -0.009742737 - -0.015548706 - 0.015281677 - -0.005958557 - 0.0065307617 - 0.01979065 - 0.041778564 - -0.02684021 - 0.027709961 - -0.07672119 - 0.023406982 - -0.037902832 - 0.035339355 - -0.021881104 - 0.056732178 - 0.03466797 - 0.0059318542 - -0.058654785 - 0.025375366 - 0.015029907 - 0.002380371 - -0.024230957 - 0.014541626 - -0.006641388 - -0.01864624 - 0.012290955 - 0.0007929802 - -0.009277344 - 0.04953003 - -0.004081726 - 0.0029258728 - -0.017181396 - 0.0074920654 - -0.0001707077 - 0.04220581 - 0.008972168 - -0.0071525574 - 0.0015583038 - 0.034362793 - -0.019058228 - 0.013626099 - 0.022613525 - -0.0061149597 - 0.017669678 - 0.015586853 - 0.034973145 - 0.02217102 - -0.045013428 - -0.009864807 - 0.07244873 - 0.010177612 - 0.029724121 - -0.018829346 - -0.034057617 - -0.018859863 - 0.059936523 - -0.0076408386 - 0.021331787 - -0.013786316 - 0.015281677 - 0.016235352 - -0.039855957 - -0.02748108 - -0.033416748 - 0.016174316 - 0.026489258 - 0.0049095154 - -0.026000977 - 0.00831604 - -0.019851685 - -0.021408081 - 0.023010254 - 0.030075073 - 0.0335083 - -0.05493164 - 0.019515991 - -0.020401001 - -0.0061073303 - 0.018997192 - 0.020126343 - -0.027740479 - -0.038116455 - 0.0052948 - -0.008613586 - -0.016494751 - -0.001247406 - 0.022644043 - 0.008300781 - -0.02104187 - 0.016693115 - -0.0032901764 - 0.012046814 - -0.023468018 - -0.007259369 - 0.031234741 - 0.06604004 - 0.051635742 - 0.0009441376 - -0.006084442 - 0.025619507 - -0.006881714 - 0.02999878 - 0.050964355 - 0.017715454 - -0.024856567 - -0.010070801 - 0.05319214 - -0.03652954 - 0.011810303 - -0.011978149 - 0.013046265 - -0.016662598 - 0.017166138 - -0.005542755 - -0.07989502 - 0.029220581 - 0.056488037 - 0.015914917 - -0.011184692 - -0.018203735 - -0.03894043 - -0.026626587 - 0.0010070801 - -0.07397461 - -0.060333252 - 0.046020508 - -0.017440796 - -0.020385742 - -0.0211792 - -0.018295288 - -0.01802063 - 0.003211975 - -0.012969971 - -0.034576416 - -0.022079468 - 0.034606934 - -0.022079468 - -0.02154541 - -0.0039367676 - 0.015419006 - -0.027023315 - 0.024642944 - -0.0007047653 - -0.008293152 - 0.02708435 - 0.05267334 - 0.010177612 - 0.017822266 - -0.021759033 - -0.051116943 - -0.02583313 - -0.06427002 - 0.03213501 - -0.009635925 - -0.04547119 - 0.018997192 - -0.024032593 - -0.011024475 - 0.033935547 - 0.050842285 - 0.011009216 - -0.002527237 - 0.04852295 - 0.038360596 - -0.035583496 - -0.021377563 - -0.016052246 - -0.072143555 - 0.03665161 - 0.02897644 - -0.03842163 - -0.00068187714 - 0.022415161 - -0.0030879974 - 0.043762207 - 0.05392456 - -0.0362854 - -0.04647827 - -0.034057617 - -0.040374756 - -0.03942871 - 0.030761719 - -0.068115234 - 0.011329651 - 0.011413574 - -0.012435913 - 0.01576233 - 0.022766113 - 0.05609131 - 0.07092285 - 0.017593384 - 0.024337769 - 0.027923584 - 0.06994629 - 0.00655365 - -0.020248413 - -0.03945923 - -0.0491333 - -0.049194336 - 0.020050049 - 0.010910034 - 0.013511658 - 0.01676941 - -0.041900635 - -0.046142578 - 0.012268066 - 0.026748657 - -0.036499023 - 0.021713257 - -0.036590576 - 0.014411926 - 0.029174805 - -0.029388428 - 0.04119873 - 0.04852295 - 0.007068634 - -0.00090408325 - 0.0048332214 - -0.015777588 - -0.01499939 - -0.0068206787 - -0.02708435 - 0.010543823 - 0.004085541 - -0.026901245 - -0.0045661926 - 0.0061912537 - -0.0014343262 - 0.028945923 - -0.03552246 - 0.030441284 - -0.029281616 - 0.050628662 - -0.033599854 - -0.085510254 - -0.052520752 - -0.07507324 - -0.008003235 - -0.026382446 - -0.078063965 - -0.025161743 - -0.025421143 - -0.0073165894 - 0.01889038 - -0.05999756 - -0.0051612854 - 0.0072517395 - -0.011497498 - 0.01687622 - 0.002231598 - -0.034423828 - -0.0013084412 - -0.012413025 - 0.008888245 - 0.017486572 - -0.03353882 - 0.0069885254 - -0.02722168 - 0.02015686 - -0.04510498 - -0.038726807 - -0.0031356812 - 0.033233643 - 0.025268555 - -0.015106201 - 0.02407837 - -0.00024700165 - -0.07409668 - -0.012367249 - 0.014785767 - -0.04486084 - 0.074401855 - -0.020690918 - -0.025222778 - 0.029083252 - -0.018997192 - 0.0017557144 - 0.03857422 - -0.020111084 - 0.03338623 - -0.028213501 - 0.0063705444 - -0.010124207 - -0.03112793 - -0.03286743 - 0.0046043396 - -0.0052223206 - 0.00023317337 - 0.0423584 - 0.028030396 - 0.0005788803 - -0.02708435 - 0.006324768 - 0.019821167 - -0.0042686462 - -0.026428223 - -0.02293396 - 0.036590576 - -0.023376465 - -0.022537231 - 0.032226562 - -0.020629883 - 0.017929077 - 0.0440979 - -0.014038086 - -0.022216797 - 0.020446777 - -0.05496216 - -0.018859863 - -0.039855957 - 0.008300781 - 0.07281494 - 0.018295288 - 0.042114258 - 0.005519867 - 0.017990112 - -0.008773804 - 0.011123657 - -0.008239746 - -0.045532227 - 0.026153564 - -0.015853882 - 0.027557373 - -0.049041748 - -0.0022945404 - -0.009399414 - -0.045898438 - 0.05053711 - 0.038513184 - -0.031799316 - 0.012329102 - 0.024871826 - 0.04348755 - -0.04788208 - 0.01423645 - 0.021240234 - 0.05493164 - 0.008956909 - -0.056243896 - 0.032043457 - -0.01574707 - -0.01285553 - -0.009498596 - -0.018951416 - -0.029556274 - 0.0069274902 - -0.032348633 - -0.022445679 - -0.00093603134 - -0.015808105 - -0.027175903 - 0.014091492 - 0.025665283 - -0.023468018 - -0.03250122 - -0.0004544258 - 0.042633057 - -0.06036377 - -0.039611816 - -0.042938232 - -0.02418518 - -0.0703125 - 0.045135498 - -0.001036644 - -0.017913818 - -0.004043579 - 0.0138549805 - -0.02532959 - 0.010765076 - 0.021575928 - 0.013114929 - 0.033935547 - -0.010574341 - 0.017990112 - -0.026107788 - -0.029144287 - -0.046569824 - -0.0030517578 - -0.022994995 - -0.017471313 - -0.0070495605 - -9.846687e-5 - 0.029281616 - 0.017440796 - 0.045532227 - 0.025650024 - 0.0491333 - -0.013145447 - 0.070129395 - -0.0051879883 - -0.04043579 - 0.023864746 - 0.016830444 - -0.014152527 - -0.06359863 - -0.005065918 - -0.009880066 - -0.0034618378 - -0.081726074 - -0.0289917 - -0.007461548 - -0.0013504028 - 0.020523071 - 0.0076446533 - -0.011650085 - 0.014549255 - 0.010955811 - 0.02180481 - -0.027572632 - -0.012252808 - 0.009033203 - -0.0048980713 - 0.031173706 - -0.020309448 - 0.022979736 - -0.013900757 - -0.004108429 - 0.018325806 - -0.031402588 - 0.01737976 - 0.03201294 - -0.02508545 - -0.015625 - -0.04626465 - -0.014656067 - 0.016036987 - -0.030639648 - 0.041748047 - -0.0032978058 - -0.03277588 - 0.037719727 - 0.023788452 - -0.008140564 - -0.041809082 - 0.034698486 - -0.022994995 - -0.009979248 - -0.03729248 - -0.0904541 - 0.00028443336 - 0.080566406 - -0.035125732 - -0.054229736 - -0.017700195 - 0.060668945 - 0.008979797 - 0.015052795 - -0.0072364807 - -0.001490593 - 0.0065231323 - -0.014579773 - 0.016067505 - -0.020339966 - -0.020217896 - 0.02909851 - 0.050628662 - 0.04510498 - -0.01979065 - 0.008918762 - 0.031799316 - 0.031951904 - -0.016906738 - 0.031036377 - 0.0040664673 - -0.046905518 - -0.04928589 - 0.044403076 - -0.0524292 - -0.012832642 - 0.049835205 - 0.0040283203 - -0.012649536 - 0.06878662 - -0.02859497 - -0.014137268 - 0.0036144257 - -0.06262207 - 0.046813965 - 0.024978638 - 0.0017976761 - -0.032409668 - -0.004108429 - -0.013557434 - -0.07196045 - 0.026733398 - 0.0024261475 - -0.022735596 - -0.0022182465 - -0.0064315796 - -0.03652954 - 0.04135132 - -0.032562256 - 0.004524231 - 0.020019531 - -0.0113220215 - -0.071777344 - -0.03451538 - 0.0022583008 - -0.06512451 - -0.005317688 - 0.020248413 - -0.036712646 - 0.005809784 - -0.018951416 - -0.0026855469 - 0.027572632 - -0.00036668777 - 0.0073623657 - -0.018829346 - 0.009101868 - 0.051971436 - 0.023132324 - -0.022537231 - 0.00932312 - 0.00944519 - 0.014183044 - 0.020889282 - 0.0032844543 - -0.0073776245 - -0.05807495 - -0.032440186 - 0.033996582 - 0.0423584 - 0.014259338 - 0.061676025 - -0.02154541 - -0.031982422 - 0.005493164 - -0.01512146 - 0.023101807 - -0.011383057 - -0.059539795 - 0.021820068 - 0.015487671 - -0.004875183 - -0.015640259 - 0.015319824 - -0.0054359436 - -0.026229858 - 0.0061454773 - -0.032348633 - 0.038513184 - 0.004840851 - -0.016021729 - -0.017608643 - -0.019577026 - -0.009178162 - 0.045013428 - -0.01007843 - 0.022323608 - 0.034179688 - 0.00566864 - 0.055511475 - -0.033355713 - -0.019317627 - -8.481741e-5 - 0.017547607 - -0.053344727 - 0.012229919 - 0.022384644 - 0.018051147 - 0.010734558 - 0.004501343 - -0.05911255 - -0.0030918121 - -0.0513916 - -0.0050086975 - -0.01600647 - 0.05343628 - -0.0008234978 - 0.07293701 - -0.056610107 - -0.06549072 - -0.01776123 - -0.0022678375 - 0.023239136 - 0.01020813 - -0.005153656 - -0.00630188 - -0.009880066 - 0.022109985 - 0.033203125 - -0.03567505 - -0.014129639 - 0.015625 - 0.022888184 - -0.038726807 - -0.026321411 - -0.007259369 - 0.005924225 - 0.0010814667 - 0.06665039 - -0.008880615 - 0.053771973 - 0.062194824 - 0.018981934 - 0.022338867 - 0.01361084 - 0.025604248 - 0.022109985 - 0.0044288635 - -0.008331299 - -0.0019416809 - 0.006454468 - -0.045013428 - -0.02519226 - -0.012268066 - -0.032165527 - 7.2181225e-5 - -0.021575928 - -0.006324768 - 0.029785156 - 0.0063438416 - -0.01210022 - 0.029403687 - 0.00592041 - 0.008369446 - 0.00818634 - -0.04498291 - -0.041809082 - 0.0078086853 - -0.05935669 - -0.043518066 - 0.007270813 - 0.060424805 - 0.033996582 - 0.055908203 - 0.013755798 - 0.03982544 - 0.014640808 - -0.01373291 - 0.033325195 - -0.0047073364 - 0.015899658 - -0.00043344498 - 0.022338867 - -0.007095337 - 0.02949524 - 0.042633057 - 0.030670166 - 0.022415161 - -0.0033683777 - 0.018814087 - -0.013031006 - 0.031951904 - 0.022094727 - -0.009986877 - 0.025665283 - -0.0138168335 - 0.049743652 - 0.024307251 - 0.0088272095 - -0.03479004 - 0.07318115 - 0.009849548 - 0.051635742 - -0.05331421 - -0.053131104 - -0.0044898987 - 0.029342651 - 0.005596161 - 0.044189453 - -0.042388916 - -0.012939453 - -0.0007529259 - -0.06088257 - 0.036010742 - -0.02355957 - 0.004497528 - -0.0023822784 - -0.053588867 - -0.04168701 - -0.017868042 - -0.01927185 - -0.06011963 - 0.028884888 - 0.061401367 - -0.005584717 - 0.014823914 - -0.02255249 - 4.631281e-5 - 0.039031982 - -0.0055389404 - 0.007194519 - 0.0037631989 - 0.008834839 - 0.018692017 - 0.033111572 - -0.056274414 - -0.021774292 - 0.04727173 - -0.03265381 - 0.022140503 - 0.027801514 - 0.004043579 - -0.016525269 - -0.041809082 - 0.024520874 - 0.008529663 - 0.049072266 - 0.033447266 - -0.028839111 - 0.048675537 - 0.021453857 - -0.08087158 - 0.034606934 - -0.002910614 - 0.012176514 - 0.035705566 - 0.040161133 - -0.02355957 - -0.01626587 - -0.033721924 - -0.013893127 - -0.04156494 - 0.06719971 - 0.043151855 - -0.033813477 - 0.028045654 - 0.0029525757 - -0.022033691 - -0.093811035 - -0.0056114197 - 0.00026154518 - 0.058746338 - -0.05065918 - 0.02897644 - -0.01550293 - -0.02947998 - -0.018249512 - 0.034942627 - -0.04574585 - -0.037109375 - -0.006160736 - 0.006149292 - -0.0012207031 - -0.042907715 - -0.016448975 - 0.0052719116 - 0.036590576 - -0.045318604 - -0.04220581 - -0.018859863 - -0.031021118 - 0.06439209 - -0.0056533813 - -0.037200928 - -0.026550293 - 0.027786255 - -0.028427124 - 0.09161377 - -0.0088272095 - -0.003643036 - -0.053253174 - -0.01826477 - -0.016540527 - -0.012535095 - -0.03942871 - -0.0049095154 - 0.031311035 - 0.049468994 - -0.066589355 - -0.05029297 - 7.5519085e-5 - -0.0017404556 - -0.013214111 - -0.03756714 - -0.009147644 - -0.025466919 - 0.026672363 - 0.020965576 - -0.0073432922 - 0.0011005402 - -0.04937744 - -0.018463135 - 0.00274086 - -0.013252258 - 0.0126953125 - -0.077697754 - 0.014045715 - 0.00039935112 - -0.019515991 - -0.0027618408 - -0.011672974 - -0.043884277 - 0.009231567 - 0.062805176 - -0.0137786865 - -0.026229858 - -0.034362793 - -0.015090942 - 0.016937256 - 0.030639648 - -0.02420044 - 0.02482605 - -0.0033740997 - 0.046417236 - -0.012008667 - -0.04031372 - -0.00032520294 - 0.01525116 - -0.0066375732 - 0.0062713623 - -0.01171875 - -0.027191162 - -0.014137268 - -0.025390625 - 0.002111435 - -0.06561279 - 0.031555176 - -0.07519531 - -0.04547119 - 0.014472961 - -0.0158844 - -0.091552734 - -0.03366089 - 0.050323486 - -0.0013589859 - -0.033203125 - 0.046539307 - -0.030288696 - 0.0046195984 - 0.049835205 - 0.02003479 - -0.004196167 - 0.013168335 - -0.016403198 - 0.01676941 - -0.00340271 meta: api_version: version: '2' billed_units: images: 1 - code-samples: - sdk: go name: Texts code: > package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.V2.Embed( context.TODO(), &cohere.V2EmbedRequest{ Texts: []string{"hello", "goodbye"}, Model: "embed-english-v3.0", InputType: cohere.EmbedInputTypeSearchDocument, EmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat}, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Texts code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const embed = await cohere.v2.embed({ texts: ['hello', 'goodbye'], model: 'embed-english-v3.0', inputType: 'classification', embeddingTypes: ['float'], }); console.log(embed); })(); - sdk: python name: Texts code: | import cohere co = cohere.ClientV2() response = co.embed( texts=["hello", "goodbye"], model="embed-english-v3.0", input_type="classification", embedding_types=["float"], ) print(response) - sdk: python name: Texts (async) code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.embed( texts=["hello", "goodbye"], model="embed-english-v3.0", input_type="classification", ) print(response) asyncio.run(main()) - sdk: java name: Texts code: > package embedv2post; /* (C)2024 */ import java.util.List; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2EmbedRequest; import com.cohere.api.types.EmbedByTypeResponse; import com.cohere.api.types.EmbedInputType; public class EmbedPost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); EmbedByTypeResponse response = cohere .v2() .embed( V2EmbedRequest.builder() .model("embed-english-v3.0") .texts(List.of("hello", "goodbye")) .inputType(EmbedInputType.CLASSIFICATION) .build()); System.out.println(response); } } - sdk: curl name: Texts code: |- curl --request POST \ --url https://api.cohere.com/v2/embed \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "embed-english-v3.0", "texts": ["hello", "goodbye"], "input_type": "classification", "embedding_types": ["float"] }' request: texts: - hello - goodbye model: embed-english-v3.0 input_type: classification embedding_types: - float response: body: id: da6e531f-54c6-4a73-bf92-f60566d8d753 texts: - hello - goodbye embeddings: float: - - 0.016296387 - -0.008354187 - -0.04699707 - -0.07104492 - 0.00013196468 - -0.014892578 - -0.018661499 - 0.019134521 - 0.008476257 - 0.04159546 - -0.036895752 - -0.00048303604 - 0.06414795 - -0.036346436 - 0.045806885 - -0.03125 - 0.03793335 - 0.048583984 - 0.0062179565 - 0.0071144104 - -0.020935059 - 0.04196167 - -0.039398193 - 0.03463745 - 0.051879883 - 0.030838013 - -0.0048103333 - -0.00036287308 - -0.017944336 - -0.039611816 - 0.013389587 - 0.0044021606 - 0.018951416 - 0.020767212 - -0.0025997162 - 0.0904541 - -0.0121154785 - -0.026184082 - 0.012413025 - 0.004119873 - 0.030654907 - -0.030792236 - -0.041107178 - -0.02368164 - -0.043304443 - -0.00077438354 - -0.017074585 - -0.019729614 - 0.078125 - -0.031585693 - 0.020217896 - -0.01524353 - 0.017471313 - -0.0008010864 - -0.03717041 - 0.011062622 - -0.072143555 - -0.013175964 - 0.01058197 - 0.030853271 - 0.044799805 - 0.0045928955 - 0.03253174 - 0.047698975 - -0.0039024353 - -0.01965332 - 0.024475098 - -0.013755798 - 0.018951416 - -0.015487671 - 0.015594482 - 0.00096321106 - -0.006450653 - -0.04748535 - -0.021972656 - 0.06323242 - -0.009498596 - 0.014297485 - 0.0038471222 - -0.023117065 - -0.02180481 - -0.01928711 - -0.08758545 - -0.04852295 - 0.029510498 - 0.011276245 - -0.013504028 - -0.009391785 - -0.0064468384 - 0.010978699 - -0.014404297 - 0.053741455 - 0.046569824 - 0.00042700768 - -0.037719727 - 0.011985779 - -0.009643555 - 0.0067749023 - 0.008071899 - 0.018829346 - -0.05419922 - -0.020950317 - -0.02659607 - -0.028869629 - -0.015716553 - 0.022705078 - -0.0046958923 - 0.02192688 - 0.032440186 - 0.048034668 - -0.006843567 - 0.045074463 - -0.02293396 - 0.010238647 - -0.04534912 - 0.01638794 - -0.00680542 - 0.0038871765 - -0.032836914 - 0.051361084 - 0.0395813 - 0.032928467 - -0.00843811 - 0.007858276 - -0.040802002 - -0.008346558 - -0.013252258 - -0.046173096 - 0.051727295 - -0.027175903 - -0.011497498 - 0.04940796 - -0.095214844 - -0.0345459 - -0.021453857 - 0.0051002502 - -0.01725769 - -0.045196533 - -0.0016956329 - 0.021575928 - 0.07720947 - -0.00094270706 - 0.020904541 - 0.05001831 - -0.033111572 - 0.032287598 - -0.0052833557 - -7.402897e-5 - 0.035125732 - 0.019424438 - -0.06665039 - -0.02557373 - 0.010887146 - 0.05807495 - 0.015022278 - 0.0657959 - -0.015350342 - 0.008468628 - -0.017944336 - 0.029388428 - -0.005126953 - 0.015914917 - 0.051879883 - -0.015975952 - -0.039031982 - -0.012374878 - 0.0032424927 - 0.0008568764 - 0.014579773 - 0.021530151 - -0.0061912537 - 0.028717041 - 0.046844482 - 0.032836914 - 0.0071372986 - -0.023406982 - -0.03717041 - 0.016723633 - 0.03994751 - 0.025390625 - 0.03427124 - -0.01914978 - -0.026000977 - 0.07342529 - -0.03213501 - -0.058258057 - 0.029144287 - 0.001042366 - 0.030517578 - 0.011474609 - 0.058410645 - 0.005027771 - -0.038635254 - -0.015029907 - -0.015655518 - -0.03918457 - -0.016342163 - -0.020858765 - -0.0043907166 - 0.03857422 - 0.007423401 - -0.0473938 - 0.04257202 - -0.043823242 - -0.03842163 - -0.033691406 - -0.010925293 - 0.012260437 - 0.0009822845 - 0.0058937073 - -0.008644104 - -0.031585693 - 0.0055618286 - -0.06976318 - -0.030578613 - -0.038970947 - -0.08880615 - -0.00315094 - 0.00020766258 - 0.04058838 - 0.0028266907 - -0.0018129349 - -0.01625061 - -0.022277832 - -0.008956909 - -0.009292603 - -0.040771484 - -0.008705139 - -0.065979004 - -0.010414124 - -0.0152282715 - 0.033447266 - -0.033599854 - -0.008049011 - -0.020828247 - 0.0053901672 - 0.0002875328 - 0.037078857 - 0.015159607 - -0.0016326904 - 0.012397766 - 0.0026817322 - -0.032196045 - -0.0079422 - 0.03567505 - -0.0010242462 - 0.03652954 - -0.0035171509 - 0.01802063 - 0.026641846 - 0.0107421875 - -0.021942139 - 0.035095215 - -0.0236969 - -0.015975952 - 0.039215088 - 0.0038166046 - 0.020462036 - -0.039764404 - 0.035888672 - -0.038604736 - -0.008621216 - -0.012619019 - -0.014602661 - -0.036102295 - -0.02368164 - -0.0121536255 - -0.0054512024 - -0.015701294 - -0.016296387 - 0.016433716 - -0.005672455 - -0.019332886 - 0.00025129318 - 0.0803833 - 0.04248047 - -0.05960083 - -0.009147644 - -0.0021247864 - 0.012481689 - -0.015129089 - -0.021133423 - -0.01878357 - 0.0027332306 - 0.036956787 - -0.0053253174 - -0.0007238388 - 0.016983032 - -0.0034694672 - 0.059387207 - 0.076660156 - 0.015312195 - -0.015823364 - 0.02456665 - 0.012901306 - 0.020126343 - -0.032440186 - 0.011291504 - -0.001876831 - -0.052215576 - 0.004634857 - 0.036956787 - 0.006164551 - -0.023422241 - -0.025619507 - 0.024261475 - 0.023849487 - 0.015007019 - 0.020050049 - -0.044067383 - 0.030029297 - 0.021377563 - 0.011657715 - 0.017196655 - -0.032318115 - -0.031555176 - -0.00982666 - -0.0039787292 - -0.079589844 - -0.006416321 - 0.00844574 - -0.007434845 - -0.045013428 - -0.02557373 - -0.01537323 - 0.027633667 - -0.076538086 - -0.0025749207 - -0.05279541 - 0.029373169 - 0.047912598 - 0.00083875656 - -0.01234436 - -0.017059326 - 0.01159668 - 0.014228821 - 0.029571533 - -0.055114746 - 0.006389618 - 0.028869629 - 0.09375 - -0.014251709 - 0.029418945 - 0.007633209 - 0.010848999 - -0.004055023 - -0.02116394 - 0.007194519 - -0.0062217712 - -0.01209259 - 0.024749756 - -0.037506104 - -0.029510498 - -0.028442383 - 0.03189087 - 0.0008239746 - 0.007419586 - -0.016723633 - 0.06964111 - -0.07232666 - 0.022201538 - -0.019882202 - -0.0385437 - -0.022567749 - 0.010353088 - -0.027755737 - -0.006713867 - -0.023406982 - -0.025054932 - -0.013076782 - 0.015808105 - -0.0073165894 - 0.02949524 - -0.036499023 - -0.07287598 - -0.01876831 - -0.02709961 - -0.06567383 - 0.050567627 - 0.004047394 - 0.030471802 - 0.025405884 - 0.046783447 - 0.01763916 - 0.053466797 - 0.049072266 - -0.015197754 - 0.0013389587 - 0.049591064 - 0.006965637 - -0.00014233589 - 0.01335907 - -0.04675293 - -0.026733398 - 0.03024292 - 0.0012464523 - -0.037200928 - 0.030166626 - -0.08544922 - -0.013893127 - -0.014823914 - 0.0014219284 - -0.023620605 - -0.0010480881 - -0.072387695 - 0.057922363 - -0.04067993 - -0.025299072 - 0.020446777 - 0.06451416 - 0.007205963 - 0.015838623 - -0.008674622 - 0.0002270937 - -0.026321411 - 0.027130127 - -0.01828003 - -0.011482239 - 0.03463745 - 0.00724411 - -0.010406494 - 0.025268555 - -0.023651123 - 0.04034424 - -0.036834717 - 0.05014038 - -0.026184082 - 0.036376953 - 0.03253174 - -0.01828003 - -0.023376465 - -0.034576416 - -0.00598526 - -0.023239136 - -0.032409668 - 0.07672119 - -0.038604736 - 0.056884766 - -0.012550354 - -0.03778076 - -0.013061523 - 0.017105103 - 0.010482788 - -0.005077362 - -0.010719299 - -0.018661499 - 0.019760132 - 0.022018433 - -0.058746338 - 0.03564453 - -0.0892334 - 0.025421143 - -0.015716553 - 0.07910156 - -0.009361267 - 0.016921997 - 0.048736572 - 0.035247803 - 0.01864624 - 0.011413574 - 0.018295288 - 0.00052690506 - -0.07122803 - -0.01890564 - -0.017669678 - 0.027694702 - 0.0152282715 - 0.006511688 - -0.045837402 - -0.009765625 - 0.013877869 - -0.0146102905 - 0.033294678 - -0.0019874573 - 0.023040771 - 0.025619507 - -0.015823364 - -0.020858765 - -0.023529053 - 0.0070152283 - -0.0647583 - 0.036224365 - 0.0023403168 - -0.062286377 - -0.036315918 - 0.021209717 - -0.037353516 - -0.03656006 - 0.01889038 - 0.023239136 - 0.011764526 - 0.005970001 - 0.049346924 - -0.006893158 - -0.015068054 - -0.0008716583 - -0.0034999847 - 0.04034424 - 0.017913818 - -0.06707764 - -0.07531738 - 0.00042319298 - -0.00680542 - -0.0023174286 - 0.04425049 - -0.05105591 - -0.016967773 - 0.020507812 - 0.038604736 - 0.029846191 - 0.04309082 - -0.00084733963 - -0.008911133 - 0.0082092285 - -0.0050239563 - 0.05038452 - 0.014595032 - 0.015182495 - 0.007247925 - -0.04046631 - -0.011169434 - -0.010292053 - 0.068603516 - 0.02470398 - -0.0023403168 - 0.005996704 - -0.0010709763 - 0.008178711 - -0.029205322 - -0.025253296 - 0.05822754 - 0.04269409 - 0.059295654 - -0.0011911392 - -0.031311035 - 0.023712158 - -0.037506104 - 0.004589081 - 0.014923096 - -0.019866943 - -0.019180298 - -0.0020999908 - -0.008972168 - 0.01348114 - 0.014801025 - -0.02645874 - 0.019897461 - 0.081970215 - -0.05822754 - 0.09399414 - 0.001209259 - -0.050750732 - 0.062316895 - -0.014892578 - -0.019104004 - -0.036987305 - -0.040618896 - -0.008163452 - -0.0035247803 - 0.06774902 - -0.001420021 - -0.0013103485 - -0.031799316 - -0.0023651123 - 0.012298584 - 0.003583908 - 0.050964355 - -0.01802063 - -0.007091522 - 0.01448822 - -0.016159058 - -0.019439697 - -0.022491455 - -0.036346436 - -0.03491211 - -0.0032920837 - 0.003528595 - -0.0016469955 - 0.01612854 - -0.003709793 - 0.012840271 - 0.0043182373 - -0.030456543 - 0.007369995 - 0.0039787292 - 0.036499023 - 0.021362305 - 0.00062942505 - 0.0047073364 - 0.026382446 - -0.0020542145 - -0.038757324 - -0.00095272064 - 0.0019435883 - 0.007232666 - -0.0031471252 - 0.019943237 - -0.062042236 - 0.010826111 - 0.0026607513 - -0.04727173 - 0.020126343 - 0.046417236 - -0.03881836 - 0.011222839 - 0.011428833 - -0.056396484 - 0.010879517 - -0.011772156 - -0.0038414001 - 0.010246277 - -0.020141602 - -0.011169434 - 0.006916046 - -0.022659302 - 0.010299683 - 0.046966553 - 0.0234375 - -0.0016288757 - -0.03262329 - -0.01689148 - -0.00031924248 - 0.028152466 - 0.004234314 - 0.03878784 - -0.03579712 - 0.007457733 - -0.0036907196 - 0.0073051453 - -0.00028276443 - -0.0067100525 - 0.003206253 - -0.0021209717 - -0.05960083 - 0.024337769 - 0.076171875 - -0.012062073 - -0.0032787323 - -0.08380127 - 0.024917603 - 0.019073486 - -0.012031555 - -0.03237915 - -0.0042686462 - -0.01525116 - -0.0158844 - -0.0014514923 - -0.024429321 - -0.028442383 - 0.020843506 - 0.007133484 - 0.024230957 - 0.0002002716 - -0.005466461 - -0.0032367706 - 0.012718201 - 0.032806396 - 0.062042236 - -0.040283203 - -0.025497437 - 0.045013428 - 0.054473877 - -0.033599854 - -0.0039482117 - 0.02268982 - -0.0012645721 - 0.045166016 - 0.0501709 - -0.0022602081 - 0.019897461 - 0.007926941 - 0.017364502 - 0.011650085 - -0.042510986 - -0.059448242 - 0.030014038 - 0.039611816 - 0.015571594 - 0.04031372 - -0.0006723404 - -0.03353882 - -0.05569458 - 0.040283203 - 0.019058228 - -0.032592773 - 0.004470825 - 0.06359863 - 0.029693604 - 0.01826477 - -0.0104522705 - -0.043945312 - -0.01802063 - 0.0075187683 - -0.02456665 - 0.02798462 - 0.0047340393 - -0.017623901 - -0.014335632 - -0.04550171 - -0.0039711 - 0.023864746 - -0.015281677 - 0.055755615 - -0.04864502 - 0.033599854 - 0.024810791 - -0.03048706 - -0.043121338 - 0.011291504 - 0.024932861 - -0.0020275116 - 0.032287598 - -0.0234375 - 0.006942749 - -0.007221222 - -0.03869629 - -0.03765869 - -0.03475952 - -0.046936035 - 0.03012085 - -0.021362305 - -0.023452759 - 0.051239014 - -0.009925842 - 0.04925537 - -0.00944519 - -0.040008545 - -0.019485474 - -0.00022566319 - -0.017028809 - 0.03277588 - 0.0066375732 - -0.013328552 - 0.01864624 - -0.011726379 - 0.023849487 - 0.04006958 - 0.03793335 - 0.060821533 - 0.005504608 - -0.0395813 - -0.010131836 - 0.046539307 - 0.030136108 - 0.002231598 - 0.042236328 - 0.014755249 - 0.047058105 - -0.017318726 - 0.008598328 - 0.01966858 - 0.0064430237 - 0.03616333 - -0.011985779 - -0.003446579 - -0.06616211 - -0.0657959 - 0.014137268 - 0.044677734 - -0.03515625 - -0.05215454 - -0.012710571 - 0.0047416687 - 0.05368042 - 0.013900757 - 0.05001831 - 0.027709961 - 0.02557373 - -0.025512695 - 0.0031032562 - 0.072143555 - 0.018829346 - 0.0073928833 - 0.009269714 - -0.011299133 - 0.0048828125 - 0.014808655 - -0.0184021 - -0.00089359283 - -0.0015716553 - -0.012863159 - 0.0074386597 - -0.020767212 - 0.02204895 - -0.027404785 - -0.021972656 - 0.02494812 - 0.044006348 - -0.011581421 - 0.06298828 - 0.009010315 - 0.03842163 - -5.555153e-5 - 0.06774902 - 0.036254883 - -0.016311646 - -4.887581e-6 - 0.0057373047 - 0.03704834 - -0.041503906 - 0.0074043274 - -0.012290955 - -0.020263672 - -0.0057792664 - -0.025878906 - -0.021652222 - -0.008079529 - 0.022613525 - -0.012069702 - 0.050079346 - -0.004283905 - -0.021118164 - -0.010559082 - -0.0041160583 - -0.00026345253 - -0.01260376 - 0.050628662 - -0.03137207 - 0.027526855 - -0.052642822 - -0.0046463013 - 0.04937744 - -0.0017156601 - 0.014625549 - -0.022476196 - 0.02571106 - 0.043884277 - -0.016952515 - -0.021011353 - 0.056396484 - 0.056762695 - 0.013473511 - -0.02357483 - 0.043792725 - 0.032470703 - -0.052612305 - -0.017837524 - -6.7055225e-5 - 0.039276123 - -0.012283325 - -0.0029888153 - -0.024719238 - 0.012870789 - -0.032287598 - 0.028839111 - 0.008056641 - 0.011100769 - -0.034210205 - 0.028198242 - 0.01940918 - 0.029052734 - 0.030303955 - 0.03475952 - -0.03982544 - 0.026870728 - 0.02079773 - 0.03012085 - -0.044281006 - 0.006462097 - -0.008705139 - -0.024734497 - 0.02458191 - -0.050201416 - -0.028778076 - 0.036956787 - 0.025634766 - -0.025650024 - 0.020629883 - -0.04385376 - 0.009536743 - -0.0027256012 - 0.031158447 - 0.008712769 - -0.039855957 - -0.018249512 - -0.011268616 - 0.009689331 - -0.032073975 - 0.023010254 - 0.04925537 - 0.013168335 - 0.02734375 - 0.031707764 - -0.024032593 - -0.010604858 - -0.00258255 - 0.0054092407 - 0.033569336 - 0.0068359375 - 0.019882202 - 0.018096924 - -0.05392456 - -0.0030059814 - -0.01374054 - -0.008483887 - 0.016494751 - -0.015487671 - 0.016143799 - -0.028198242 - -0.016326904 - -0.013160706 - -0.046905518 - 0.026428223 - -0.02420044 - -0.022262573 - 0.041748047 - 0.05557251 - -0.0044059753 - -0.030960083 - -0.023544312 - 0.0103302 - -0.013534546 - -0.016830444 - 0.028167725 - 0.0061950684 - 0.02178955 - -0.06945801 - -0.040039062 - -0.0024642944 - -0.06359863 - -0.020812988 - 0.029006958 - 0.0072364807 - -0.028747559 - -0.057891846 - 0.022155762 - -0.035369873 - -0.025909424 - -0.04095459 - 0.0019893646 - -0.0038146973 - -0.030639648 - -0.038970947 - -0.0026626587 - -0.0047454834 - -0.014816284 - 0.008575439 - -0.032165527 - -0.011062622 - 0.003622055 - -0.0129852295 - -0.0007658005 - -0.009902954 - 0.03704834 - -0.02456665 - 0.020385742 - 0.0019044876 - -0.008552551 - -0.028137207 - -0.006500244 - 0.017227173 - -0.0077285767 - -0.05496216 - 0.038024902 - -0.0335083 - 0.047668457 - -0.02998352 - -0.0395813 - -0.0068359375 - -0.024627686 - -0.005756378 - 0.025863647 - 0.032104492 - -0.029022217 - -0.08685303 - -0.014724731 - -0.035583496 - 0.024002075 - 0.008422852 - 0.012931824 - -0.0055656433 - -0.013748169 - -0.021530151 - -0.034332275 - -0.008766174 - -0.025222778 - 0.019836426 - -0.011619568 - -0.037963867 - 0.013519287 - -0.035736084 - 0.049102783 - -0.011398315 - 0.050598145 - -0.066833496 - 0.080566406 - -0.061553955 - -0.041778564 - 0.01864624 - 0.014907837 - -0.010482788 - 0.035217285 - -0.0473938 - -0.031951904 - 0.052886963 - -0.022109985 - 0.031677246 - -0.01977539 - 0.08282471 - 0.012901306 - -0.009490967 - 0.0030956268 - 0.023895264 - 0.012611389 - -0.0011844635 - -0.007633209 - 0.019195557 - -0.05404663 - 0.006187439 - -0.06762695 - -0.049468994 - 0.028121948 - -0.004032135 - -0.043151855 - 0.028121948 - -0.0058555603 - 0.019454956 - 0.0028438568 - -0.0036354065 - -0.015411377 - -0.026535034 - 0.03704834 - -0.01802063 - 0.009765625 - - 0.04663086 - -0.023239136 - 0.008163452 - -0.03945923 - -0.018051147 - -0.011123657 - 0.0022335052 - -0.0015516281 - -0.002336502 - 0.031799316 - -0.049591064 - -0.049835205 - 0.019317627 - -0.013328552 - -0.01838684 - -0.067871094 - 0.02671814 - 0.038085938 - 0.03265381 - -0.0043907166 - 0.026321411 - 0.0070114136 - -0.037628174 - 0.008026123 - 0.015525818 - 0.066589355 - -0.018005371 - -0.0017309189 - -0.052368164 - -0.055511475 - -0.00504303 - 0.043029785 - -0.013328552 - 0.08581543 - -0.038269043 - 0.051971436 - -0.04675293 - 0.038146973 - 0.05328369 - -0.028762817 - 0.01625061 - -0.008644104 - -0.060150146 - -0.0259552 - -0.05432129 - -0.00680542 - -0.012649536 - 0.0025501251 - 0.060272217 - -0.013168335 - 0.046691895 - 0.030395508 - 0.039733887 - 0.00044679642 - -0.034240723 - 0.01828003 - -0.047546387 - -0.036499023 - 0.024505615 - 0.027374268 - 0.015197754 - -0.003932953 - 0.03475952 - 0.013633728 - 0.020858765 - -0.025344849 - -0.056732178 - 0.008178711 - 0.043304443 - 0.014625549 - -0.0020503998 - -0.033569336 - -0.00178051 - -0.0446167 - -0.045837402 - 0.089538574 - 0.00440979 - 0.03741455 - 0.0015287399 - -0.035339355 - 0.017654419 - -0.008956909 - -0.035064697 - -0.014251709 - 0.008331299 - 0.0077781677 - 0.0020999908 - -0.021636963 - -0.014625549 - -0.0209198 - -0.009429932 - 0.070617676 - 0.013923645 - -0.025558472 - -0.0519104 - -0.0049552917 - 0.000998497 - -0.01448822 - -0.027175903 - -0.04083252 - -0.032043457 - -0.0096588135 - -0.047088623 - -0.0012331009 - -0.025878906 - 0.031799316 - -0.023712158 - 0.015701294 - 0.017730713 - 0.062927246 - 0.009178162 - -0.046295166 - -0.014701843 - -0.007751465 - -0.021148682 - 0.033966064 - -0.013664246 - 0.03945923 - -0.02520752 - 0.08905029 - -0.039520264 - -0.012435913 - -0.057403564 - 0.007068634 - 0.006061554 - -0.040161133 - -0.015548706 - 0.080078125 - 0.08862305 - 0.008003235 - -0.048339844 - 0.037750244 - -0.04498291 - -0.065979004 - -0.032470703 - -0.03225708 - 0.004890442 - -0.013023376 - -0.020965576 - 0.035095215 - 0.035491943 - -0.01486969 - 0.027023315 - 0.009552002 - -0.01285553 - 0.044891357 - 0.00062322617 - -0.030639648 - 0.024108887 - 0.0035648346 - -0.06585693 - -0.011070251 - 0.037506104 - 0.05697632 - -0.027236938 - 0.03475952 - 0.0143585205 - -0.014442444 - -0.011405945 - -0.013648987 - -0.028625488 - 0.024902344 - 0.09387207 - -0.012741089 - -0.040985107 - -0.018814087 - 0.0046920776 - -0.017715454 - 0.013839722 - 0.0022621155 - 0.0024433136 - -0.028366089 - -0.0046310425 - 0.028717041 - -0.00013160706 - 0.006690979 - -0.053863525 - 0.03302002 - 0.040802002 - 0.03201294 - 0.032073975 - -0.03125 - -0.005241394 - 0.048828125 - -0.016204834 - -0.0014667511 - -0.013572693 - 0.007949829 - 0.019744873 - -0.004776001 - -0.0022506714 - 0.033111572 - 0.00039958954 - 0.008369446 - -0.021057129 - -0.033935547 - -0.03692627 - 0.0042762756 - -0.030380249 - -0.01876831 - -0.023529053 - 0.004764557 - 0.026947021 - -0.013267517 - -0.023666382 - 0.0024929047 - -0.017990112 - 0.035217285 - 0.0034389496 - 0.030380249 - 0.02015686 - -0.013061523 - -0.047790527 - 0.042633057 - 0.009559631 - -0.03186035 - -0.02796936 - -0.0151901245 - -0.0039482117 - 0.0345459 - -0.018096924 - 0.012062073 - -0.02180481 - 0.031402588 - 0.041412354 - -0.052459717 - 0.006286621 - -0.033203125 - -0.0013237 - -0.012466431 - -0.041748047 - 0.027313232 - -0.0284729 - -0.05682373 - -0.02809143 - 0.030899048 - 0.023773193 - 0.044677734 - -0.0064353943 - -6.4373016e-6 - 0.011512756 - 0.0028190613 - -0.041870117 - -0.028182983 - 0.014595032 - -0.0143966675 - 0.022949219 - -0.004371643 - 0.01461792 - 0.0035171509 - 0.01398468 - -0.04473877 - 0.04232788 - -0.033599854 - -0.000647068 - 0.034606934 - 0.006160736 - -0.014640808 - 0.028137207 - -0.02470398 - 0.0043563843 - 0.00039553642 - -0.039886475 - 0.014251709 - -0.035736084 - -0.021347046 - -0.029663086 - -0.011688232 - -0.038085938 - -0.0034008026 - 0.029144287 - -0.010948181 - -0.024978638 - 0.009468079 - 0.093933105 - 0.014205933 - -0.08569336 - -0.011657715 - 0.02027893 - 0.0063095093 - -0.0035533905 - 0.020446777 - 0.029968262 - -0.002008438 - 0.03253174 - 0.029891968 - 0.019577026 - -0.002922058 - -0.009994507 - 0.029418945 - 0.049987793 - 0.046295166 - -0.0072898865 - 0.019638062 - 0.042816162 - 0.0066108704 - 0.06591797 - 0.04714966 - -0.026062012 - -0.019470215 - 0.009979248 - 0.018081665 - 9.059906e-6 - -0.043060303 - -0.0043907166 - 0.064331055 - 0.051605225 - -0.0040893555 - 0.018081665 - -0.024749756 - -0.014915466 - -0.048614502 - 0.023483276 - 0.013282776 - -0.011741638 - -0.036346436 - -0.0076293945 - 0.023086548 - -0.051849365 - 0.023223877 - 0.033721924 - -0.003929138 - -0.044647217 - 0.020019531 - -0.029678345 - -0.0031986237 - 0.030548096 - -0.040161133 - -0.020874023 - 0.028793335 - 0.037872314 - 0.011314392 - -0.030838013 - -0.051818848 - -0.007774353 - 0.0070724487 - 0.02507019 - -0.0112838745 - 0.014930725 - 0.010543823 - 0.085998535 - 0.019332886 - 0.0107803345 - 0.00014901161 - 0.001613617 - -0.024993896 - -0.04940796 - 0.010643005 - 0.04269409 - -0.02571106 - 0.001124382 - -0.018844604 - -0.014953613 - 0.027786255 - 0.033447266 - 0.0038719177 - 0.011268616 - 0.004295349 - 0.028656006 - -0.078063965 - -0.012619019 - -0.03527832 - -0.061279297 - 0.0625 - 0.038116455 - -0.008308411 - -0.017913818 - 0.031311035 - -0.018722534 - 0.0362854 - -0.019363403 - 0.021362305 - -0.0029010773 - -0.030288696 - -0.07293701 - 0.008544922 - 0.006755829 - -0.068237305 - 0.0491333 - 0.016494751 - -0.021621704 - 0.020980835 - 0.026443481 - 0.051879883 - 0.035583496 - 0.030548096 - -0.03366089 - -0.017532349 - 0.066101074 - 0.03930664 - 0.013633728 - -0.008621216 - 0.031982422 - -0.042388916 - -0.00042247772 - -0.020492554 - 0.04006958 - 0.052825928 - -0.0044136047 - -0.02243042 - -0.04260254 - 0.02418518 - -0.020584106 - -0.0027770996 - -0.05908203 - 0.026611328 - -0.046051025 - -0.03451538 - 0.017944336 - 0.054260254 - 0.019348145 - 0.0070114136 - 0.014205933 - -0.019454956 - -0.021514893 - 0.010383606 - 0.050109863 - 0.020584106 - -0.031677246 - -0.048187256 - 0.01449585 - 0.04650879 - 0.025222778 - 0.004135132 - 0.02017212 - 0.044311523 - -0.03427124 - -0.023757935 - 0.03479004 - -0.012031555 - -0.030380249 - -0.021560669 - -0.010375977 - -0.05041504 - -0.060821533 - 0.012283325 - -0.026367188 - 0.061920166 - 0.026367188 - -0.037078857 - -0.015136719 - 0.033355713 - -0.010055542 - 0.025314331 - -0.027893066 - -0.010032654 - 0.017684937 - -2.783537e-5 - -0.061157227 - 0.030273438 - -0.103759766 - 0.035583496 - -0.028167725 - 0.07171631 - -0.0211792 - -0.013725281 - 0.04437256 - 0.041137695 - 0.027145386 - 0.032073975 - 0.008926392 - -0.021560669 - 0.007381439 - 0.019165039 - 0.0012969971 - -0.01928711 - 0.026672363 - -0.01222229 - -0.056365967 - 0.010398865 - -0.02255249 - 0.00093221664 - -0.009353638 - 0.016082764 - 0.022872925 - 0.025024414 - -0.024459839 - 0.040618896 - -0.049224854 - -0.0035133362 - -0.047698975 - 0.01727295 - 0.034057617 - -0.004096985 - -0.009361267 - 0.011291504 - -0.010093689 - -0.017990112 - 0.04107666 - -0.058563232 - -0.03387451 - -0.046905518 - 0.015411377 - -0.02003479 - -0.010528564 - -0.01689148 - 0.010391235 - -0.040618896 - 0.029205322 - -0.020492554 - -0.082092285 - 0.0004811287 - 0.043518066 - -0.044830322 - 0.020141602 - -0.02319336 - 0.0024662018 - 0.012825012 - 0.04977417 - 0.06225586 - 0.027801514 - 0.005153656 - 0.04147339 - 0.0011873245 - 0.004486084 - -0.02494812 - 0.061706543 - 0.012184143 - -0.0027637482 - -0.018447876 - -0.008987427 - -0.0362854 - 0.10205078 - 0.026138306 - -0.056549072 - 0.015899658 - 0.04449463 - -0.017837524 - -0.0044898987 - -0.04348755 - 0.06689453 - 0.008728027 - 0.047454834 - 0.03289795 - -0.034851074 - 0.04675293 - -0.058807373 - 0.03164673 - 0.01322937 - -0.06958008 - -0.042816162 - -0.022918701 - -0.019760132 - 0.008293152 - 0.02709961 - -0.05822754 - 0.011459351 - -0.0008597374 - -0.01574707 - 0.027954102 - -0.029785156 - -0.03665161 - 0.017562866 - -0.027297974 - -0.024017334 - -0.0423584 - -0.039245605 - 0.0028457642 - -0.0010719299 - 0.01763916 - 0.009902954 - -0.023849487 - -0.009399414 - -0.016464233 - 0.045074463 - -0.0056762695 - 0.04537964 - -0.04397583 - -0.025817871 - 0.037353516 - -0.018737793 - 0.01084137 - 0.0038528442 - -0.04547119 - -0.024475098 - -0.05545044 - -0.005756378 - 0.008132935 - 0.014541626 - -0.0020751953 - 0.03793335 - -0.004421234 - -0.037261963 - -0.00818634 - 0.026733398 - 0.04776001 - -0.012313843 - 0.0019369125 - -0.0006084442 - 0.01335907 - -0.033813477 - -0.024459839 - 0.046783447 - -0.006389618 - -0.055999756 - -0.059295654 - 0.008743286 - -0.033966064 - 0.022537231 - -0.018722534 - -0.041259766 - 0.040039062 - 0.028747559 - -0.03515625 - 0.0019016266 - 0.041778564 - -0.0046539307 - 0.00014257431 - 0.011451721 - 0.016998291 - 0.00522995 - -0.04837036 - -0.024520874 - 0.025466919 - -0.020706177 - 0.017608643 - 0.062042236 - -0.0039596558 - -0.021911621 - -0.013893127 - -8.85129e-5 - 0.00075626373 - 0.03414917 - 0.011314392 - 0.018661499 - -0.009719849 - 0.012748718 - -0.026809692 - -0.01436615 - 0.021469116 - -0.036254883 - 0.00907135 - -0.026016235 - -0.01625061 - 0.030075073 - 0.011817932 - -0.0038528442 - -0.0028858185 - -0.021820068 - 0.037475586 - 0.0115356445 - -0.0077285767 - -0.05328369 - -0.051361084 - 0.040649414 - -0.005958557 - -0.02279663 - 0.01953125 - -0.016937256 - 0.03781128 - -0.0016212463 - 0.015098572 - -0.01626587 - 0.0067443848 - 0.027175903 - 0.011459351 - 0.038513184 - 0.06222534 - -0.0073547363 - -0.010383606 - 0.0017681122 - 0.045043945 - -0.044921875 - -0.0104599 - 0.035858154 - -0.008323669 - 0.0025901794 - 0.021514893 - -0.010971069 - 0.016738892 - 0.0018157959 - -0.0071258545 - -0.029022217 - -0.047027588 - -0.02670288 - 0.029220581 - -0.022750854 - 0.025054932 - -0.008544922 - 0.006164551 - -0.029052734 - -0.031066895 - 0.06304932 - -0.044647217 - -0.017562866 - -0.0068511963 - 0.06604004 - 0.039916992 - -0.007041931 - -0.02772522 - -0.05795288 - -0.022247314 - -0.02810669 - -0.03845215 - 0.045074463 - -0.014060974 - -0.016174316 - 0.046722412 - -0.0006046295 - -0.019500732 - -0.025985718 - 0.032989502 - 0.028366089 - 0.0021324158 - 0.0020503998 - 0.051574707 - 0.009117126 - -0.03112793 - -0.006565094 - 0.019226074 - 0.009971619 - -0.0064735413 - -0.017700195 - 0.0024414062 - -0.0008454323 - -0.04071045 - -0.034820557 - -0.031066895 - -0.044677734 - 0.039398193 - -0.012580872 - -0.06549072 - 0.027130127 - -0.0309906 - 0.023727417 - -0.019760132 - 0.0066490173 - -0.004798889 - 0.009155273 - -0.009902954 - 0.047576904 - 0.005466461 - 0.001537323 - 0.014862061 - -0.0027828217 - -0.0079956055 - 0.043182373 - 0.0051841736 - 0.034484863 - -0.028015137 - -0.012870789 - -0.019714355 - 0.036071777 - 0.015716553 - -0.016860962 - 0.0034122467 - -0.014289856 - 0.039031982 - 0.017730713 - -0.013549805 - 0.046691895 - 0.022094727 - 0.04647827 - 0.008033752 - 0.028747559 - -0.030288696 - -0.018722534 - -0.015113831 - 0.051971436 - -0.040893555 - -0.039978027 - -0.0042266846 - -0.008346558 - 0.059814453 - 0.0011167526 - 0.056030273 - -0.08166504 - -0.059631348 - -0.015731812 - 0.009529114 - 0.025756836 - 0.022232056 - -0.0049819946 - 0.021118164 - -0.020446777 - 0.0032253265 - 0.017105103 - -0.030944824 - 0.010154724 - -0.021881104 - -0.018081665 - 0.029342651 - 0.024047852 - 0.017700195 - -0.02268982 - 0.018356323 - 0.026519775 - 0.032226562 - -0.004711151 - 0.018753052 - 0.007789612 - 0.033172607 - -0.034423828 - 0.035247803 - -0.019729614 - -0.021194458 - 0.0071411133 - -0.014549255 - -0.0073165894 - -0.05596924 - 0.015060425 - -0.014305115 - -0.030090332 - 0.001613617 - -0.026809692 - -0.02571106 - -0.0041275024 - 0.027389526 - -0.0059509277 - 0.0473938 - -0.0002002716 - 0.00037145615 - 0.0031642914 - -0.0044441223 - 0.0023765564 - 0.0121154785 - 0.04260254 - -0.035736084 - 0.019424438 - -0.005558014 - 0.0038166046 - 0.03717041 - -0.0031261444 - 0.0446167 - 0.015098572 - -0.0022087097 - 0.0385437 - 0.024505615 - -0.03353882 - -0.028533936 - 0.06048584 - -0.019332886 - -0.046539307 - 0.007232666 - -0.031585693 - 0.02168274 - 0.0046195984 - -0.041412354 - 0.032592773 - 0.056671143 - 0.031173706 - -0.011398315 - 0.033416748 - 0.01802063 - -0.0259552 - -0.0028705597 - 0.046539307 - -0.040008545 - 0.022567749 - 0.020980835 - 0.024383545 - 0.02861023 - 0.010574341 - -0.008300781 - 0.024261475 - 0.030319214 - -0.011238098 - -0.030197144 - 0.013389587 - 0.010879517 - -0.031311035 - 0.035308838 - -0.014755249 - 0.01612854 - 0.05722046 - -0.019470215 - -0.014045715 - 0.022842407 - -0.085998535 - 0.017166138 - 0.011474609 - 0.018325806 - 0.010398865 - 0.00434494 - -0.013153076 - 0.025482178 - 0.007217407 - -0.0017223358 - 0.041046143 - 0.036895752 - -0.028656006 - -0.008026123 - 0.026550293 - -0.0146102905 - 0.0053215027 - -0.057037354 - 0.008743286 - 0.018066406 - 0.0025310516 - -0.0035171509 - -0.02230835 - -0.018218994 - 0.0069618225 - -0.006111145 - 0.017532349 - 0.034210205 - -0.040496826 - 0.031433105 - -0.006587982 - -0.031097412 - -0.0154418945 - -0.009414673 - 0.006729126 - 0.004711151 - 0.00920105 - 0.0025501251 - -0.0016479492 - -0.0107803345 - -0.070129395 - -0.046203613 - 0.06616211 - -0.019622803 - -0.06298828 - -0.022628784 - 0.04156494 - 0.026672363 - -0.11505127 - -0.080200195 - -0.0491333 - -0.03744507 - -0.0178833 - 0.016326904 - 0.03201294 - -0.013259888 - -0.042114258 - 0.0023727417 - 0.005683899 - -0.027908325 - 0.040039062 - -0.055847168 - -0.03781128 - -0.018753052 - 0.03274536 - 0.0121536255 - 0.04360962 - -0.0110321045 - 0.017913818 - -0.0231781 - -0.018936157 - -0.002658844 - 0.011222839 - -0.0082473755 - -0.0039043427 - 0.011512756 - -0.014328003 - 0.037994385 - -0.020767212 - 0.025314331 - -0.023727417 - 0.030303955 - 0.03302002 - 0.0040512085 - -0.074401855 - 0.027450562 - -0.030838013 - 0.042053223 - -0.04425049 - -0.022613525 - 0.0025463104 - 0.029449463 - -0.0023975372 - 0.03717041 - 0.020751953 - -9.357929e-6 - -0.06842041 - -0.045074463 - -0.035980225 - 0.03060913 - 0.00049352646 - -0.0013618469 - 0.018676758 - 0.00070238113 - -0.015472412 - -0.035736084 - -0.008995056 - 0.008773804 - 0.009635925 - 0.023330688 - -0.027008057 - -0.0074501038 - -0.0040893555 - 0.010391235 - -0.030014038 - -0.04119873 - -0.06329346 - 0.049926758 - -0.016952515 - -0.015045166 - -0.0010814667 - 0.020309448 - -0.0034770966 - 0.05996704 - -0.043273926 - -0.035491943 - 0.017654419 - 0.033325195 - -0.015403748 - 0.03942871 - -0.003692627 - -0.008995056 - -0.012290955 - -0.004722595 - 0.010276794 - -0.027023315 - -0.0052871704 - 0.019729614 - 0.026519775 - -0.029541016 - -0.05505371 - 0.007499695 - -0.030639648 - 0.00042963028 - -0.016693115 - 0.03125 - 0.03543091 - 0.010482788 - 0.018081665 - 0.030441284 - 0.030960083 - -0.008422852 - -0.00983429 - 0.047332764 - 0.0023212433 - 0.0052719116 meta: api_version: version: '2' is_experimental: true warnings: - You are using an experimental version, for more information please refer to https://docs.cohere.com/versioning-reference billed_units: input_tokens: 2 responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/EmbedByTypeResponse" headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: |- This endpoint returns text embeddings. An embedding is a list of floating point numbers that captures semantic information about the text that it represents. Embeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page. If you want to learn more how to use the embedding model, have a look at the [Semantic Search Guide](https://docs.cohere.com/docs/semantic-search). requestBody: content: application/json: schema: type: object x-fern-audiences: - public required: - model - input_type - embedding_types properties: texts: type: array x-fern-audiences: - public minItems: 1 maxItems: 96 description: An array of strings for the model to embed. Maximum number of texts per call is `96`. We recommend reducing the length of each text to be under `512` tokens for optimal quality. items: type: string x-fern-audiences: - public writeOnly: true writeOnly: true images: type: array x-fern-audiences: - public minItems: 1 maxItems: 1 description: |- An array of image data URIs for the model to embed. Maximum number of images per call is `1`. The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg` or `image/png` format and has a maximum size of 5MB. items: type: string x-fern-audiences: - public writeOnly: true model: type: string x-fern-audiences: - public description: |- Defaults to embed-english-v2.0 The identifier of the model. Smaller "light" models are faster, while larger models will perform better. [Custom models](https://docs.cohere.com/docs/training-custom-models) can also be supplied with their full ID. Available models and corresponding embedding dimensions: * `embed-english-v3.0` 1024 * `embed-multilingual-v3.0` 1024 * `embed-english-light-v3.0` 384 * `embed-multilingual-light-v3.0` 384 * `embed-english-v2.0` 4096 * `embed-english-light-v2.0` 1024 * `embed-multilingual-v2.0` 768 writeOnly: true input_type: x-fern-audiences: - public $ref: "#/components/schemas/EmbedInputType" embedding_types: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/EmbeddingType" description: |- Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types. * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models. * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models. * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models. * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models. * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. writeOnly: true truncate: type: string x-fern-audiences: - public default: END enum: - NONE - START - END description: |- One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length. Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model. If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned. writeOnly: true description: "" /v1/embed-jobs: post: x-fern-audiences: - public parameters: - $ref: "#/components/parameters/RequestSource" summary: Create an Embed Job operationId: create-embed-job tags: - /embed-jobs x-fern-sdk-group-name: embed-jobs x-fern-sdk-method-name: create x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.EmbedJobs.Create( context.TODO(), &cohere.CreateEmbedJobRequest{ DatasetId: "dataset_id", InputType: cohere.EmbedInputTypeSearchDocument, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: > import cohere co = cohere.Client() # start an embed job job = co.embed_jobs.create( dataset_id="my-dataset-id", input_type="search_document", model="embed-english-v3.0" ) # poll the server until the job is complete response = co.wait(job) print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): # start an embed job job = await co.embed_jobs.create( dataset_id="my-dataset-id", input_type="search_document", model="embed-english-v3.0", ) # poll the server until the job is complete response = await co.wait(job) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.embedjobs.requests.CreateEmbedJobRequest; import com.cohere.api.types.CreateEmbedJobResponse; import com.cohere.api.types.EmbedInputType; public class EmbedJobsPost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); CreateEmbedJobResponse response = cohere .embedJobs() .create( CreateEmbedJobRequest.builder() .model("embed-english-v3.0") .datasetId("ds.id") .inputType(EmbedInputType.SEARCH_DOCUMENT) .build()); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const embedJob = await cohere.embedJobs.create({ datasetId: 'my-dataset', inputType: 'search_document', model: 'embed-english-v3.0', }); console.log(embedJob); })(); - sdk: curl name: cURL code: |- curl --request POST \ --url https://api.cohere.com/v1/embed-jobs \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "embed-english-v3.0", "dataset_id": "my-dataset" }' responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/CreateEmbedJobResponse" headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: This API launches an async Embed job for a [Dataset](https://docs.cohere.com/docs/datasets) of type `embed-input`. The result of a completed embed job is new Dataset of type `embed-output`, which contains the original text entries and the corresponding embeddings. requestBody: content: application/json: schema: $ref: "#/components/schemas/CreateEmbedJobRequest" get: x-fern-audiences: - public parameters: - $ref: "#/components/parameters/RequestSource" summary: List Embed Jobs operationId: list-embed-jobs tags: - /embed-jobs x-fern-sdk-group-name: embed-jobs x-fern-sdk-method-name: list x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.EmbedJobs.Get(context.TODO(), "embed_job_id") if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() # list embed jobs response = co.embed_jobs.list() print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.embed_jobs.list() print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.types.ListEmbedJobResponse; public class EmbedJobsGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListEmbedJobResponse response = cohere.embedJobs().list(); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const embedJobs = await cohere.embedJobs.list(); console.log(embedJobs); })(); - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/embed-jobs \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ListEmbedJobResponse" headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: The list embed job endpoint allows users to view all embed jobs history for that specific user. "/v1/embed-jobs/{id}": get: x-fern-audiences: - public parameters: - name: id in: path required: true description: The ID of the embed job to retrieve. schema: type: string x-fern-audiences: - public - $ref: "#/components/parameters/RequestSource" summary: Fetch an Embed Job operationId: get-embed-job tags: - /embed-jobs x-fern-sdk-group-name: embed-jobs x-fern-sdk-method-name: get x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.EmbedJobs.List(context.TODO()) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() # get embed job response = co.embed_jobs.get("job_id") print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.embed_jobs.get("job_id") print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.types.ListEmbedJobResponse; public class EmbedJobsGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListEmbedJobResponse response = cohere.embedJobs().list(); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const embedJob = await cohere.embedJobs.get('job_id'); console.log(embedJob); })(); - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/embed-jobs/id \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/EmbedJob" headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning message for potentially incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: This API retrieves the details about an embed job started by the same user. "/v1/embed-jobs/{id}/cancel": post: x-fern-audiences: - public parameters: - name: id in: path required: true description: The ID of the embed job to cancel. schema: type: string x-fern-audiences: - public - $ref: "#/components/parameters/RequestSource" summary: Cancel an Embed Job operationId: cancel-embed-job tags: - /embed-jobs x-fern-sdk-group-name: embed-jobs x-fern-sdk-method-name: cancel x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() err := co.EmbedJobs.Cancel(context.TODO(), "embed_job_id") if err != nil { log.Fatal(err) } } - sdk: python name: Sync code: | import cohere co = cohere.Client() # cancel an embed job co.embed_jobs.cancel("job_id") - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): await co.embed_jobs.cancel("job_id") - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; public class EmbedJobsCancel { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); cohere.embedJobs().cancel("job_id"); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const embedJob = await cohere.embedJobs.cancel('job_id'); console.log(embedJob); })(); - sdk: curl name: cURL code: |- curl --request POST \ --url https://api.cohere.com/v1/embed-jobs/id/cancel \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" responses: "200": description: OK headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: This API allows users to cancel an active embed job. Once invoked, the embedding process will be terminated, and users will be charged for the embeddings processed up to the cancellation point. It's important to note that partial results will not be available to users after cancellation. /v1/rerank: post: x-fern-audiences: - public summary: Rerank operationId: rerank parameters: - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: type: object x-fern-audiences: - public properties: id: type: string x-fern-audiences: - public results: type: array x-fern-audiences: - public description: An ordered list of ranked documents items: type: object x-fern-audiences: - public properties: document: type: object x-fern-audiences: - public description: If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in properties: text: type: string x-fern-audiences: - public description: The text of the document to rerank required: - text index: type: integer x-fern-audiences: - public description: Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance) relevance_score: type: number x-fern-audiences: - public format: float description: Relevance scores are normalized to be in the range `[0, 1]`. Scores close to `1` indicate a high relevance to the query, and scores closer to `0` indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45 readOnly: true required: - index - relevance_score meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - results "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: model: type: string x-fern-audiences: - public description: "The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0`" query: type: string x-fern-audiences: - public description: The search query documents: type: array x-fern-audiences: - public description: |- A list of document objects or strings to rerank. If a document is provided the text fields is required and all other fields will be preserved in the response. The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000. We recommend a maximum of 1,000 documents for optimal endpoint performance. items: oneOf: - type: string - $ref: "#/components/schemas/RerankDocument" top_n: type: integer x-fern-audiences: - public minimum: 1 description: The number of most relevant documents or indices to return, defaults to the length of the documents rank_fields: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public description: If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking. return_documents: type: boolean x-fern-audiences: - public default: false description: |- - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request. - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request. max_chunks_per_doc: type: integer x-fern-audiences: - public description: The maximum number of chunks to produce internally from a document default: 10 required: - query - documents description: "" description: This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score. x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: > package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Rerank( context.TODO(), &cohere.RerankRequest{ Query: "What is the capital of the United States?", Documents: []*cohere.RerankRequestDocumentsItem{ {String: "Carson City is the capital city of the American state of Nevada."}, {String: "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan."}, {String: "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages."}, {String: "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district."}, }, Model: cohere.String("rerank-english-v3.0"), }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const rerank = await cohere.rerank({ documents: [ { text: 'Carson City is the capital city of the American state of Nevada.' }, { text: 'The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.', }, { text: 'Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.', }, { text: 'Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.', }, { text: 'Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.', }, ], query: 'What is the capital of the United States?', topN: 3, model: 'rerank-english-v3.0', }); console.log(rerank); })(); - sdk: python name: Sync code: > import cohere co = cohere.Client() docs = [ "Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] response = co.rerank( model="rerank-english-v3.0", query="What is the capital of the United States?", documents=docs, top_n=3, ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() docs = [ "Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] async def main(): response = await co.rerank( model="rerank-english-v2.0", query="What is the capital of the United States?", documents=docs, top_n=3, ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.RerankRequest; import com.cohere.api.types.RerankRequestDocumentsItem; import com.cohere.api.types.RerankResponse; import java.util.List; public class RerankPost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); RerankResponse response = cohere.rerank( RerankRequest.builder() .query("What is the capital of the United States?") .documents( List.of( RerankRequestDocumentsItem.of( "Carson City is the capital city of the" + " American state of Nevada."), RerankRequestDocumentsItem.of( "The Commonwealth of the Northern Mariana" + " Islands is a group of islands in" + " the Pacific Ocean. Its capital is" + " Saipan."), RerankRequestDocumentsItem.of( "Capitalization or capitalisation in" + " English grammar is the use of a" + " capital letter at the start of a" + " word. English usage varies from" + " capitalization in other" + " languages."), RerankRequestDocumentsItem.of( "Washington, D.C. (also known as simply" + " Washington or D.C., and officially" + " as the District of Columbia) is the" + " capital of the United States. It is" + " a federal district."), RerankRequestDocumentsItem.of( "Capital punishment (the death penalty) has" + " existed in the United States since" + " beforethe United States was a" + " country. As of 2017, capital" + " punishment is legal in 30 of the 50" + " states."))) .model("rerank-english-v3.0") .topN(3) .build()); System.out.println(response); } } - sdk: curl name: cURL code: >- curl --request POST \ --url https://api.cohere.com/v1/rerank \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "rerank-english-v3.0", "query": "What is the capital of the United States?", "top_n": 3, "documents": ["Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."] }' request: documents: - text: Carson City is the capital city of the American state of Nevada. - text: The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan. - text: Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages. - text: Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. - text: Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states. query: What is the capital of the United States? top_n: 3 model: rerank-english-v3.0 response: body: id: 8bc745a3-7871-4597-822e-18c95d5df48c results: - index: 3 relevance_score: 0.999071 - index: 4 relevance_score: 0.7867867 - index: 0 relevance_score: 0.32713068 meta: api_version: version: "1" billed_units: search_units: 1 /v2/rerank: post: summary: Rerank operationId: rerankv2 x-fern-audiences: - v2-beta x-fern-sdk-group-name: v2 x-fern-sdk-method-name: rerank parameters: - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: type: object x-fern-audiences: - public properties: id: type: string x-fern-audiences: - public results: type: array x-fern-audiences: - public description: An ordered list of ranked documents items: type: object x-fern-audiences: - public properties: document: type: object x-fern-audiences: - public description: If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in properties: text: type: string x-fern-audiences: - public description: The text of the document to rerank required: - text index: type: integer x-fern-audiences: - public description: Corresponds to the index in the original list of documents to which the ranked document belongs. (i.e. if the first value in the `results` object has an `index` value of 3, it means in the list of documents passed in, the document at `index=3` had the highest relevance) relevance_score: type: number x-fern-audiences: - public format: float description: Relevance scores are normalized to be in the range `[0, 1]`. Scores close to `1` indicate a high relevance to the query, and scores closer to `0` indicate low relevance. It is not accurate to assume a score of 0.9 means the document is 2x more relevant than a document with a score of 0.45 readOnly: true required: - index - relevance_score meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - results "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: model: type: string x-fern-audiences: - public description: "The identifier of the model to use, one of : `rerank-english-v3.0`, `rerank-multilingual-v3.0`, `rerank-english-v2.0`, `rerank-multilingual-v2.0`" query: type: string x-fern-audiences: - public description: The search query documents: type: array x-fern-audiences: - public description: |- A list of document objects or strings to rerank. If a document is provided the text fields is required and all other fields will be preserved in the response. The total max chunks (length of documents * max_chunks_per_doc) must be less than 10000. We recommend a maximum of 1,000 documents for optimal endpoint performance. items: oneOf: - type: string - $ref: "#/components/schemas/RerankDocument" top_n: type: integer x-fern-audiences: - public minimum: 1 description: The number of most relevant documents or indices to return, defaults to the length of the documents rank_fields: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public description: If a JSON object is provided, you can specify which keys you would like to have considered for reranking. The model will rerank based on order of the fields passed in (i.e. rank_fields=['title','author','text'] will rerank using the values in title, author, text sequentially. If the length of title, author, and text exceeds the context length of the model, the chunking will not re-consider earlier fields). If not provided, the model will use the default text field for ranking. return_documents: type: boolean x-fern-audiences: - public default: false description: |- - If false, returns results without the doc text - the api will return a list of {index, relevance score} where index is inferred from the list passed into the request. - If true, returns results with the doc text passed in - the api will return an ordered list of {index, text, relevance score} where index + text refers to the list passed into the request. max_chunks_per_doc: type: integer x-fern-audiences: - public description: The maximum number of chunks to produce internally from a document default: 10 required: - query - documents - model description: "" description: This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score. x-fern-examples: - code-samples: - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const rerank = await cohere.v2.rerank({ documents: [ { text: 'Carson City is the capital city of the American state of Nevada.' }, { text: 'The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.', }, { text: 'Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.', }, { text: 'Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.', }, { text: 'Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.', }, ], query: 'What is the capital of the United States?', topN: 3, model: 'rerank-english-v3.0', }); console.log(rerank); })(); - sdk: python name: Sync code: > import cohere co = cohere.ClientV2() docs = [ "Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] response = co.rerank( model="rerank-english-v3.0", query="What is the capital of the United States?", documents=docs, top_n=3, ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClientV2() docs = [ "Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states.", ] async def main(): response = await co.rerank( model="rerank-english-v2.0", query="What is the capital of the United States?", documents=docs, top_n=3, ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2RerankRequest; import com.cohere.api.resources.v2.types.V2RerankRequestDocumentsItem; import com.cohere.api.resources.v2.types.V2RerankResponse; import java.util.List; public class RerankV2Post { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); V2RerankResponse response = cohere .v2() .rerank( V2RerankRequest.builder() .model("rerank-english-v3.0") .query("What is the capital of the United States?") .documents( List.of( V2RerankRequestDocumentsItem.of( "Carson City is the capital city of" + " the American state of" + " Nevada."), V2RerankRequestDocumentsItem.of( "The Commonwealth of the Northern" + " Mariana Islands is a group" + " of islands in the Pacific" + " Ocean. Its capital is" + " Saipan."), V2RerankRequestDocumentsItem.of( "Capitalization or capitalisation" + " in English grammar is the" + " use of a capital letter at" + " the start of a word." + " English usage varies from" + " capitalization in other" + " languages."), V2RerankRequestDocumentsItem.of( "Washington, D.C. (also known as" + " simply Washington or D.C.," + " and officially as the" + " District of Columbia) is" + " the capital of the United" + " States. It is a federal" + " district."), V2RerankRequestDocumentsItem.of( "Capital punishment (the death" + " penalty) has existed in the" + " United States since" + " beforethe United States was" + " a country. As of 2017," + " capital punishment is legal" + " in 30 of the 50 states."))) .topN(3) .build()); System.out.println(response); } } - sdk: curl name: cURL code: >- curl --request POST \ --url https://api.cohere.com/v2/rerank \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "rerank-english-v3.0", "query": "What is the capital of the United States?", "top_n": 3, "documents": ["Carson City is the capital city of the American state of Nevada.", "The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.", "Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.", "Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.", "Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."] }' request: documents: - text: Carson City is the capital city of the American state of Nevada. - text: The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan. - text: Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages. - text: Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. - text: Capital punishment (the death penalty) has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states. query: What is the capital of the United States? top_n: 3 model: rerank-english-v3.0 response: body: id: 07734bd2-2473-4f07-94e1-0d9f0e6843cf results: - index: 3 relevance_score: 0.999071 - index: 4 relevance_score: 0.7867867 - index: 0 relevance_score: 0.32713068 meta: api_version: version: '2' is_experimental: true warnings: - You are using an experimental version, for more information please refer to https://docs.cohere.com/versioning-reference billed_units: search_units: 1 /v1/classify: post: parameters: - $ref: "#/components/parameters/RequestSource" x-fern-audiences: - public summary: Classify operationId: classify x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Classify( context.TODO(), &cohere.ClassifyRequest{ Examples: []*cohere.ClassifyExample{ { Text: cohere.String("orange"), Label: cohere.String("fruit"), }, { Text: cohere.String("pear"), Label: cohere.String("fruit"), }, { Text: cohere.String("lettuce"), Label: cohere.String("vegetable"), }, { Text: cohere.String("cauliflower"), Label: cohere.String("vegetable"), }, }, Inputs: []string{"peach"}, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const classify = await cohere.classify({ examples: [ { text: "Dermatologists don't like her!", label: 'Spam' }, { text: "'Hello, open to this?'", label: 'Spam' }, { text: 'I need help please wire me $1000 right now', label: 'Spam' }, { text: 'Nice to know you ;)', label: 'Spam' }, { text: 'Please help me?', label: 'Spam' }, { text: 'Your parcel will be delivered today', label: 'Not spam' }, { text: 'Review changes to our Terms and Conditions', label: 'Not spam' }, { text: 'Weekly sync notes', label: 'Not spam' }, { text: "'Re: Follow up from today's meeting'", label: 'Not spam' }, { text: 'Pre-read for tomorrow', label: 'Not spam' }, ], inputs: ['Confirm your email address', 'hey i need u to send some $'], }); console.log(classify); })(); - sdk: python name: Sync code: > import cohere from cohere import ClassifyExample co = cohere.Client() examples = [ ClassifyExample(text="Dermatologists don't like her!", label="Spam"), ClassifyExample(text="'Hello, open to this?'", label="Spam"), ClassifyExample(text="I need help please wire me $1000 right now", label="Spam"), ClassifyExample(text="Nice to know you ;)", label="Spam"), ClassifyExample(text="Please help me?", label="Spam"), ClassifyExample(text="Your parcel will be delivered today", label="Not spam"), ClassifyExample( text="Review changes to our Terms and Conditions", label="Not spam" ), ClassifyExample(text="Weekly sync notes", label="Not spam"), ClassifyExample(text="'Re: Follow up from today's meeting'", label="Not spam"), ClassifyExample(text="Pre-read for tomorrow", label="Not spam"), ] inputs = [ "Confirm your email address", "hey i need u to send some $", ] response = co.classify( inputs=inputs, examples=examples, ) print(response) - sdk: python name: Async code: > import cohere import asyncio from cohere import ClassifyExample co = cohere.AsyncClient() examples = [ ClassifyExample(text="Dermatologists don't like her!", label="Spam"), ClassifyExample(text="'Hello, open to this?'", label="Spam"), ClassifyExample(text="I need help please wire me $1000 right now", label="Spam"), ClassifyExample(text="Nice to know you ;)", label="Spam"), ClassifyExample(text="Please help me?", label="Spam"), ClassifyExample(text="Your parcel will be delivered today", label="Not spam"), ClassifyExample( text="Review changes to our Terms and Conditions", label="Not spam" ), ClassifyExample(text="Weekly sync notes", label="Not spam"), ClassifyExample(text="'Re: Follow up from today's meeting'", label="Not spam"), ClassifyExample(text="Pre-read for tomorrow", label="Not spam"), ] inputs = [ "Confirm your email address", "hey i need u to send some $", ] async def main(): response = await co.classify( inputs=inputs, examples=examples, ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.ClassifyRequest; import com.cohere.api.types.ClassifyExample; import com.cohere.api.types.ClassifyResponse; import java.util.List; public class ClassifyPost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ClassifyResponse response = cohere.classify( ClassifyRequest.builder() .addAllInputs(List.of("Confirm your email address", "hey i need u to send some $")) .examples( List.of( ClassifyExample.builder() .text("Dermatologists don't like her!") .label("Spam") .build(), ClassifyExample.builder() .text("'Hello, open to this?'") .label("Spam") .build(), ClassifyExample.builder() .text("I need help please wire me $1000" + " right now") .label("Spam") .build(), ClassifyExample.builder().text("Nice to know you ;)").label("Spam").build(), ClassifyExample.builder().text("Please help me?").label("Spam").build(), ClassifyExample.builder() .text("Your parcel will be delivered today") .label("Not spam") .build(), ClassifyExample.builder() .text("Review changes to our Terms and" + " Conditions") .label("Not spam") .build(), ClassifyExample.builder() .text("Weekly sync notes") .label("Not spam") .build(), ClassifyExample.builder() .text("'Re: Follow up from today's" + " meeting'") .label("Not spam") .build(), ClassifyExample.builder() .text("Pre-read for tomorrow") .label("Not spam") .build())) .build()); System.out.println(response); } } - sdk: curl name: cURL code: >- curl --request POST \ --url https://api.cohere.com/v1/classify \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "inputs": ["Confirm your email address", "hey i need u to send some $"], "examples": [ {"text": "Dermatologists don'\''t like her!","label": "Spam"}, {"text": "'\''Hello, open to this?'\''","label": "Spam"}, {"text": "I need help please wire me $1000 right now","label": "Spam"}, {"text": "Nice to know you ;)","label": "Spam"}, {"text": "Please help me?","label": "Spam"}, {"text": "Your parcel will be delivered today","label": "Not spam"}, {"text": "Review changes to our Terms and Conditions","label": "Not spam"}, {"text": "Weekly sync notes","label": "Not spam"}, {"text": "'\''Re: Follow up from today'\''s meeting'\''","label": "Not spam"}, {"text": "Pre-read for tomorrow","label": "Not spam"} ] }' request: examples: - text: Dermatologists don't like her! label: Spam - text: "'Hello, open to this?'" label: Spam - text: I need help please wire me $1000 right now label: Spam - text: Nice to know you ;) label: Spam - text: Please help me? label: Spam - text: Your parcel will be delivered today label: Not spam - text: Review changes to our Terms and Conditions label: Not spam - text: Weekly sync notes label: Not spam - text: "'Re: Follow up from today's meeting'" label: Not spam - text: Pre-read for tomorrow label: Not spam inputs: - Confirm your email address - hey i need u to send some $ response: body: id: 86886163-b3f3-4e36-8554-60eca7696216 classifications: - classification_type: single-label confidence: 0.5661598 confidences: - 0.5661598 id: 842d12fe-934b-4b71-82c2-c581eca00718 input: Confirm your email address labels: Not spam: confidence: 0.5661598 Spam: confidence: 0.43384025 prediction: Not spam predictions: - Not spam - classification_type: single-label confidence: 0.9909811 confidences: - 0.9909811 id: e1a39b3e-1ecd-41d2-be75-90ed726f7b9e input: hey i need u to send some $ labels: Not spam: confidence: 0.009018883 Spam: confidence: 0.9909811 prediction: Spam predictions: - Spam meta: api_version: version: "1" billed_units: classifications: 2 responses: "200": description: OK content: application/json: schema: type: object x-fern-audiences: - public properties: id: type: string x-fern-audiences: - public readOnly: true classifications: type: array x-fern-audiences: - public items: type: object x-fern-audiences: - public properties: id: type: string x-fern-audiences: - public readOnly: true input: type: string x-fern-audiences: - public description: The input text that was classified readOnly: true prediction: type: string x-fern-audiences: - public description: The predicted label for the associated query (only filled for single-label models) readOnly: true deprecated: true predictions: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public description: An array containing the predicted labels for the associated query (only filled for single-label classification) readOnly: true confidence: type: number x-fern-audiences: - public format: float description: The confidence score for the top predicted class (only filled for single-label classification) readOnly: true deprecated: true confidences: type: array x-fern-audiences: - public items: type: number x-fern-audiences: - public format: float description: An array containing the confidence scores of all the predictions in the same order readOnly: true labels: type: object x-fern-audiences: - public additionalProperties: type: object x-fern-audiences: - public properties: confidence: type: number x-fern-audiences: - public format: float readOnly: true readOnly: true description: A map containing each label and its confidence score according to the classifier. All the confidence scores add up to 1 for single-label classification. For multi-label classification the label confidences are independent of each other, so they don't have to sum up to 1. readOnly: true classification_type: type: string x-fern-audiences: - public enum: - single-label - multi-label description: The type of classification performed readOnly: true required: - id - predictions - confidences - labels - classification_type readOnly: true readOnly: true meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - id - classifications headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: |- This endpoint makes a prediction about which label fits the specified text inputs best. To make a prediction, Classify uses the provided `examples` of text + label pairs as a reference. Note: [Fine-tuned models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: inputs: type: array x-fern-audiences: - public maxItems: 96 description: |- A list of up to 96 texts to be classified. Each one must be a non-empty string. There is, however, no consistent, universal limit to the length a particular input can be. We perform classification on the first `x` tokens of each input, and `x` varies depending on which underlying model is powering classification. The maximum token length for each model is listed in the "max tokens" column [here](https://docs.cohere.com/docs/models). Note: by default the `truncate` parameter is set to `END`, so tokens exceeding the limit will be automatically dropped. This behavior can be disabled by setting `truncate` to `NONE`, which will result in validation errors for longer texts. items: type: string x-fern-audiences: - public writeOnly: true writeOnly: true examples: type: array x-fern-audiences: - public description: |- An array of examples to provide context to the model. Each example is a text string and its associated label/class. Each unique label requires at least 2 examples associated with it; the maximum number of examples is 2500, and each example has a maximum length of 512 tokens. The values should be structured as `{text: "...",label: "..."}`. Note: [Fine-tuned Models](https://docs.cohere.com/docs/classify-fine-tuning) trained on classification examples don't require the `examples` parameter to be passed in explicitly. maxItems: 2500 items: x-fern-audiences: - public $ref: "#/components/schemas/ClassifyExample" writeOnly: true model: type: string x-fern-audiences: - public description: The identifier of the model. Currently available models are `embed-multilingual-v2.0`, `embed-english-light-v2.0`, and `embed-english-v2.0` (default). Smaller "light" models are faster, while larger models will perform better. [Fine-tuned models](https://docs.cohere.com/docs/fine-tuning) can also be supplied with their full ID. writeOnly: true preset: type: string x-fern-audiences: - public example: my-preset-a58sbd description: The ID of a custom playground preset. You can create presets in the [playground](https://dashboard.cohere.com/playground/classify?model=large). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters. writeOnly: true truncate: type: string x-fern-audiences: - public default: END enum: - NONE - START - END description: |- One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length. Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model. If `NONE` is selected, when the input exceeds the maximum input token length an error will be returned. writeOnly: true required: - inputs description: "" /v1/datasets: post: x-fern-audiences: - public summary: Create a Dataset operationId: create-dataset description: Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information. tags: - /datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: create requestBody: content: multipart/form-data: schema: type: object x-fern-audiences: - public properties: data: type: string x-fern-audiences: - public format: binary description: The file to upload eval_data: type: string x-fern-audiences: - public format: binary description: An optional evaluation file to upload required: - data parameters: - in: query name: name required: true schema: type: string x-fern-audiences: - public description: The name of the uploaded dataset. - in: query name: type required: true schema: $ref: "#/components/schemas/DatasetType" description: The dataset type, which is used to validate the data. Valid types are `embed-input`, `reranker-finetune-input`, `single-label-classification-finetune-input`, `chat-finetune-input`, and `multi-label-classification-finetune-input`. - in: query name: keep_original_file schema: type: boolean x-fern-audiences: - public description: Indicates if the original file should be stored. - in: query name: skip_malformed_input schema: type: boolean x-fern-audiences: - public description: Indicates whether rows with malformed input should be dropped (instead of failing the validation check). Dropped rows will be returned in the warnings field. - in: query name: keep_fields schema: type: array items: type: string x-fern-audiences: - public description: List of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `keep_fields` are missing from the uploaded file, Dataset validation will fail. - in: query name: optional_fields schema: type: array items: type: string x-fern-audiences: - public description: List of names of fields that will be persisted in the Dataset. By default the Dataset will retain only the required fields indicated in the [schema for the corresponding Dataset type](https://docs.cohere.com/docs/datasets#dataset-types). For example, Datasets of type `embed-input` will drop all fields other than the required `text` field. If any of the fields in `optional_fields` are missing from the uploaded file, Dataset validation will pass. - in: query name: text_separator schema: type: string x-fern-audiences: - public description: Raw .txt uploads will be split into entries using the text_separator value. - in: query name: csv_delimiter schema: type: string x-fern-audiences: - public description: The delimiter used for .csv uploads. - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: > package main import ( "context" "io" "log" "strings" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) type MyReader struct { io.Reader name string } func (m *MyReader) Name() string { return m.name } func main() { co := client.NewClient() resp, err := co.Datasets.Create( context.TODO(), &MyReader{Reader: strings.NewReader(`{"text": "The quick brown fox jumps over the lazy dog"}`), name: "test.jsonl"}, &MyReader{Reader: strings.NewReader(""), name: "a.jsonl"}, &cohere.DatasetsCreateRequest{ Name: "embed-dataset", Type: cohere.DatasetTypeEmbedResult, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() # upload a dataset my_dataset = co.datasets.create( name="chat-dataset", data=open("./chat.jsonl", "rb"), type="chat-finetune-input", ) # wait for validation to complete response = co.wait(my_dataset) print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): # upload a dataset response = await co.datasets.create( name="chat-dataset", data=open("./chat.jsonl", "rb"), type="chat-finetune-input", ) # wait for validation to complete response = await co.wait(response) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.datasets.requests.DatasetsCreateRequest; import com.cohere.api.resources.datasets.types.DatasetsCreateResponse; import com.cohere.api.types.DatasetType; import java.util.Optional; public class DatasetPost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); DatasetsCreateResponse response = cohere .datasets() .create( null, Optional.empty(), DatasetsCreateRequest.builder() .name("chat-dataset") .type(DatasetType.CHAT_FINETUNE_INPUT) .build()); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const fs = require('fs'); const cohere = new CohereClient({}); (async () => { const file = fs.createReadStream('embed_jobs_sample_data.jsonl'); // {"text": "The quick brown fox jumps over the lazy dog"} const dataset = await cohere.datasets.create({ name: 'my-dataset', type: 'embed-input' }, file); console.log(dataset); })(); - sdk: curl name: cURL code: >- curl --request POST \ --url "https://api.cohere.com/v1/datasets?name=my-dataset&type=generative-finetune-input" \ --header 'Content-Type: multipart/form-data' \ --header "Authorization: Bearer $CO_API_KEY" \ --form file=@./path/to/file.jsonl responses: "200": description: A successful response. content: application/json: schema: type: object x-fern-audiences: - public properties: id: type: string x-fern-audiences: - public description: The dataset ID "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" get: x-fern-audiences: - public summary: List Datasets operationId: list-datasets description: List datasets that have been created. tags: - /datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: list parameters: - name: datasetType in: query description: optional filter by dataset type schema: type: string x-fern-audiences: - public - name: before in: query description: optional filter before a date schema: type: string x-fern-audiences: - public format: date-time - name: after in: query description: optional filter after a date schema: type: string x-fern-audiences: - public format: date-time - name: limit in: query description: optional limit to number of results schema: type: number x-fern-audiences: - public - name: offset in: query description: optional offset to start of results schema: type: number x-fern-audiences: - public - name: validationStatus in: query description: optional filter by validation status schema: $ref: "#/components/schemas/DatasetValidationStatus" - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Datasets.Get(context.TODO(), "dataset_id") if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() # get dataset response = co.datasets.get(id="<>") print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.datasets.get(id="<>") print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.datasets.types.DatasetsGetResponse; public class DatasetGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); DatasetsGetResponse response = cohere.datasets().get("dataset_id"); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const datasets = await cohere.datasets.get('<>'); console.log(datasets); })(); - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/datasets \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" responses: "200": description: A successful response. content: application/json: schema: type: object x-fern-audiences: - public properties: datasets: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/Dataset" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" /v1/datasets/usage: get: x-fern-audiences: - public summary: Get Dataset Usage operationId: get-dataset-usage description: View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users. tags: - /datasets parameters: - $ref: "#/components/parameters/RequestSource" x-fern-sdk-group-name: datasets x-fern-sdk-method-name: getUsage x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Datasets.GetUsage(context.TODO()) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() # get usage response = co.datasets.get_usage() print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.datasets.get_usage() print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.datasets.types.DatasetsGetUsageResponse; public class DatasetUsageGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); DatasetsGetUsageResponse response = cohere.datasets().getUsage(); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const usage = await cohere.datasets.getUsage('id'); console.log(usage); })(); - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/datasets/usage \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" responses: "200": description: A successful response. content: application/json: schema: type: object x-fern-audiences: - public properties: organization_usage: type: number x-fern-audiences: - public format: int64 description: The total number of bytes used by the organization. "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" "/v1/datasets/{id}": get: x-fern-audiences: - public summary: Get a Dataset operationId: get-dataset description: Retrieve a dataset by ID. See ['Datasets'](https://docs.cohere.com/docs/datasets) for more information. tags: - /datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: get parameters: - name: id in: path required: true schema: type: string x-fern-audiences: - public pattern: ^(?!usage$).*$ - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Datasets.Get(context.TODO(), "dataset_id") if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() # get dataset response = co.datasets.get(id="<>") print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.datasets.get(id="<>") print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.datasets.types.DatasetsGetResponse; public class DatasetGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); DatasetsGetResponse response = cohere.datasets().get("dataset_id"); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const datasets = await cohere.datasets.get('<>'); console.log(datasets); })(); - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/datasets \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" responses: "200": description: A successful response. content: application/json: schema: type: object x-fern-audiences: - public required: - dataset properties: dataset: $ref: "#/components/schemas/Dataset" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" delete: x-fern-audiences: - public summary: Delete a Dataset operationId: delete-dataset description: Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually. tags: - /datasets x-fern-sdk-group-name: datasets x-fern-sdk-method-name: delete parameters: - name: id in: path required: true schema: type: string x-fern-audiences: - public pattern: ^(?!usage$).*$ - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() _, err := co.Datasets.Delete(context.TODO(), "dataset_id") if err != nil { log.Fatal(err) } } - sdk: python name: Sync code: | import cohere co = cohere.Client() # delete dataset co.datasets.delete("id") - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): await co.delete_dataset("id") asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; public class DatasetDelete { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); cohere.datasets().delete("id"); } } - sdk: curl name: cURL code: |- curl --request DELETE \ --url https://api.cohere.com/v1/datasets/id \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" responses: "200": description: A successful response. content: application/json: schema: type: object x-fern-audiences: - public "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" /v1/summarize: post: x-fern-audiences: - public summary: Summarize operationId: summarize parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: > package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Summarize( context.TODO(), &cohere.SummarizeRequest{ Text: "the quick brown fox jumped over the lazy dog and then the dog jumped over the fox the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog the quick brown fox jumped over the lazy dog", }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const summarize = await cohere.summarize({ text: 'Ice cream is a sweetened frozen food typically eaten as a snack or dessert. ' + 'It may be made from milk or cream and is flavoured with a sweetener, ' + 'either sugar or an alternative, and a spice, such as cocoa or vanilla, ' + 'or with fruit such as strawberries or peaches. ' + 'It can also be made by whisking a flavored cream base and liquid nitrogen together. ' + 'Food coloring is sometimes added, in addition to stabilizers. ' + 'The mixture is cooled below the freezing point of water and stirred to incorporate air spaces ' + 'and to prevent detectable ice crystals from forming. The result is a smooth, ' + 'semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). ' + 'It becomes more malleable as its temperature increases.\n\n' + 'The meaning of the name "ice cream" varies from one country to another. ' + 'In some countries, such as the United States, "ice cream" applies only to a specific variety, ' + 'and most governments regulate the commercial use of the various terms according to the ' + 'relative quantities of the main ingredients, notably the amount of cream. ' + 'Products that do not meet the criteria to be called ice cream are sometimes labelled ' + '"frozen dairy dessert" instead. In other countries, such as Italy and Argentina, ' + 'one word is used fo\r all variants. Analogues made from dairy alternatives, ' + "such as goat's or sheep's milk, or milk substitutes " + '(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are ' + 'lactose intolerant, allergic to dairy protein or vegan.', }); console.log(summarize); })(); - sdk: python name: Sync code: > import cohere co = cohere.Client() text = ( "Ice cream is a sweetened frozen food typically eaten as a snack or dessert. " "It may be made from milk or cream and is flavoured with a sweetener, " "either sugar or an alternative, and a spice, such as cocoa or vanilla, " "or with fruit such as strawberries or peaches. " "It can also be made by whisking a flavored cream base and liquid nitrogen together. " "Food coloring is sometimes added, in addition to stabilizers. " "The mixture is cooled below the freezing point of water and stirred to incorporate air spaces " "and to prevent detectable ice crystals from forming. The result is a smooth, " "semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). " "It becomes more malleable as its temperature increases.\n\n" 'The meaning of the name "ice cream" varies from one country to another. ' 'In some countries, such as the United States, "ice cream" applies only to a specific variety, ' "and most governments regulate the commercial use of the various terms according to the " "relative quantities of the main ingredients, notably the amount of cream. " "Products that do not meet the criteria to be called ice cream are sometimes labelled " '"frozen dairy dessert" instead. In other countries, such as Italy and Argentina, ' "one word is used fo\r all variants. Analogues made from dairy alternatives, " "such as goat's or sheep's milk, or milk substitutes " "(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are " "lactose intolerant, allergic to dairy protein or vegan." ) response = co.summarize( text=text, ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() text = ( "Ice cream is a sweetened frozen food typically eaten as a snack or dessert. " "It may be made from milk or cream and is flavoured with a sweetener, " "either sugar or an alternative, and a spice, such as cocoa or vanilla, " "or with fruit such as strawberries or peaches. " "It can also be made by whisking a flavored cream base and liquid nitrogen together. " "Food coloring is sometimes added, in addition to stabilizers. " "The mixture is cooled below the freezing point of water and stirred to incorporate air spaces " "and to prevent detectable ice crystals from forming. The result is a smooth, " "semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). " "It becomes more malleable as its temperature increases.\n\n" 'The meaning of the name "ice cream" varies from one country to another. ' 'In some countries, such as the United States, "ice cream" applies only to a specific variety, ' "and most governments regulate the commercial use of the various terms according to the " "relative quantities of the main ingredients, notably the amount of cream. " "Products that do not meet the criteria to be called ice cream are sometimes labelled " '"frozen dairy dessert" instead. In other countries, such as Italy and Argentina, ' "one word is used fo\r all variants. Analogues made from dairy alternatives, " "such as goat's or sheep's milk, or milk substitutes " "(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are " "lactose intolerant, allergic to dairy protein or vegan." ) async def main(): response = await co.summarize( text=text, ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.SummarizeRequest; import com.cohere.api.types.SummarizeResponse; public class SummarizePost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); SummarizeResponse response = cohere.summarize( SummarizeRequest.builder() .text( """ Ice cream is a sweetened frozen food typically eaten as a snack or dessert.\s It may be made from milk or cream and is flavoured with a sweetener,\s either sugar or an alternative, and a spice, such as cocoa or vanilla,\s or with fruit such as strawberries or peaches.\s It can also be made by whisking a flavored cream base and liquid nitrogen together.\s Food coloring is sometimes added, in addition to stabilizers.\s The mixture is cooled below the freezing point of water and stirred to incorporate air spaces\s and to prevent detectable ice crystals from forming. The result is a smooth,\s semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F).\s It becomes more malleable as its temperature increases.\\n\\n The meaning of the name "ice cream" varies from one country to another.\s In some countries, such as the United States, "ice cream" applies only to a specific variety,\s and most governments regulate the commercial use of the various terms according to the\s relative quantities of the main ingredients, notably the amount of cream.\s Products that do not meet the criteria to be called ice cream are sometimes labelled\s "frozen dairy dessert" instead. In other countries, such as Italy and Argentina,\s one word is used fo\\r all variants. Analogues made from dairy alternatives,\s such as goat's or sheep's milk, or milk substitutes\s (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are\s lactose intolerant, allergic to dairy protein or vegan. """) .build()); System.out.println(response); } } - sdk: curl name: cURL code: >- curl --request POST \ --url https://api.cohere.com/v1/summarize \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "text": "Ice cream is a sweetened frozen food typically eaten as a snack or dessert. It may be made from milk or cream and is flavoured with a sweetener, either sugar or an alternative, and a spice, such as cocoa or vanilla, or with fruit such as strawberries or peaches. It can also be made by whisking a flavored cream base and liquid nitrogen together. Food coloring is sometimes added, in addition to stabilizers. The mixture is cooled below the freezing point of water and stirred to incorporate air spaces and to prevent detectable ice crystals from forming. The result is a smooth, semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). It becomes more malleable as its temperature increases.\n\nThe meaning of the name \"ice cream\" varies from one country to another. In some countries, such as the United States, \"ice cream\" applies only to a specific variety, and most governments regulate the commercial use of the various terms according to the relative quantities of the main ingredients, notably the amount of cream. Products that do not meet the criteria to be called ice cream are sometimes labelled \"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, one word is used for all variants. Analogues made from dairy alternatives, such as goat'\''s or sheep'\''s milk, or milk substitutes (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are lactose intolerant, allergic to dairy protein or vegan." }' request: text: "Ice cream is a sweetened frozen food typically eaten as a snack or dessert. It may be made from milk or cream and is flavoured with a sweetener, either sugar or an alternative, and a spice, such as cocoa or vanilla, or with fruit such as strawberries or peaches. It can also be made by whisking a flavored cream base and liquid nitrogen together. Food coloring is sometimes added, in addition to stabilizers. The mixture is cooled below the freezing point of water and stirred to incorporate air spaces and to prevent detectable ice crystals from forming. The result is a smooth, semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). It becomes more malleable as its temperature increases. The meaning of the name \"ice cream\" varies from one country to another. In some countries, such as the United States, \"ice cream\" applies only to a specific variety, and most governments regulate the commercial use of the various terms according to the relative quantities of the main ingredients, notably the amount of cream. Products that do not meet the criteria to be called ice cream are sometimes labelled \"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, one word is used fo\r all variants. Analogues made from dairy alternatives, such as goat's or sheep's milk, or milk substitutes (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are lactose intolerant, allergic to dairy protein or vegan." response: body: id: aa0b828e-f9cf-484d-a84d-cb62f556e841 summary: Ice cream is a frozen dessert made by whipping a cream base and liquid nitrogen together. It is then flavoured with sweeteners, spices and fruits. Ice cream can also be made using alternative milks, such as soy or almond, for those who are lactose intolerant or vegan. meta: api_version: version: "1" billed_units: input_tokens: 321 output_tokens: 55 responses: "200": description: OK headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API content: application/json: schema: type: object x-fern-audiences: - public properties: id: type: string x-fern-audiences: - public description: Generated ID for the summary summary: type: string x-fern-audiences: - public description: Generated summary for the text meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: | This API is marked as "Legacy" and is no longer maintained. Follow the [migration guide](https://docs.cohere.com/docs/migrating-from-cogenerate-to-cochat) to start using the Chat API. Generates a summary in English for a given text. requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: text: type: string x-fern-audiences: - public description: The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English. minLength: 250 maxLength: 50000 writeOnly: true length: type: string x-fern-audiences: - public description: One of `short`, `medium`, `long`, or `auto` defaults to `auto`. Indicates the approximate length of the summary. If `auto` is selected, the best option will be picked based on the input text. default: medium enum: - short - medium - long writeOnly: true format: type: string x-fern-audiences: - public default: paragraph enum: - paragraph - bullets description: One of `paragraph`, `bullets`, or `auto`, defaults to `auto`. Indicates the style in which the summary will be delivered - in a free form paragraph or in bullet points. If `auto` is selected, the best option will be picked based on the input text. writeOnly: true model: type: string x-fern-audiences: - public description: The identifier of the model to generate the summary with. Currently available models are `command` (default), `command-nightly` (experimental), `command-light`, and `command-light-nightly` (experimental). Smaller, "light" models are faster, while larger models will perform better. writeOnly: true extractiveness: type: string x-fern-audiences: - public description: One of `low`, `medium`, `high`, or `auto`, defaults to `auto`. Controls how close to the original text the summary is. `high` extractiveness summaries will lean towards reusing sentences verbatim, while `low` extractiveness summaries will tend to paraphrase more. If `auto` is selected, the best option will be picked based on the input text. default: low enum: - low - medium - high writeOnly: true temperature: type: number x-fern-audiences: - public description: Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1. default: 0.3 minimum: 0 maximum: 5 writeOnly: true additional_command: type: string x-fern-audiences: - public description: A free-form instruction for modifying how the summaries get generated. Should complete the sentence "Generate a summary _". Eg. "focusing on the next steps" or "written by Yoda" writeOnly: true required: - text description: "" /v1/tokenize: post: x-fern-audiences: - public summary: Tokenize operationId: tokenize parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Tokenize( context.TODO(), &cohere.TokenizeRequest{ Text: "cohere <3", Model: "base", }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Cohere TypeScript SDK code: | const cohere = require('cohere-ai'); cohere.init('<>')(async () => { const response = await cohere.tokenize({ text: 'tokenize me! :D', model: 'command', // optional }); console.log(response); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.tokenize( text="tokenize me! :D", model="command-r-plus-08-2024" ) # optional print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.tokenize(text="tokenize me! :D", model="command-r-plus-08-2024") print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.TokenizeRequest; import com.cohere.api.types.TokenizeResponse; public class TokenizePost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); TokenizeResponse response = cohere.tokenize( TokenizeRequest.builder().text("tokenize me").model("command-r-plus-08-2024").build()); System.out.println(response); } } - sdk: typescript name: Cohere Node.js SDK code: | const cohere = require('cohere-ai'); cohere.init('<>')(async () => { const response = await cohere.tokenize({ text: 'tokenize me! :D', model: 'command', // optional }); console.log(response); })(); - sdk: curl name: cURL code: |- curl --request POST \ --url https://api.cohere.com/v1/tokenize \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "command-r-plus-08-2024", "text": "tokenize me! :D" }' request: text: tokenize me! :D model: command response: body: tokens: - 10002 - 2261 - 2012 - 8 - 2792 - 43 token_strings: - token - ize - " me" - "!" - " :" - D meta: api_version: version: "1" responses: "200": description: OK headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API content: application/json: schema: type: object x-fern-audiences: - public properties: tokens: type: array x-fern-audiences: - public description: An array of tokens, where each token is an integer. items: type: integer x-fern-audiences: - public readOnly: true readOnly: true token_strings: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - tokens - token_strings examples: Example: value: tokens: - 34160 - 974 - 514 - 34 - 1420 - 69 token_strings: - token - ize' - " me" - "!" - " :" - D meta: api_version: version: "1" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: This endpoint splits input text into smaller units called tokens using byte-pair encoding (BPE). To learn more about tokenization and byte pair encoding, see the tokens page. requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: text: type: string x-fern-audiences: - public description: The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters. minLength: 1 maxLength: 65536 model: type: string x-fern-audiences: - public description: An optional parameter to provide the model name. This will ensure that the tokenization uses the tokenizer used by that model. required: - text - model examples: Example: value: text: tokenize me! :D model: command description: "" /v1/detokenize: post: x-fern-audiences: - public summary: Detokenize operationId: detokenize parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Detokenize( context.TODO(), &cohere.DetokenizeRequest{ Tokens: []int{10002, 1706, 1722, 5169, 4328}, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const detokenize = await cohere.detokenize({ tokens: [10002, 2261, 2012, 8, 2792, 43], model: 'command', }); console.log(detokenize); })(); - sdk: python name: Sync code: > import cohere co = cohere.Client() response = co.detokenize( tokens=[8466, 5169, 2594, 8, 2792, 43], model="command-r-plus-08-2024" # optional ) print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.detokenize( tokens=[8466, 5169, 2594, 8, 2792, 43], model="command-r-plus-08-2024", # optional ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.requests.DetokenizeRequest; import com.cohere.api.types.DetokenizeResponse; import java.util.List; public class DetokenizePost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); DetokenizeResponse response = cohere.detokenize( DetokenizeRequest.builder() .model("command-r-plus-08-2024") .tokens(List.of(8466, 5169, 2594, 8, 2792, 43)) .build()); System.out.println(response); } } - sdk: curl name: cURL code: |- curl --request POST \ --url https://api.cohere.com/v1/detokenize \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "model": "command-r-plus-08-2024", "tokens": [8466, 5169, 2594, 8, 2792, 43] }' request: tokens: - 10002 - 2261 - 2012 - 8 - 2792 - 43 model: command response: body: text: tokenize me! :D meta: api_version: version: "1" responses: "200": description: OK headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API content: application/json: schema: type: object x-fern-audiences: - public properties: text: type: string x-fern-audiences: - public description: A string representing the list of tokens. readOnly: true meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - text "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" description: This endpoint takes tokens using byte-pair encoding and returns their text representation. To learn more about tokenization and byte pair encoding, see the tokens page. requestBody: content: application/json: schema: type: object x-fern-audiences: - public properties: tokens: type: array x-fern-audiences: - public description: The list of tokens to be detokenized. minItems: 1 maxItems: 65536 items: type: integer x-fern-audiences: - public writeOnly: true model: type: string x-fern-audiences: - public description: An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model. required: - tokens - model description: "" parameters: [] /v1/connectors: get: x-fern-audiences: - public summary: List Connectors tags: - /connectors operationId: list-connectors x-fern-sdk-method-name: list x-fern-sdk-group-name: connectors description: Returns a list of connectors ordered by descending creation date (newer first). See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. parameters: - name: limit in: query description: Maximum number of connectors to return [0, 100]. schema: default: 30 type: number x-fern-audiences: - public - name: offset in: query description: Number of connectors to skip before returning results [0, inf]. schema: default: 0 type: number x-fern-audiences: - public - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ListConnectorsResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Connectors.List( context.TODO(), &cohere.ConnectorsListRequest{}) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.connectors.list() print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.connectors.list() print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.types.ListConnectorsResponse; public class ConnectorsList { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListConnectorsResponse list = cohere.connectors().list(); System.out.println(list); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const connectors = await cohere.connectors.list(); console.log(connectors); })(); - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/connectors \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" post: x-fern-audiences: - public summary: Create a Connector tags: - /connectors operationId: create-connector x-fern-sdk-method-name: create x-fern-sdk-group-name: connectors description: Creates a new connector. The connector is tested during registration and will cancel registration when the test is unsuccessful. See ['Creating and Deploying a Connector'](https://docs.cohere.com/v1/docs/creating-and-deploying-a-connector) for more information. parameters: - $ref: "#/components/parameters/RequestSource" requestBody: content: application/json: schema: $ref: "#/components/schemas/CreateConnectorRequest" required: true responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/CreateConnectorResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Connectors.Create( context.TODO(), &cohere.CreateConnectorRequest{ Name: "Example connector", Url: "https://you-connector-url", ServiceAuth: &cohere.CreateConnectorServiceAuth{ Token: "dummy-connector-token", Type: "bearer", }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.connectors.create( name="Example connector", url="https://connector-example.com/search", ) print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.connectors.create( name="Example connector", url="https://connector-example.com/search", ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.connectors.requests.CreateConnectorRequest; import com.cohere.api.types.CreateConnectorResponse; public class ConnectorCreate { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); CreateConnectorResponse response = cohere .connectors() .create( CreateConnectorRequest.builder() .name("Example connector") .url("https://connector-example.com/search") .build()); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const connector = await cohere.connectors.create({ name: 'test-connector', url: 'https://example.com/search', description: 'A test connector', }); console.log(connector); })(); - sdk: curl name: Curl code: |- curl --request POST \ --url https://api.cohere.com/v1/connectors \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "name": "Example connector", "url": "https://connector-example.com/search" }' "/v1/connectors/{id}": get: x-fern-audiences: - public summary: Get a Connector tags: - /connectors description: Retrieve a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. operationId: get-connector x-fern-sdk-method-name: get x-fern-sdk-group-name: connectors parameters: - name: id in: path required: true description: The ID of the connector to retrieve. schema: type: string x-fern-audiences: - public - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/GetConnectorResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Connectors.Get(context.TODO(), "connector_id") if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.connectors.get("test-id") print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.connectors.get("test-id") print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.types.GetConnectorResponse; public class ConnectorGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); GetConnectorResponse response = cohere.connectors().get("test-id"); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const connector = await cohere.connectors.get('connector-id'); console.log(connector); })(); - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/connectors/id \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" patch: x-fern-audiences: - public summary: Update a Connector tags: - /connectors operationId: update-connector x-fern-sdk-method-name: update x-fern-sdk-group-name: connectors description: Update a connector by ID. Omitted fields will not be updated. See ['Managing your Connector'](https://docs.cohere.com/docs/managing-your-connector) for more information. parameters: - name: id in: path required: true description: The ID of the connector to update. schema: type: string x-fern-audiences: - public - $ref: "#/components/parameters/RequestSource" requestBody: content: application/json: schema: $ref: "#/components/schemas/UpdateConnectorRequest" required: true responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UpdateConnectorResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Connectors.Update( context.TODO(), "connector_id", &cohere.UpdateConnectorRequest{ Name: cohere.String("Example connector renamed"), }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: > import cohere co = cohere.Client() response = co.connectors.update( connector_id="test-id", name="new name", url="https://example.com/search" ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.connectors.update( connector_id="test-id", name="new name", url="https://example.com/search" ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.connectors.requests.UpdateConnectorRequest; public class ConnectorPatch { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); cohere .connectors() .update( "test-id", UpdateConnectorRequest.builder() .name("new name") .url("https://connector-example.com/search") .build()); } } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const connector = await cohere.connectors.update(connector.id, { name: 'test-connector-renamed', description: 'A test connector renamed', }); console.log(connector); })(); - sdk: curl name: Curl code: |- curl --request PATCH \ --url https://api.cohere.com/v1/connectors/id \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "name": "new name", "url": "https://example.com/search" }' delete: x-fern-audiences: - public summary: Delete a Connector tags: - /connectors description: Delete a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information. operationId: delete-connector x-fern-sdk-method-name: delete x-fern-sdk-group-name: connectors parameters: - name: id description: The ID of the connector to delete. in: path required: true schema: type: string x-fern-audiences: - public - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/DeleteConnectorResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: > package main import ( "context" "log" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Connectors.Delete(context.TODO(), "connector_id") if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { await cohere.connectors.delete('connector-id'); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() co.connectors.delete("test-id") - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): await co.connectors.delete("test-id") asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; public class ConnectorDelete { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); cohere.connectors().delete("test-id"); } } - sdk: curl name: cURL code: |- curl --request DELETE \ --url https://api.cohere.com/v1/connectors/id \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" "/v1/connectors/{id}/oauth/authorize": post: x-fern-audiences: - public summary: Authorize with oAuth tags: - /connectors description: Authorize the connector with the given ID for the connector oauth app. See ['Connector Authentication'](https://docs.cohere.com/docs/connector-authentication) for more information. operationId: oAuthAuthorize-connector x-fern-sdk-method-name: oAuthAuthorize x-fern-sdk-group-name: connectors parameters: - name: id in: path required: true description: The ID of the connector to authorize. schema: type: string x-fern-audiences: - public - name: after_token_redirect in: query description: The URL to redirect to after the connector has been authorized. schema: type: string x-fern-audiences: - public - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/OAuthAuthorizeResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Connectors.OAuthAuthorize( context.TODO(), "connector_id", &cohere.ConnectorsOAuthAuthorizeRequest{ AfterTokenRedirect: cohere.String("https://test.com"), }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: > import cohere co = cohere.Client() response = co.connectors.o_auth_authorize( connector_id="test-id", after_token_redirect="https://test.com" ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.connectors.o_auth_authorize( connector_id="test-id", after_token_redirect="https://test.com" ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.connectors.requests.ConnectorsOAuthAuthorizeRequest; import com.cohere.api.types.OAuthAuthorizeResponse; public class ConnectorsIdOauthAuthorizePost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); OAuthAuthorizeResponse response = cohere .connectors() .oAuthAuthorize( "test-id", ConnectorsOAuthAuthorizeRequest.builder() .afterTokenRedirect("https://connector-example.com/search") .build()); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const connector = await cohere.connectors.oAuthAuthorize('connector-id', { redirect_uri: 'https://example.com/oauth/callback', }); console.log(connector); })(); - sdk: curl name: cURL code: >- curl --request POST \ --url https://api.cohere.com/v1/connectors/id/oauth/authorize \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" "/v1/models/{model}": get: summary: Get a Model tags: - /models operationId: get-model x-fern-sdk-method-name: get x-fern-sdk-group-name: models x-fern-audiences: - public description: Returns the details of a model, provided its name. parameters: - name: model in: path required: true schema: type: string x-fern-audiences: - public example: command-r - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/GetModelResponse" headers: X-API-Warning: schema: type: string x-fern-audiences: - public description: Warning description for incorrect usage of the API "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" /v1/models: get: x-fern-audiences: - public summary: List Models tags: - /models operationId: list-models x-fern-sdk-method-name: list x-fern-sdk-group-name: models description: Returns a list of models available for use. The list contains models from Cohere as well as your fine-tuned models. parameters: - name: page_size in: query description: |- Maximum number of models to include in a page Defaults to `20`, min value of `1`, max value of `1000`. schema: type: number x-fern-audiences: - public - name: page_token description: Page token provided in the `next_page_token` field of a previous response. in: query schema: type: string x-fern-audiences: - public - name: endpoint in: query description: When provided, filters the list of models to only those that are compatible with the specified endpoint. schema: $ref: "#/components/schemas/CompatibleEndpoint" x-fern-audiences: - public - name: default_only in: query description: When provided, filters the list of models to only the default model to the endpoint. This parameter is only valid when `endpoint` is provided. schema: type: boolean x-fern-audiences: - public responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/ListModelsResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" x-fern-examples: - code-samples: - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.models.list() print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.models.list() print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.types.ListModelsResponse; public class ModelsListGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListModelsResponse response = cohere.models().list(); System.out.println(response); } } - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/models \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const models = await cohere.models.list(); console.log(models); })(); - sdk: go name: Cohere Go SDK code: > package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Models.List(context.TODO(), &cohere.ModelsListRequest{}) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } /v1/check-api-key: post: parameters: - $ref: "#/components/parameters/RequestSource" x-fern-audiences: - public summary: Check API key operationId: checkAPIKey description: | Checks that the api key in the Authorization header is valid and active responses: "200": description: OK content: application/json: schema: type: object required: - valid properties: valid: type: boolean organization_id: type: string owner_id: type: string "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/RateLimit" "498": $ref: "#/components/responses/InvalidToken" "499": $ref: "#/components/responses/RequestCancelled" "500": $ref: "#/components/responses/InternalServerError" "501": $ref: "#/components/responses/NotImplemented" "503": $ref: "#/components/responses/ServiceUnavailable" "504": $ref: "#/components/responses/GatewayTimeout" /v1/finetuning/finetuned-models: get: summary: Lists fine-tuned models. operationId: ListFinetunedModels responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/ListFinetunedModelsResponse" example: finetuned_models: - id: fee37446-7fc7-42f9-a026-c6ba2fcc422d name: chat-ft creator_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 organization_id: 6bdca3d5-3eae-4de0-ac34-786d8063b7ee settings: base_model: name: medium version: 14.2.0 base_type: BASE_TYPE_CHAT strategy: STRATEGY_TFEW dataset_id: my-dataset-d701tr hyperparameters: early_stopping_patience: 6 early_stopping_threshold: 0.01 train_batch_size: 16 train_epochs: 1 learning_rate: 0.01 status: STATUS_READY created_at: 2024-01-17T20:11:42.907112Z updated_at: 2024-01-17T20:31:06.464015Z completed_at: 2024-01-17T20:31:05.047066Z - id: 9d927c5e-7598-4772-98b7-cdf2014e8874 name: rerank-ft creator_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 organization_id: 6bdca3d5-3eae-4de0-ac34-786d8063b7ee settings: base_model: name: english version: 2.0.0 base_type: BASE_TYPE_RERANK strategy: STRATEGY_VANILLA dataset_id: rerank-dataset-d820xf status: STATUS_READY created_at: 2024-01-17T20:17:16.997608Z updated_at: 2024-01-17T20:50:11.148769Z completed_at: 2024-01-17T20:42:55.821051Z "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" parameters: - name: page_size description: |- Maximum number of results to be returned by the server. If 0, defaults to 50. in: query required: false schema: type: integer format: int32 - name: page_token description: Request a specific page of the list results. in: query required: false schema: type: string - name: order_by description: |- Comma separated list of fields. For example: "created_at,name". The default sorting order is ascending. To specify descending order for a field, append " desc" to the field name. For example: "created_at desc,name". Supported sorting fields: - created_at (default) in: query required: false schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /finetuning x-fern-examples: - code-samples: - sdk: java name: Cohere java SDK code: > /* (C)2024 */ package finetuning; import com.cohere.api.Cohere; import com.cohere.api.resources.finetuning.finetuning.types.ListFinetunedModelsResponse; public class ListFinetunedModels { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListFinetunedModelsResponse response = cohere.finetuning().listFinetunedModels(); System.out.println(response); } } - sdk: go name: Cohere Go SDK code: > package main import ( "context" "log" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Finetuning.ListFinetunedModels(context.TODO(), nil) if err != nil { log.Fatal(err) } log.Printf("%+v", resp.FinetunedModels) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const finetunedModels = await cohere.finetuning.listFinetunedModels(); console.log(finetunedModels); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.finetuning.list_finetuned_models() print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.finetuning.list_finetuned_models() print(response) asyncio.run(main()) - sdk: curl name: cURL code: | curl --request GET \ --url https://api.cohere.com/v1/finetuning/finetuned-models \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" x-fern-sdk-group-name: finetuning x-fern-audiences: - public x-fern-request-name: FinetuningListFinetunedModelsRequest post: summary: Trains and deploys a fine-tuned model. operationId: CreateFinetunedModel responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/CreateFinetunedModelResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" tags: - /finetuning requestBody: description: Information about the fine-tuned model. Must contain name and settings. content: application/json: schema: $ref: "#/components/schemas/FinetunedModel" required: - finetuned_model example: name: api-test settings: base_model: base_type: BASE_TYPE_CHAT dataset_id: my-dataset-id required: true parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: java name: Cohere java SDK code: > /* (C)2024 */ package finetuning; import com.cohere.api.Cohere; import com.cohere.api.resources.finetuning.finetuning.types.*; public class CreateFinetunedModel { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); CreateFinetunedModelResponse response = cohere .finetuning() .createFinetunedModel( FinetunedModel.builder() .name("test-finetuned-model") .settings( Settings.builder() .baseModel( BaseModel.builder().baseType(BaseType.BASE_TYPE_CHAT).build()) .datasetId("my-dataset-id") .build()) .build()); System.out.println(response); } } - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" "github.com/cohere-ai/cohere-go/v2/client" "github.com/cohere-ai/cohere-go/v2/finetuning" ) func main() { co := client.NewClient() resp, err := co.Finetuning.CreateFinetunedModel( context.TODO(), &finetuning.FinetunedModel{ Name: "test-finetuned-model", Settings: &finetuning.Settings{ DatasetId: "my-dataset-id", BaseModel: &finetuning.BaseModel{ BaseType: finetuning.BaseTypeBaseTypeChat, }, }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp.FinetunedModel) } - sdk: typescript name: Cohere TypeScript SDK code: > const { Cohere, CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const finetunedModel = await cohere.finetuning.createFinetunedModel({ name: 'test-finetuned-model', settings: { base_model: { base_type: Cohere.Finetuning.BaseType.BaseTypeChat, }, dataset_id: 'test-dataset-id', }, }); console.log(finetunedModel); })(); - sdk: python name: Sync code: | from cohere.finetuning import ( BaseModel, FinetunedModel, Hyperparameters, Settings, WandbConfig, ) import cohere co = cohere.Client() hp = Hyperparameters( early_stopping_patience=10, early_stopping_threshold=0.001, train_batch_size=16, train_epoch=1, learning_rate=0.01, ) wnb_config = WandbConfig( project="test-project", api_key="<>", entity="test-entity", ) finetuned_model = co.finetuning.create_finetuned_model( request=FinetunedModel( name="test-finetuned-model", settings=Settings( base_model=BaseModel( base_type="BASE_TYPE_CHAT", ), dataset_id="my-dataset-id", hyperparameters=hp, wandb=wnb_config, ), ) ) print(finetuned_model) - sdk: python name: Async code: | from cohere.finetuning import ( BaseModel, FinetunedModel, Settings, ) import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.finetuning.create_finetuned_model( request=FinetunedModel( name="test-finetuned-model", settings=Settings( base_model=BaseModel( base_type="BASE_TYPE_CHAT", ), dataset_id="my-dataset-id", ), ) ) print(response) asyncio.run(main()) - sdk: curl name: cURL code: | curl --request POST \ --url https://api.cohere.com/v1/finetuning/finetuned-models \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "name": "test-finetuned-model", "settings": { "base_model": { "base_type": "BASE_TYPE_CHAT", }, "dataset_id": "test-dataset-id" } }' x-fern-sdk-group-name: finetuning x-fern-audiences: - public "/v1/finetuning/finetuned-models/{id}": patch: summary: Updates a fine-tuned model. operationId: UpdateFinetunedModel responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/UpdateFinetunedModelResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" parameters: - name: id description: FinetunedModel ID. in: path required: true schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /finetuning requestBody: description: Information about the fine-tuned model. Must contain name and settings. content: application/json: schema: type: object properties: name: type: string description: FinetunedModel name (e.g. `foobar`). creator_id: type: string description: User ID of the creator. readOnly: true organization_id: type: string description: Organization ID. readOnly: true settings: $ref: "#/components/schemas/Settings" description: FinetunedModel settings such as dataset, hyperparameters... status: $ref: "#/components/schemas/Status" description: Current stage in the life-cycle of the fine-tuned model. readOnly: true created_at: type: string format: date-time description: Creation timestamp. readOnly: true updated_at: type: string format: date-time description: Latest update timestamp. readOnly: true completed_at: type: string format: date-time description: Timestamp for the completed fine-tuning. readOnly: true last_used: type: string format: date-time description: Timestamp for the latest request to this fine-tuned model. readOnly: true title: Information about the fine-tuned model. Must contain name and settings. required: - name - settings required: true x-fern-examples: - code-samples: - sdk: java name: Cohere java SDK code: > /* (C)2024 */ package finetuning; import com.cohere.api.Cohere; import com.cohere.api.resources.finetuning.finetuning.types.BaseModel; import com.cohere.api.resources.finetuning.finetuning.types.BaseType; import com.cohere.api.resources.finetuning.finetuning.types.Settings; import com.cohere.api.resources.finetuning.finetuning.types.UpdateFinetunedModelResponse; import com.cohere.api.resources.finetuning.requests.FinetuningUpdateFinetunedModelRequest; public class UpdateFinetunedModel { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); UpdateFinetunedModelResponse response = cohere .finetuning() .updateFinetunedModel( "test-id", FinetuningUpdateFinetunedModelRequest.builder() .name("new name") .settings( Settings.builder() .baseModel( BaseModel.builder().baseType(BaseType.BASE_TYPE_CHAT).build()) .datasetId("my-dataset-id") .build()) .build()); System.out.println(response); } } - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" cohere "github.com/cohere-ai/cohere-go/v2" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Finetuning.UpdateFinetunedModel( context.TODO(), "test-id", &cohere.FinetuningUpdateFinetunedModelRequest{ Name: "new-name", }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp.FinetunedModel) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const finetunedModel = await cohere.finetuning.updateFinetunedModel('test-id', { name: 'new name', }); console.log(finetunedModel); })(); - sdk: python name: Sync code: | from cohere.finetuning import ( BaseModel, Settings, ) import cohere co = cohere.Client() finetuned_model = co.finetuning.update_finetuned_model( id="test-id", name="new name", settings=Settings( base_model=BaseModel( base_type="BASE_TYPE_CHAT", ), dataset_id="my-dataset-id", ), ) print(finetuned_model) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.finetuning.update_finetuned_model(id="test-id", name="new name") print(response) asyncio.run(main()) - sdk: curl name: cURL code: > curl --request PATCH \ --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: bearer $CO_API_KEY" \ --data '{ "name": "new name" }' x-fern-sdk-group-name: finetuning x-fern-audiences: - public x-fern-request-name: FinetuningUpdateFinetunedModelRequest get: summary: Returns a fine-tuned model by ID. operationId: GetFinetunedModel responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/GetFinetunedModelResponse" example: finetuned_model: id: fee37446-7fc7-42f9-a026-c6ba2fcc422d name: chat-ft creator_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 organization_id: 6bdca3d5-3eae-4de0-ac34-786d8063b7ee settings: base_model: name: medium version: 14.2.0 base_type: BASE_TYPE_CHAT strategy: STRATEGY_TFEW dataset_id: my-dataset-d701tr hyperparameters: early_stopping_patience: 6 early_stopping_threshold: 0.01 train_batch_size: 16 train_epochs: 1 learning_rate: 0.01 status: STATUS_READY created_at: 2024-01-17T20:11:42.907112Z updated_at: 2024-01-17T20:31:06.464015Z completed_at: 2024-01-17T20:31:05.047066Z "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" parameters: - name: id description: The fine-tuned model ID. in: path required: true schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /finetuning x-fern-examples: - code-samples: - sdk: java name: Cohere java SDK code: > /* (C)2024 */ package finetuning; import com.cohere.api.Cohere; import com.cohere.api.resources.finetuning.finetuning.types.GetFinetunedModelResponse; public class GetFinetunedModel { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); GetFinetunedModelResponse response = cohere.finetuning().getFinetunedModel("test-id"); System.out.println(response); } } - sdk: go name: Cohere Go SDK code: > package main import ( "context" "log" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Finetuning.GetFinetunedModel(context.TODO(), "test-id") if err != nil { log.Fatal(err) } log.Printf("%+v", resp.FinetunedModel) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const finetunedModel = await cohere.finetuning.getFinetunedModel('test-id'); console.log(finetunedModel); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.finetuning.get_finetuned_model("test-id") print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.finetuning.get_finetuned_model("test-id") print(response) asyncio.run(main()) - sdk: curl name: cURL code: > curl --request GET \ --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" x-fern-sdk-group-name: finetuning x-fern-audiences: - public x-fern-request-name: FinetuningGetFinetunedModelRequest delete: summary: Deletes a fine-tuned model. operationId: DeleteFinetunedModel responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/DeleteFinetunedModelResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" parameters: - name: id description: The fine-tuned model ID. in: path required: true schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /finetuning x-fern-examples: - code-samples: - sdk: java name: Cohere java SDK code: > /* (C)2024 */ package finetuning; import com.cohere.api.Cohere; public class DeleteFinetunedModel { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); cohere.finetuning().deleteFinetunedModel("test-id"); } } - sdk: go name: Cohere Go SDK code: > package main import ( "context" "log" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() _, err := co.Finetuning.DeleteFinetunedModel(context.TODO(), "test-id") if err != nil { log.Fatal(err) } } - sdk: typescript name: Cohere TypeScript SDK code: | const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { await cohere.finetuning.deleteFinetunedModel('test-id'); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() co.finetuning.delete_finetuned_model("test-id") - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): await co.finetuning.delete_finetuned_model("test-id") asyncio.run(main()) - sdk: curl name: cURL code: > curl --request DELETE \ --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" x-fern-sdk-group-name: finetuning x-fern-audiences: - public "/v1/finetuning/finetuned-models/{finetuned_model_id}/events": get: summary: Retrieves the chronology of statuses the fine-tuned model has been through. operationId: ListEvents responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/ListEventsResponse" example: events: - user_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 status: STATUS_QUEUED created_at: 2024-01-17T20:11:45.267960Z - user_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 status: STATUS_FINETUNING created_at: 2024-01-17T20:11:46.000862Z - user_id: 7a317d97-4d05-427d-9396-f31b9fb92c55 status: STATUS_DEPLOYING_API created_at: 2024-01-17T20:31:05.047066Z - status: STATUS_READY created_at: 2024-01-17T20:31:06.988655Z total_size: 5 "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" parameters: - name: finetuned_model_id description: The parent fine-tuned model ID. in: path required: true schema: type: string - name: page_size description: |- Maximum number of results to be returned by the server. If 0, defaults to 50. in: query required: false schema: type: integer format: int32 - name: page_token description: Request a specific page of the list results. in: query required: false schema: type: string - name: order_by description: |- Comma separated list of fields. For example: "created_at,name". The default sorting order is ascending. To specify descending order for a field, append " desc" to the field name. For example: "created_at desc,name". Supported sorting fields: - created_at (default) in: query required: false schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /finetuning x-fern-examples: - code-samples: - sdk: java name: Cohere java SDK code: > /* (C)2024 */ package finetuning; import com.cohere.api.Cohere; import com.cohere.api.resources.finetuning.finetuning.types.ListEventsResponse; public class ListEvents { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListEventsResponse response = cohere.finetuning().listEvents("test-id"); System.out.println(response); } } - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Finetuning.ListEvents( context.TODO(), "test-finetuned-model-id", nil, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp.Events) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const events = await cohere.finetuning.listEvents('test-finetuned-model-id'); console.log(events); })(); - sdk: python name: Sync code: > import cohere co = cohere.Client() response = co.finetuning.list_events(finetuned_model_id="test-id") print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.finetuning.list_events(finetuned_model_id="test-id") print(response) asyncio.run(main()) - sdk: curl name: cURL code: > curl --request GET \ --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id/events \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" x-fern-sdk-group-name: finetuning x-fern-audiences: - public x-fern-request-name: FinetuningListEventsRequest "/v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics": get: summary: Retrieves metrics measured during the training of a fine-tuned model. operationId: ListTrainingStepMetrics responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/ListTrainingStepMetricsResponse" example: step_metrics: - created_at: 2024-01-17T20:24:26.952802658Z metrics: accuracy: 0.4557601809501648 cross_entropy: 4.264331340789795 generation_accuracy: 0.4557601809501648 generation_cross_entropy: 4.264331340789795 step: 0 - created_at: 2024-01-17T20:25:19.331940174Z step_number: 9 metrics: accuracy: 0.7393720149993896 cross_entropy: 0.7702581286430359 generation_accuracy: 0.7393720149993896 generation_cross_entropy: 0.7702581286430359 step: 9 "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/Error" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/Error" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/Error" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/Error" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/Error" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/Error" parameters: - name: finetuned_model_id description: The parent fine-tuned model ID. in: path required: true schema: type: string - name: page_size description: |- Maximum number of results to be returned by the server. If 0, defaults to 50. in: query required: false schema: type: integer format: int32 - name: page_token description: Request a specific page of the list results. in: query required: false schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /finetuning x-fern-examples: - code-samples: - sdk: java name: Cohere java SDK code: > /* (C)2024 */ package finetuning; import com.cohere.api.Cohere; import com.cohere.api.resources.finetuning.finetuning.types.ListTrainingStepMetricsResponse; public class ListTrainingStepMetrics { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListTrainingStepMetricsResponse response = cohere.finetuning().listTrainingStepMetrics("test-id"); System.out.println(response); } } - sdk: go name: Cohere Go SDK code: | package main import ( "context" "log" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient() resp, err := co.Finetuning.ListTrainingStepMetrics( context.TODO(), "test-finetuned-model-id", nil, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp.StepMetrics) } - sdk: typescript name: Cohere TypeScript SDK code: > const { CohereClient } = require('cohere-ai'); const cohere = new CohereClient({}); (async () => { const trainingStepMetrics = await cohere.finetuning.listTrainingStepMetrics( 'test-finetuned-model-id' ); console.log(trainingStepMetrics); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() train_step_metrics = co.finetuning.list_training_step_metrics( finetuned_model_id="test-id" ) print(train_step_metrics) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.finetuning.list_train_step_metrics(finetuned_model_id="test-id") print(response) asyncio.run(main()) - sdk: curl name: cURL code: > curl --request GET \ --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id/training-step-metrics \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" x-fern-sdk-group-name: finetuning x-fern-audiences: - public x-fern-request-name: FinetuningListTrainingStepMetricsRequest components: securitySchemes: bearerAuth: type: http x-fern-audiences: - public scheme: bearer x-fern-bearer: env: CO_API_KEY parameters: RequestSource: name: X-Client-Name description: | The name of the project that is making the request. x-fern-audiences: - public schema: type: string in: header required: false example: my-cool-project schemas: ChatRole: type: string description: | One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from. enum: - CHATBOT - SYSTEM - USER - TOOL ToolCall: description: | Contains the tool calls generated by the model. Use it to invoke your tools. type: object required: - name - parameters properties: name: x-fern-audiences: - public description: Name of the tool to call. type: string parameters: x-fern-audiences: - public description: The name and value of the parameters to use when invoking a tool. type: object additionalProperties: true ChatMessage: description: | Represents a single message in the chat history, excluding the current user turn. It has two properties: `role` and `message`. The `role` identifies the sender (`CHATBOT`, `SYSTEM`, or `USER`), while the `message` contains the text content. The chat_history parameter should not be used for `SYSTEM` messages in most cases. Instead, to add a `SYSTEM` role message at the beginning of a conversation, the `preamble` parameter should be used. required: - role - message properties: role: $ref: "#/components/schemas/ChatRole" x-fern-audiences: - public message: type: string description: | Contents of the chat message. minLength: 1 x-fern-audiences: - public tool_calls: x-fern-audiences: - public type: array items: $ref: "#/components/schemas/ToolCall" ToolResult: type: object required: - call - outputs properties: call: $ref: "#/components/schemas/ToolCall" outputs: type: array minItems: 0 items: type: object additionalProperties: true ToolMessage: description: | Represents tool result in the chat history. required: - role properties: role: $ref: "#/components/schemas/ChatRole" tool_results: type: array items: $ref: "#/components/schemas/ToolResult" Message: oneOf: - $ref: "#/components/schemas/ChatMessage" - $ref: "#/components/schemas/ToolMessage" discriminator: propertyName: role mapping: CHATBOT: "#/components/schemas/ChatMessage" SYSTEM: "#/components/schemas/ChatMessage" USER: "#/components/schemas/ChatMessage" TOOL: "#/components/schemas/ToolMessage" ChatConnector: description: | The connector used for fetching documents. type: object required: - id properties: id: description: | The identifier of the connector. type: string x-fern-audiences: - public minLength: 1 user_access_token: description: | When specified, this user access token will be passed to the connector in the Authorization header instead of the Cohere generated one. type: string x-fern-audiences: - public continue_on_failure: description: | Defaults to `false`. When `true`, the request will continue if this connector returned an error. type: boolean x-fern-audiences: - public options: description: | Provides the connector with different settings at request time. The key/value pairs of this object are specific to each connector. For example, the connector `web-search` supports the `site` option, which limits search results to the specified domain. type: object x-fern-audiences: - public ChatDocument: description: | Relevant information that could be used by the model to generate a more accurate reply. The contents of each document are generally short (under 300 words), and are passed in the form of a dictionary of strings. Some suggested keys are "text", "author", "date". Both the key name and the value will be passed to the model. type: object properties: id: description: Unique identifier for this document. type: string x-fern-audiences: - public additionalProperties: type: string x-fern-audiences: - public x-fern-type: map Tool: type: object required: - name - description properties: name: type: string description: | The name of the tool to be called. Valid names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit. description: description: | The description of what the tool does, the model uses the description to choose when and how to call the function. type: string parameter_definitions: description: | The input parameters of the tool. Accepts a dictionary where the key is the name of the parameter and the value is the parameter spec. Valid parameter names contain only the characters `a-z`, `A-Z`, `0-9`, `_` and must not begin with a digit. ``` { "my_param": { "description": , "type": , // any python data type, such as 'str', 'bool' "required": } } ``` type: object additionalProperties: type: object required: - type properties: description: description: | The description of the parameter. type: string type: description: | The type of the parameter. Must be a valid Python type. type: string required: description: | Denotes whether the parameter is always present (required) or not. Defaults to not required. type: boolean default: false ResponseFormatType: x-fern-audiences: - public description: | Defaults to `"text"`. When set to `"json_object"`, the model's output will be a valid JSON Object. type: string enum: - text - json_object TextResponseFormat: x-fern-audiences: - public title: Text Response type: object properties: type: $ref: "#/components/schemas/ResponseFormatType" required: - type JSONResponseFormat: x-fern-audiences: - public title: JSON Object Response type: object properties: type: $ref: "#/components/schemas/ResponseFormatType" schema: x-fern-availability: beta description: | A JSON schema object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](https://docs.cohere.com/docs/structured-outputs-json#schema-constraints) for more information. Example (required name and age object): ```json { "type": "object", "properties": { "name": {"type": "string"}, "age": {"type": "integer"} }, "required": ["name", "age"] } ``` **Note**: This field must not be specified when the `type` is set to `"text"`. type: object required: - type ResponseFormat: description: | Configuration for forcing the model output to adhere to the specified format. Supported on [Command R 03-2024](https://docs.cohere.com/docs/command-r), [Command R+ 04-2024](https://docs.cohere.com/docs/command-r-plus) and newer models. The model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ "type": "json_object" }`. A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure. **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length. **Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided). oneOf: - $ref: "#/components/schemas/TextResponseFormat" - $ref: "#/components/schemas/JSONResponseFormat" discriminator: propertyName: type mapping: text: "#/components/schemas/TextResponseFormat" json_object: "#/components/schemas/JSONResponseFormat" ChatCitation: description: | A section of the generated reply which cites external knowledge. required: - start - end - text - document_ids properties: start: description: | The index of text that the citation starts at, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have a start value of `7`. This is because the citation starts at `w`, which is the seventh character. type: integer x-fern-audiences: - public end: description: | The index of text that the citation ends after, counting from zero. For example, a generation of `Hello, world!` with a citation on `world` would have an end value of `11`. This is because the citation ends after `d`, which is the eleventh character. type: integer x-fern-audiences: - public text: description: | The text of the citation. For example, a generation of `Hello, world!` with a citation of `world` would have a text value of `world`. type: string x-fern-audiences: - public minLength: 1 document_ids: description: | Identifiers of documents cited by this section of the generated reply. type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public minItems: 1 ChatSearchQuery: description: | The generated search query. Contains the text of the query and a unique identifier for the query. type: object required: - text - generation_id properties: text: description: | The text of the search query. type: string x-fern-audiences: - public generation_id: description: | Unique identifier for the generated search query. Useful for submitting feedback. type: string x-fern-audiences: - public format: uuid ChatSearchResultConnector: description: | The connector used for fetching documents. type: object required: - id properties: id: description: | The identifier of the connector. type: string x-fern-audiences: - public minLength: 1 ChatSearchResult: type: object required: - connector - document_ids properties: search_query: $ref: "#/components/schemas/ChatSearchQuery" x-fern-audiences: - public connector: description: | The connector from which this result comes from. $ref: "#/components/schemas/ChatSearchResultConnector" x-fern-audiences: - public document_ids: description: | Identifiers of documents found by this search query. type: array x-fern-audiences: - public minLength: 0 items: type: string x-fern-audiences: - public minLength: 1 error_message: description: | An error message if the search failed. type: string x-fern-audiences: - public continue_on_failure: description: | Whether a chat request should continue or not if the request to this connector fails. type: boolean x-fern-audiences: - public FinishReason: type: string enum: - COMPLETE - STOP_SEQUENCE - ERROR - ERROR_TOXIC - ERROR_LIMIT - USER_CANCEL - MAX_TOKENS ApiMeta: type: object properties: api_version: type: object x-fern-audiences: - public properties: version: type: string x-fern-audiences: - public is_deprecated: type: boolean x-fern-audiences: - public is_experimental: type: boolean x-fern-audiences: - public required: - version billed_units: type: object x-fern-audiences: - public properties: images: type: number x-fern-audiences: - public description: | The number of billed images. input_tokens: type: number x-fern-audiences: - public description: | The number of billed input tokens. output_tokens: type: number x-fern-audiences: - public description: | The number of billed output tokens. search_units: type: number x-fern-audiences: - public description: | The number of billed search units. classifications: type: number x-fern-audiences: - public description: | The number of billed classifications units. tokens: type: object x-fern-audiences: - public properties: input_tokens: type: number x-fern-audiences: - public description: | The number of tokens used as input to the model. output_tokens: type: number x-fern-audiences: - public description: | The number of tokens produced by the model. warnings: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public NonStreamedChatResponse: required: - text x-fern-type-name: NonStreamedChatResponse properties: text: type: string x-fern-audiences: - public minLength: 1 description: Contents of the reply generated by the model. generation_id: type: string x-fern-audiences: - public format: uuid description: Unique identifier for the generated reply. Useful for submitting feedback. response_id: type: string x-fern-audiences: - public format: uuid description: Unique identifier for the response. citations: type: array x-fern-audiences: - public minItems: 0 description: Inline citations for the generated reply. items: $ref: "#/components/schemas/ChatCitation" documents: type: array x-fern-audiences: - public minItems: 0 description: Documents seen by the model when generating the reply. items: $ref: "#/components/schemas/ChatDocument" is_search_required: type: boolean x-fern-audiences: - public description: Denotes that a search for documents is required during the RAG flow. search_queries: type: array x-fern-audiences: - public description: Generated search queries, meant to be used as part of the RAG flow. items: $ref: "#/components/schemas/ChatSearchQuery" search_results: type: array x-fern-audiences: - public minItems: 0 description: Documents retrieved from each of the conducted searches. items: $ref: "#/components/schemas/ChatSearchResult" finish_reason: x-fern-audiences: - public $ref: "#/components/schemas/FinishReason" tool_calls: x-fern-audiences: - public type: array items: $ref: "#/components/schemas/ToolCall" chat_history: type: array x-fern-audiences: - public minItems: 0 items: $ref: "#/components/schemas/Message" description: | A list of previous messages between the user and the model, meant to give the model conversational context for responding to the user's `message`. meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public ChatStreamEvent: required: - event_type properties: event_type: type: string x-fern-audiences: - public enum: - stream-start - search-queries-generation - search-results - text-generation - citation-generation - stream-end - debug ChatStreamStartEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object required: - generation_id properties: generation_id: description: | Unique identifier for the generated reply. Useful for submitting feedback. type: string x-fern-audiences: - public format: uuid minLength: 1 ChatSearchQueriesGenerationEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object required: - search_queries properties: search_queries: type: array x-fern-audiences: - public description: Generated search queries, meant to be used as part of the RAG flow. items: $ref: "#/components/schemas/ChatSearchQuery" ChatSearchResultsEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object properties: search_results: description: | Conducted searches and the ids of documents retrieved from each of them. type: array x-fern-audiences: - public minItems: 0 items: $ref: "#/components/schemas/ChatSearchResult" documents: description: | Documents fetched from searches or provided by the user. type: array x-fern-audiences: - public minItems: 0 items: $ref: "#/components/schemas/ChatDocument" ChatTextGenerationEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object required: - text properties: text: description: | The next batch of text generated by the model. type: string x-fern-audiences: - public minLength: 1 ChatCitationGenerationEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object required: - citations properties: citations: description: | Citations for the generated reply. type: array x-fern-audiences: - public items: $ref: "#/components/schemas/ChatCitation" ChatToolCallsGenerationEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object required: - tool_calls properties: text: description: | The text generated related to the tool calls generated type: string x-fern-audiences: - public tool_calls: x-fern-audiences: - public type: array items: $ref: "#/components/schemas/ToolCall" ChatStreamEndEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object required: - finish_reason - response properties: finish_reason: description: | - `COMPLETE` - the model sent back a finished reply - `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length - `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter - `ERROR` - something went wrong when generating the reply - `ERROR_TOXIC` - the model generated a reply that was deemed toxic type: string x-fern-audiences: - public enum: - COMPLETE - ERROR_LIMIT - MAX_TOKENS - ERROR - ERROR_TOXIC response: x-fern-audiences: - public description: | The consolidated response from the model. Contains the generated reply and all the other information streamed back in the previous events. $ref: "#/components/schemas/NonStreamedChatResponse" ToolCallDelta: description: | Contains the chunk of the tool call generation in the stream. type: object properties: name: description: | Name of the tool call type: string x-fern-audiences: - public index: description: | Index of the tool call generated type: number x-fern-audiences: - public parameters: description: | Chunk of the tool parameters type: string x-fern-audiences: - public text: description: | Chunk of the tool plan text type: string x-fern-audiences: - public ChatToolCallsChunkEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object required: - tool_call_delta properties: tool_call_delta: $ref: "#/components/schemas/ToolCallDelta" x-fern-audiences: - public text: type: string x-fern-audiences: - public ChatDebugEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object properties: prompt: type: string x-fern-audiences: - public StreamedChatResponse: description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). x-fern-type-name: StreamedChatResponse oneOf: - $ref: "#/components/schemas/ChatStreamStartEvent" - $ref: "#/components/schemas/ChatSearchQueriesGenerationEvent" - $ref: "#/components/schemas/ChatSearchResultsEvent" - $ref: "#/components/schemas/ChatTextGenerationEvent" - $ref: "#/components/schemas/ChatCitationGenerationEvent" - $ref: "#/components/schemas/ChatToolCallsGenerationEvent" - $ref: "#/components/schemas/ChatStreamEndEvent" - $ref: "#/components/schemas/ChatToolCallsChunkEvent" - $ref: "#/components/schemas/ChatDebugEvent" discriminator: propertyName: event_type mapping: stream-start: "#/components/schemas/ChatStreamStartEvent" search-queries-generation: "#/components/schemas/ChatSearchQueriesGenerationEvent" search-results: "#/components/schemas/ChatSearchResultsEvent" text-generation: "#/components/schemas/ChatTextGenerationEvent" citation-generation: "#/components/schemas/ChatCitationGenerationEvent" tool-calls-generation: "#/components/schemas/ChatToolCallsGenerationEvent" stream-end: "#/components/schemas/ChatStreamEndEvent" tool-calls-chunk: "#/components/schemas/ChatToolCallsChunkEvent" debug: "#/components/schemas/ChatDebugEvent" TextContent: type: object description: Text content of the message. required: - type - text properties: type: type: string enum: - text text: type: string Content: description: A Content block which contains information about the content type and the content itself. oneOf: - $ref: "#/components/schemas/TextContent" discriminator: propertyName: type mapping: text: "#/components/schemas/TextContent" UserMessage: type: object title: User Message description: A message from the user. required: - role - content properties: role: type: string enum: - user content: description: | The content of the message. This can be a string or a list of content blocks. If a string is provided, it will be treated as a text content block. oneOf: - type: string - type: array items: $ref: "#/components/schemas/Content" ToolCallV2: description: An array of tool calls to be made. type: object properties: id: type: string type: type: string enum: - function function: type: object properties: name: type: string arguments: type: string ToolSource: type: object title: Tool Output properties: id: type: string description: The unique identifier of the document tool_output: type: object additionalProperties: true DocumentSource: type: object description: A document source object containing the unique identifier of the document and the document itself. properties: id: type: string description: The unique identifier of the document document: type: object additionalProperties: true Source: description: A source object containing information about the source of the data cited. oneOf: - $ref: "#/components/schemas/ToolSource" - $ref: "#/components/schemas/DocumentSource" discriminator: propertyName: type mapping: tool: "#/components/schemas/ToolSource" document: "#/components/schemas/DocumentSource" Citation: type: object description: Citation information containing sources and the text cited. properties: start: type: integer description: Start index of the cited snippet in the original source text. end: type: integer description: End index of the cited snippet in the original source text. text: type: string description: Text snippet that is being cited. sources: type: array items: $ref: "#/components/schemas/Source" AssistantMessage: type: object title: Assistant Message description: A message from the assistant role can contain text and tool call information. required: - role properties: role: type: string enum: - assistant tool_calls: type: array items: $ref: "#/components/schemas/ToolCallV2" tool_plan: type: string description: A chain-of-thought style reflection and plan that the model generates when working with Tools. content: oneOf: - type: string - type: array items: oneOf: - $ref: "#/components/schemas/TextContent" discriminator: propertyName: type mapping: text: "#/components/schemas/TextContent" citations: type: array items: $ref: "#/components/schemas/Citation" SystemMessage: type: object title: System Message description: A message from the system. required: - role - content properties: role: type: string enum: - system content: oneOf: - type: string - type: array items: oneOf: - $ref: "#/components/schemas/TextContent" discriminator: propertyName: type mapping: text: "#/components/schemas/TextContent" Document: type: object description: | Relevant information that could be used by the model to generate a more accurate reply. The content of each document are generally short (should be under 300 words). Metadata should be used to provide additional information, both the key name and the value will be passed to the model. properties: data: type: object x-fern-type: map additionalProperties: type: string description: | A relevant documents that the model can cite to generate a more accurate reply. Each document is a string-string dictionary. id: type: string description: Unique identifier for this document which will be referenced in citations. If not provided an ID will be automatically generated. required: - data DocumentContent: type: object description: Document content. required: - type - document properties: type: type: string enum: - document document: $ref: "#/components/schemas/Document" ToolContent: description: A content block which contains information about the content of a tool result oneOf: - $ref: "#/components/schemas/TextContent" - $ref: "#/components/schemas/DocumentContent" discriminator: propertyName: type mapping: text: "#/components/schemas/TextContent" document: "#/components/schemas/DocumentContent" ToolMessageV2: type: object title: Tool Message description: A message with Tool outputs. required: - role - tool_call_id - content properties: role: type: string enum: - tool tool_call_id: type: string description: The id of the associated tool call that has provided the given content content: description: Outputs from a tool. The content should formatted as a JSON object string, or a list of tool content blocks oneOf: - type: string - type: array items: $ref: "#/components/schemas/ToolContent" ChatMessageV2: description: Represents a single message in the chat history from a given role. oneOf: - $ref: "#/components/schemas/UserMessage" - $ref: "#/components/schemas/AssistantMessage" - $ref: "#/components/schemas/SystemMessage" - $ref: "#/components/schemas/ToolMessageV2" discriminator: propertyName: role mapping: user: "#/components/schemas/UserMessage" assistant: "#/components/schemas/AssistantMessage" system: "#/components/schemas/SystemMessage" tool: "#/components/schemas/ToolMessageV2" ChatMessages: type: array description: | A list of chat messages in chronological order, representing a conversation between the user and the model. Messages can be from `User`, `Assistant`, `Tool` and `System` roles. Learn more about messages and roles in [the Chat API guide](https://docs.cohere.com/v2/docs/chat-api). items: $ref: "#/components/schemas/ChatMessageV2" ToolV2: type: object properties: type: type: string enum: - function function: type: object description: The function to be executed. properties: name: type: string description: The name of the function. description: type: string description: The description of the function. parameters: type: object description: The parameters of the function as a JSON schema. CitationOptions: type: object description: Options for controlling citation generation. properties: mode: type: string enum: - FAST - ACCURATE - OFF description: | Defaults to `"accurate"`. Dictates the approach taken to generating citations as part of the RAG flow by allowing the user to specify whether they want `"accurate"` results, `"fast"` results or no results. ResponseFormatTypeV2: x-fern-audiences: - public description: | Defaults to `"text"`. When set to `"json_object"`, the model's output will be a valid JSON Object. type: string enum: - text - json_object TextResponseFormatV2: x-fern-audiences: - public type: object properties: type: $ref: "#/components/schemas/ResponseFormatTypeV2" required: - type JsonResponseFormatV2: x-fern-audiences: - public type: object properties: type: $ref: "#/components/schemas/ResponseFormatTypeV2" json_schema: description: | A [JSON schema](https://json-schema.org/overview/what-is-jsonschema) object that the output will adhere to. There are some restrictions we have on the schema, refer to [our guide](https://docs.cohere.com/docs/structured-outputs-json#schema-constraints) for more information. Example (required name and age object): ```json { "type": "object", "properties": { "name": {"type": "string"}, "age": {"type": "integer"} }, "required": ["name", "age"] } ``` **Note**: This field must not be specified when the `type` is set to `"text"`. type: object required: - type ResponseFormatV2: description: | Configuration for forcing the model output to adhere to the specified format. Supported on [Command R](https://docs.cohere.com/v2/docs/command-r), [Command R+](https://docs.cohere.com/v2/docs/command-r-plus) and newer models. The model can be forced into outputting JSON objects by setting `{ "type": "json_object" }`. A [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure. **Note**: When using `{ "type": "json_object" }` your `message` should always explicitly instruct the model to generate a JSON (eg: _"Generate a JSON ..."_) . Otherwise the model may end up getting stuck generating an infinite stream of characters and eventually run out of context length. **Note**: When `json_schema` is not specified, the generated object can have up to 5 layers of nesting. **Limitation**: The parameter is not supported when used in combinations with the `documents` or `tools` parameters. oneOf: - $ref: "#/components/schemas/TextResponseFormatV2" - $ref: "#/components/schemas/JsonResponseFormatV2" discriminator: propertyName: type mapping: text: "#/components/schemas/TextResponseFormatV2" json_object: "#/components/schemas/JsonResponseFormatV2" ChatFinishReason: description: | The reason a chat request has finished. - **complete**: The model finished sending a complete message. - **max_tokens**: The number of generated tokens exceeded the model's context length or the value specified via the `max_tokens` parameter. - **stop_sequence**: One of the provided `stop_sequence` entries was reached in the model's generation. - **tool_call**: The model generated a Tool Call and is expecting a Tool Message in return - **error**: The generation failed due to an internal error type: string enum: - COMPLETE - STOP_SEQUENCE - MAX_TOKENS - TOOL_CALL - ERROR AssistantMessageResponse: type: object description: A message from the assistant role can contain text and tool call information. required: - role properties: role: type: string enum: - assistant tool_calls: type: array items: $ref: "#/components/schemas/ToolCallV2" tool_plan: type: string description: A chain-of-thought style reflection and plan that the model generates when working with Tools. content: type: array items: oneOf: - $ref: "#/components/schemas/TextContent" discriminator: propertyName: type mapping: text: "#/components/schemas/TextContent" citations: type: array items: $ref: "#/components/schemas/Citation" Usage: type: object properties: billed_units: type: object properties: input_tokens: type: number description: | The number of billed input tokens. output_tokens: type: number description: | The number of billed output tokens. search_units: type: number description: | The number of billed search units. classifications: type: number description: | The number of billed classifications units. tokens: type: object properties: input_tokens: type: number description: | The number of tokens used as input to the model. output_tokens: type: number description: | The number of tokens produced by the model. LogprobItem: type: object required: - token - token_ids - logprob properties: text: type: string description: The text chunk for which the log probabilities was calculated. token_ids: type: array description: The token ids of each token used to construct the text chunk. items: type: integer logprobs: type: array description: The log probability of each token used to construct the text chunk. items: type: number format: float ChatResponse: required: - id - finish_reason - message properties: id: type: string description: Unique identifier for the generated reply. Useful for submitting feedback. finish_reason: $ref: "#/components/schemas/ChatFinishReason" message: $ref: "#/components/schemas/AssistantMessageResponse" usage: $ref: "#/components/schemas/Usage" logprobs: type: array items: $ref: "#/components/schemas/LogprobItem" ChatStreamEventType: description: The streamed event types required: - type properties: type: type: string enum: - message-start - content-start - content-delta - content-end - tool-call-start - tool-call-delta - tool-call-end - tool-plan-delta - citation-start - citation-end - message-end ChatMessageStartEvent: description: A streamed event which signifies that a stream has started. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: id: type: string description: Unique identifier for the generated reply. delta: type: object properties: message: type: object properties: role: type: string description: The role of the message. enum: - assistant ChatContentStartEvent: description: A streamed delta event which signifies that a new content block has started. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer delta: type: object properties: message: type: object properties: content: type: object properties: text: type: string type: type: string enum: - text ChatContentDeltaEvent: description: A streamed delta event which contains a delta of chat text content. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer delta: type: object properties: message: type: object properties: content: type: object properties: text: type: string logprobs: $ref: "#/components/schemas/LogprobItem" ChatContentEndEvent: description: A streamed delta event which signifies that the content block has ended. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer ChatToolPlanDeltaEvent: description: A streamed event which contains a delta of tool plan text. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: delta: type: object properties: tool_plan: type: string ChatToolCallStartEvent: description: A streamed event delta which signifies a tool call has started streaming. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer delta: type: object properties: tool_call: type: object properties: id: type: string type: type: string enum: - function function: type: object properties: name: type: string arguments: type: string ChatToolCallDeltaEvent: description: A streamed event delta which signifies a delta in tool call arguments. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer delta: type: object properties: tool_call: type: object properties: function: type: object properties: arguments: type: string ChatToolCallEndEvent: description: A streamed event delta which signifies a tool call has finished streaming. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer CitationStartEvent: description: A streamed event which signifies a citation has been created. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer delta: type: object properties: message: type: object properties: citations: $ref: "#/components/schemas/Citation" CitationEndEvent: description: A streamed event which signifies a citation has finished streaming. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer ChatMessageEndEvent: description: A streamed event which signifies that the chat message has ended. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: id: type: string delta: type: object properties: finish_reason: $ref: "#/components/schemas/ChatFinishReason" usage: $ref: "#/components/schemas/Usage" StreamedChatResponseV2: description: StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request). oneOf: - $ref: "#/components/schemas/ChatMessageStartEvent" - $ref: "#/components/schemas/ChatContentStartEvent" - $ref: "#/components/schemas/ChatContentDeltaEvent" - $ref: "#/components/schemas/ChatContentEndEvent" - $ref: "#/components/schemas/ChatToolPlanDeltaEvent" - $ref: "#/components/schemas/ChatToolCallStartEvent" - $ref: "#/components/schemas/ChatToolCallDeltaEvent" - $ref: "#/components/schemas/ChatToolCallEndEvent" - $ref: "#/components/schemas/ChatMessageEndEvent" discriminator: propertyName: type mapping: message-start: "#/components/schemas/ChatMessageStartEvent" content-start: "#/components/schemas/ChatContentStartEvent" content-delta: "#/components/schemas/ChatContentDeltaEvent" content-end: "#/components/schemas/ChatContentEndEvent" tool-plan-delta: "#/components/schemas/ChatToolPlanDeltaEvent" tool-call-start: "#/components/schemas/ChatToolCallStartEvent" tool-call-delta: "#/components/schemas/ChatToolCallDeltaEvent" tool-call-end: "#/components/schemas/ChatToolCallEndEvent" citation-start: "#/components/schemas/CitationStartEvent" citation-end: "#/components/schemas/CitationEndEvent" message-end: "#/components/schemas/ChatMessageEndEvent" SingleGeneration: type: object properties: id: type: string x-fern-audiences: - public text: type: string x-fern-audiences: - public index: type: integer x-fern-audiences: - public description: Refers to the nth generation. Only present when `num_generations` is greater than zero. likelihood: type: number x-fern-audiences: - public token_likelihoods: type: array x-fern-audiences: - public description: Only returned if `return_likelihoods` is set to `GENERATION` or `ALL`. The likelihood refers to the average log-likelihood of the entire specified string, which is useful for [evaluating the performance of your model](likelihood-eval), especially if you've created a [custom model](https://docs.cohere.com/docs/training-custom-models). Individual token likelihoods provide the log-likelihood of each token. The first token will not have a likelihood. items: type: object x-fern-audiences: - public properties: token: type: string x-fern-audiences: - public likelihood: type: number x-fern-audiences: - public required: - id - token - likelihood required: - text - id Generation: type: object x-fern-type-name: Generation required: - id - generations properties: id: type: string x-fern-audiences: - public prompt: type: string x-fern-audiences: - public description: Prompt used for generations. generations: type: array x-fern-audiences: - public description: List of generated results items: type: object x-fern-audiences: - public $ref: "#/components/schemas/SingleGeneration" meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public GenerateStreamEvent: required: - event_type properties: event_type: type: string enum: - text-generation - stream-end - stream-error GenerateStreamText: allOf: - $ref: "#/components/schemas/GenerateStreamEvent" - type: object required: - is_finished - text properties: text: type: string description: A segment of text of the generation. index: type: integer description: Refers to the nth generation. Only present when `num_generations` is greater than zero, and only when text responses are being streamed. is_finished: type: boolean SingleGenerationInStream: type: object properties: id: type: string x-fern-audiences: - public text: type: string x-fern-audiences: - public description: Full text of the generation. index: type: integer x-fern-audiences: - public description: Refers to the nth generation. Only present when `num_generations` is greater than zero. finish_reason: x-fern-audiences: - public $ref: "#/components/schemas/FinishReason" required: - text - id - finish_reason GenerateStreamEnd: allOf: - $ref: "#/components/schemas/GenerateStreamEvent" - type: object required: - is_finished - finish_response - response properties: is_finished: x-fern-audiences: - public type: boolean finish_reason: x-fern-audiences: - public $ref: "#/components/schemas/FinishReason" response: type: object x-fern-audiences: - public required: - id properties: id: x-fern-audiences: - public type: string prompt: x-fern-audiences: - public type: string generations: x-fern-audiences: - public type: array items: $ref: "#/components/schemas/SingleGenerationInStream" GenerateStreamError: allOf: - $ref: "#/components/schemas/GenerateStreamEvent" - type: object required: - is_finished - finish_reason - err properties: index: x-fern-audiences: - public type: integer description: Refers to the nth generation. Only present when `num_generations` is greater than zero. is_finished: x-fern-audiences: - public type: boolean finish_reason: x-fern-audiences: - public $ref: "#/components/schemas/FinishReason" err: x-fern-audiences: - public type: string description: Error message GenerateStreamedResponse: description: Response in content type stream when `stream` is `true` in the request parameters. Generation tokens are streamed with the GenerationStream response. The final response is of type GenerationFinalResponse. x-fern-type-name: GenerateStreamedResponse oneOf: - $ref: "#/components/schemas/GenerateStreamText" - $ref: "#/components/schemas/GenerateStreamEnd" - $ref: "#/components/schemas/GenerateStreamError" discriminator: propertyName: event_type mapping: text-generation: "#/components/schemas/GenerateStreamText" stream-end: "#/components/schemas/GenerateStreamEnd" stream-error: "#/components/schemas/GenerateStreamError" EmbedInputType: type: string enum: - search_document - search_query - classification - clustering - image description: | Specifies the type of input passed to the model. Required for embedding models v3 and higher. - `"search_document"`: Used for embeddings stored in a vector database for search use-cases. - `"search_query"`: Used for embeddings of search queries run against a vector DB to find relevant documents. - `"classification"`: Used for embeddings passed through a text classifier. - `"clustering"`: Used for the embeddings run through a clustering algorithm. - `"image"`: Used for embeddings with image input. EmbeddingType: x-fern-audiences: - public type: string writeOnly: true enum: - float - int8 - uint8 - binary - ubinary Image: type: object required: - width - height - format - bit_depth properties: width: type: number format: int64 description: Width of the image in pixels x-fern-audiences: - public height: type: number format: int64 description: Height of the image in pixels x-fern-audiences: - public format: type: string description: Format of the image x-fern-audiences: - public bit_depth: type: number format: int64 description: Bit depth of the image x-fern-audiences: - public EmbedFloatsResponse: type: object required: - id - embeddings - texts - api_version properties: response_type: type: string x-fern-audiences: - public enum: - embeddings_floats - embeddings_by_type id: type: string x-fern-audiences: - public embeddings: type: array x-fern-audiences: - public description: An array of embeddings, where each embedding is an array of floats. The length of the `embeddings` array will be the same as the length of the original `texts` array. items: type: array x-fern-audiences: - public items: type: number x-fern-audiences: - public readOnly: true readOnly: true texts: type: array x-fern-audiences: - public description: The text entries for which embeddings were returned. items: type: string x-fern-audiences: - public images: type: array x-fern-audiences: - public description: The image entries for which embeddings were returned. items: $ref: "#/components/schemas/Image" x-fern-audiences: - public meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public x-examples: Example: value: id: bc57846a-3e56-4327-8acc-588ca1a37b8a texts: - hello world embeddings: - - -0.039520264 - -0.04574585 - -0.08807373 - -0.084106445 - -0.009742737 - -0.0090408325 - -0.048187256 - 0.07128906 - 0.010688782 - 0.016067505 - -0.02822876 - 0.036224365 - 0.037994385 - -0.041992188 - 0.052124023 - -0.027297974 - 0.048309326 - 0.017410278 - 0.004283905 - -0.0058555603 - -0.012992859 - 0.023040771 - 0.00121212 - 0.02078247 - 0.04827881 - -0.021530151 - 0.017807007 - 0.0075531006 - -0.047912598 - -0.042633057 - 0.0016927719 - 0.04547119 - 0.0143585205 - 0.022354126 - 0.0017910004 - 0.048614502 - -0.02609253 - 0.007850647 - 0.00907135 - 0.0035381317 - 0.015289307 - -0.008132935 - 0.016296387 - -0.02859497 - -0.023712158 - 0.008857727 - -0.04309082 - -0.025115967 - 0.032928467 - -0.029663086 - 0.00434494 - -0.022338867 - -0.004371643 - -0.0075035095 - -0.009529114 - 0.0038223267 - -0.06048584 - -0.018127441 - 0.010131836 - 0.08380127 - 0.03652954 - 0.0030384064 - 0.006034851 - -0.006286621 - 0.016784668 - -0.00308609 - 0.01612854 - 0.011413574 - 0.022491455 - 0.02482605 - 0.0047683716 - 0.012245178 - -0.017593384 - -0.023254395 - -0.012641907 - 0.030181885 - -0.015365601 - 0.031021118 - 0.015144348 - 0.016708374 - 0.02180481 - 0.010765076 - -0.015586853 - -0.05819702 - 0.02128601 - -0.021713257 - -0.013320923 - -0.0064849854 - -0.001657486 - -0.030715942 - -0.008666992 - 0.060668945 - -0.0011959076 - -0.032104492 - -0.057006836 - -0.015655518 - -0.014015198 - 0.036987305 - 0.011016846 - 0.037475586 - -0.015319824 - -0.016479492 - 0.0030403137 - -0.028167725 - -0.0067825317 - -0.00894928 - -0.026107788 - 0.010231018 - 0.031707764 - 0.050354004 - -0.016220093 - 0.04345703 - -0.008888245 - -0.0037784576 - -0.034576416 - 0.002565384 - -0.0018634796 - 0.013954163 - 0.012062073 - 0.046813965 - 0.033081055 - 0.028778076 - 0.0051231384 - 0.022094727 - -0.021881104 - -0.009788513 - -0.04647827 - -0.025482178 - 0.066833496 - -0.040863037 - -0.019714355 - 0.06866455 - -0.07519531 - -0.045532227 - -0.020507812 - 0.021331787 - 0.036376953 - -0.034210205 - 0.017669678 - 0.0155181885 - 0.047698975 - -0.010368347 - 0.010879517 - 0.016555786 - -0.028076172 - 0.03225708 - -0.0056152344 - -0.020690918 - 0.00011438131 - -0.021011353 - -0.04425049 - -0.029922485 - -0.0014362335 - 0.013618469 - 0.011260986 - 0.017532349 - -0.043426514 - 0.012557983 - 0.026748657 - 0.039154053 - -0.030944824 - 0.024169922 - 0.06573486 - -0.03817749 - -0.025314331 - -0.039794922 - -0.050445557 - -0.0020828247 - -0.0010194778 - 0.01725769 - 0.0017976761 - 0.029067993 - 0.0115356445 - 0.005214691 - 0.0066604614 - -0.014801025 - -0.033172607 - 0.023956299 - 0.008865356 - 0.09539795 - 0.062286377 - -0.0076408386 - -0.035125732 - 0.09082031 - -0.015350342 - -0.015625 - -0.0090789795 - -0.01876831 - 0.05239868 - -0.010406494 - 0.05078125 - -0.013694763 - -0.07244873 - 0.018539429 - -0.016983032 - -0.03353882 - 0.01739502 - 0.004055023 - -0.010147095 - -0.0027599335 - -0.002714157 - -0.0107040405 - 0.021438599 - -0.029525757 - 0.01902771 - -0.025909424 - 0.0008072853 - 0.026672363 - 0.0019044876 - 0.016937256 - -0.018814087 - -0.03668213 - 0.03338623 - -0.09240723 - -0.024765015 - -0.019378662 - -0.051757812 - 0.050109863 - 0.018859863 - 0.01687622 - 0.020111084 - -0.041534424 - 0.009559631 - -0.018859863 - 0.00005853176 - 0.032684326 - -0.04058838 - 0.015823364 - -0.038635254 - 0.0055656433 - -0.021560669 - 0.012481689 - -0.050872803 - -0.036071777 - -0.046844482 - -0.041900635 - -0.06561279 - 0.014785767 - 0.010124207 - 0.030426025 - 0.024261475 - 0.0057411194 - -0.026275635 - -0.006919861 - 0.022750854 - -0.015167236 - 0.022964478 - -0.0033664703 - 0.02734375 - 0.03201294 - 0.025939941 - 0.019104004 - 0.028030396 - -0.014328003 - -0.01574707 - 0.06982422 - -0.008026123 - 0.006816864 - -0.0019035339 - 0.026245117 - -0.028945923 - 0.014968872 - 0.0054244995 - -0.00028896332 - -0.02243042 - -0.0030822754 - -0.02558899 - -0.022918701 - -0.017089844 - -0.0035190582 - 0.029953003 - -0.037078857 - -0.02507019 - -0.017303467 - 0.064331055 - -0.028533936 - -0.07287598 - 0.028839111 - -0.0029792786 - -0.02104187 - -0.01663208 - -0.016571045 - -0.015106201 - 0.0027313232 - 0.031051636 - -0.025680542 - 0.004722595 - 0.032348633 - 0.020019531 - 0.056365967 - 0.07208252 - 0.01235199 - 0.00084495544 - 0.035369873 - -0.018569946 - -0.0063552856 - 0.03161621 - 0.064575195 - -0.02557373 - -0.007232666 - -0.017700195 - -0.003835678 - 0.007381439 - -0.0385437 - -0.0019102097 - -0.023223877 - -0.0124435425 - 0.013343811 - 0.020996094 - -0.014022827 - -0.01939392 - 0.044128418 - 0.0052757263 - -0.00068950653 - -0.04876709 - -0.05609131 - -0.020874023 - -0.00806427 - -0.13391113 - -0.06323242 - -0.021865845 - -0.021072388 - 0.005832672 - -0.015701294 - -0.006286621 - -0.012954712 - -0.017288208 - 0.0036773682 - -0.0084991455 - -0.03213501 - 0.021987915 - -0.010322571 - -0.029144287 - 0.003824234 - 0.02708435 - 0.0026187897 - 0.05496216 - -0.04916382 - 0.005466461 - -0.0070648193 - 0.0793457 - -0.040863037 - 0.012641907 - 0.016448975 - 0.02041626 - -0.029006958 - -0.008491516 - 0.0023422241 - 0.043640137 - 0.0121536255 - -0.0043525696 - -0.030899048 - 0.0062332153 - -0.013038635 - 0.007904053 - -0.03390503 - -0.034729004 - -0.0647583 - -0.0052375793 - -0.08154297 - 0.015960693 - 0.016235352 - -0.012130737 - -0.021469116 - -0.03253174 - -0.014465332 - 0.016448975 - 0.004589081 - -0.05291748 - 0.018005371 - -0.002981186 - -0.01247406 - 0.023147583 - -0.055419922 - -0.08526611 - 0.016723633 - 0.012939453 - -0.039031982 - 0.016677856 - 0.016937256 - 0.023147583 - 0.034576416 - -0.010635376 - 0.03466797 - 0.037750244 - 0.020141602 - -0.0046539307 - 0.0059432983 - 0.05609131 - 0.027709961 - 0.01838684 - 0.015022278 - -0.039215088 - -0.0048828125 - 0.047546387 - 0.0138549805 - -0.046203613 - 0.036193848 - -0.109680176 - 0.0019550323 - -0.03125 - 0.0084991455 - -0.0020256042 - -0.001739502 - -0.06756592 - 0.03491211 - -0.05633545 - -0.008491516 - 0.0048446655 - 0.042663574 - 0.025054932 - -0.022247314 - -0.0044555664 - 0.0022335052 - -0.0071907043 - -0.003982544 - -0.073913574 - -0.011253357 - 0.029220581 - -0.0047073364 - -0.04626465 - 0.05670166 - -0.041503906 - 0.014579773 - -0.016174316 - 0.021560669 - -0.019332886 - 0.01550293 - 0.02709961 - 0.010528564 - 0.012786865 - -0.023849487 - -0.016937256 - -0.04626465 - -0.04397583 - 0.026245117 - -0.017868042 - 0.021072388 - -0.02128601 - -0.012161255 - -0.004776001 - -0.0088272095 - 0.009246826 - -0.012313843 - 0.0096206665 - -0.0047950745 - -0.0079956055 - 0.052520752 - -0.06616211 - 0.0014686584 - -0.046081543 - 0.03289795 - -0.03656006 - 0.055389404 - 0.009773254 - 0.0013818741 - 0.043823242 - 0.034942627 - 0.055236816 - -0.011833191 - -0.024353027 - 0.011398315 - -0.051574707 - -0.019882202 - 0.0018358231 - -0.005859375 - 0.06677246 - -0.0009851456 - -0.026809692 - 0.0075798035 - -0.021347046 - -0.01146698 - 0.03262329 - 0.031585693 - -0.006729126 - 0.008659363 - -0.025665283 - 0.02947998 - -0.03744507 - 0.02027893 - -0.026062012 - 0.018585205 - -0.004463196 - -0.036865234 - -0.043670654 - 0.021392822 - -0.062561035 - -0.080078125 - 0.011451721 - 0.06762695 - 0.039001465 - -0.016799927 - 0.049072266 - 0.041412354 - -0.03062439 - 0.011795044 - -0.016555786 - 0.046569824 - 0.010688782 - -0.01902771 - -0.031097412 - -0.023391724 - -0.01651001 - 0.009399414 - 0.049041748 - -0.025817871 - -0.018356323 - 0.02154541 - -0.0029411316 - 0.074157715 - 0.017059326 - -0.0017595291 - 0.00390625 - 0.02645874 - -0.0010709763 - 0.040222168 - -0.034423828 - 0.0231781 - -0.016693115 - -0.022094727 - 0.004383087 - 0.007331848 - 0.018676758 - 0.023773193 - -0.0069770813 - 0.0029773712 - -0.023712158 - -0.0051956177 - -0.011810303 - -0.0519104 - 0.07244873 - 0.032409668 - 0.016662598 - 0.015716553 - -0.03640747 - 0.03918457 - -0.046722412 - -0.0046081543 - 0.006061554 - -0.011940002 - -0.0004878044 - 0.01260376 - 0.0073280334 - 0.0015096664 - 0.005844116 - 0.029129028 - 0.047668457 - 0.05960083 - -0.0647583 - 0.064697266 - -0.017440796 - -0.01889038 - 0.037628174 - 0.0048065186 - -0.023101807 - -0.048675537 - -0.02508545 - -0.007965088 - 0.0015897751 - 0.06866455 - -0.0099487305 - -0.0022964478 - -0.030014038 - -0.007713318 - -0.034362793 - 0.013931274 - 0.0026836395 - -0.0014476776 - 0.02532959 - -0.020584106 - -0.039001465 - -0.062347412 - -0.04736328 - -0.024368286 - -0.045776367 - 0.03149414 - -0.012825012 - 0.028076172 - 0.0058784485 - 0.08062744 - 0.0104599 - 0.014579773 - -0.041137695 - 0.04244995 - -0.021011353 - 0.06390381 - 0.0010871887 - 0.04147339 - -0.0053138733 - 0.02268982 - -0.028182983 - -0.022628784 - -0.021408081 - -0.006088257 - 0.028030396 - 0.025146484 - 0.00881958 - -0.04244995 - 0.027938843 - 0.013916016 - -0.04647827 - 0.0072288513 - 0.017745972 - -0.02381897 - -0.010147095 - 0.0096588135 - -0.04586792 - -0.014480591 - -0.0027217865 - -0.03111267 - 0.04522705 - -0.02772522 - -0.0013189316 - 0.017807007 - -0.0135269165 - -0.014175415 - -0.00019681454 - 0.03161621 - 0.0041007996 - -0.024871826 - 0.0039367676 - -0.026916504 - 0.03237915 - 0.007068634 - 0.029647827 - -0.0102005005 - 0.0076675415 - 0.0051078796 - -0.008041382 - -0.0062942505 - 0.0010309219 - 0.010543823 - -0.010101318 - -0.013496399 - 0.00920105 - 0.0546875 - -0.02784729 - -0.0056762695 - -0.08679199 - -0.050048828 - 0.03378296 - 0.010124207 - 0.019058228 - -0.037872314 - -0.0063323975 - 0.0014324188 - -0.010002136 - -0.015731812 - -0.036071777 - -0.0028915405 - -0.0082092285 - 0.0037841797 - -0.020629883 - 0.01725769 - -0.026000977 - 0.00012862682 - 0.021621704 - 0.07086182 - -0.008049011 - -0.012634277 - -0.064941406 - -0.0073013306 - -0.02760315 - -0.040649414 - 0.02809143 - 0.009849548 - 0.0011720657 - 0.059936523 - -0.032806396 - 0.06311035 - 0.009536743 - 0.014801025 - 0.03390503 - -0.002620697 - -0.04650879 - -0.015365601 - 0.03741455 - -0.0067443848 - -0.008888245 - -0.0013017654 - -0.010154724 - 0.0027217865 - 0.016052246 - 0.025100708 - -0.030532837 - 0.032318115 - 0.014564514 - -0.009109497 - 0.009628296 - -0.021438599 - -0.049926758 - -0.00088214874 - -0.019638062 - -0.020126343 - 0.055847168 - -0.006729126 - -0.044921875 - -0.01890564 - -0.0026683807 - 0.0038547516 - 0.004600525 - -0.013977051 - 0.018341064 - -0.05178833 - 0.011054993 - 0.019927979 - 0.011436462 - 0.010391235 - -0.012680054 - -0.017669678 - 0.01928711 - 0.025115967 - -0.07757568 - -0.030960083 - 0.013137817 - -0.066467285 - -0.054473877 - -0.04244995 - -0.027526855 - 0.02973938 - -0.024017334 - -0.03918457 - 0.0154800415 - -0.036315918 - 0.015510559 - -0.020385742 - -0.0390625 - -0.00137043 - 0.0016002655 - -0.010238647 - 0.014656067 - 0.029373169 - -0.027023315 - 0.0076141357 - -0.001917839 - 0.03451538 - 0.004814148 - 0.024887085 - 0.036315918 - -0.006500244 - -0.070495605 - -0.0071754456 - 0.025863647 - 0.022994995 - 0.007217407 - 0.032165527 - 0.016830444 - 0.02859497 - -0.011123657 - 0.020126343 - -0.0014410019 - 0.0021781921 - 0.053619385 - 0.015625 - 0.017150879 - -0.03326416 - -0.04626465 - 0.034332275 - 0.07165527 - -0.040740967 - -0.06628418 - -0.024291992 - -0.0066871643 - 0.065979004 - 0.034851074 - 0.07678223 - 0.053009033 - 0.0317688 - -0.04019165 - 0.030288696 - 0.062347412 - -0.011734009 - 0.0024604797 - 0.006095886 - -0.0152282715 - 0.056762695 - 0.021270752 - -0.011154175 - -0.0143966675 - 0.0057754517 - -0.0003619194 - 0.0053367615 - -0.030639648 - 0.0024776459 - -0.031799316 - -0.012710571 - 0.048828125 - 0.029632568 - 0.013244629 - 0.087890625 - -0.01134491 - 0.028656006 - -0.014778137 - 0.06695557 - 0.026275635 - -0.016113281 - 0.018859863 - -0.008239746 - 0.024383545 - -0.039154053 - -0.006252289 - 0.049224854 - -0.04638672 - 0.0031967163 - -0.04849243 - -0.04058838 - 0.038757324 - 0.00730896 - -0.04345703 - 0.04296875 - -0.0024299622 - -0.05670166 - 0.019119263 - -0.011802673 - 0.038970947 - -0.03366089 - 0.03591919 - -0.0009088516 - 0.013259888 - -0.07342529 - 0.004299164 - 0.0395813 - 0.013420105 - -0.004459381 - -0.0084991455 - 0.031982422 - 0.018249512 - -0.0038604736 - -0.022323608 - -0.013031006 - 0.0513916 - -0.007068634 - -0.003545761 - 0.010292053 - -0.010322571 - -0.0037841797 - 0.043701172 - -0.012672424 - 0.013725281 - 0.021575928 - -0.03942871 - -0.0105896 - -0.01878357 - -0.017623901 - -0.03414917 - 0.02142334 - 0.026550293 - -0.022903442 - 0.008598328 - 0.03100586 - 0.049957275 - 0.021438599 - 0.016204834 - -0.014129639 - 0.0079193115 - -0.004535675 - 0.0010051727 - -0.038208008 - -0.014923096 - -0.01436615 - -0.009666443 - 0.0006933212 - 0.0132369995 - 0.01486969 - 0.028762817 - 0.011329651 - -0.042663574 - 0.014961243 - -0.018127441 - -0.007232666 - 0.008369446 - 0.027557373 - 0.006706238 - -0.05038452 - -0.023666382 - -0.0072898865 - -0.007865906 - -0.008926392 - -0.013137817 - 0.08886719 - 0.030929565 - 0.021255493 - -0.0020389557 - -0.08337402 - -0.020385742 - 0.03866577 - -0.020523071 - 0.021881104 - 0.005756378 - 0.022003174 - 0.021209717 - -0.06161499 - -0.020309448 - -0.0057258606 - -0.033813477 - 0.0017337799 - -0.052612305 - 0.01461792 - -0.017944336 - 0.042816162 - -0.053710938 - -0.041259766 - -0.014549255 - 0.020843506 - -0.019760132 - 0.004890442 - -0.0007162094 - -0.009429932 - -0.01966858 - -0.014320374 - 0.041259766 - 0.00075244904 - -0.0064430237 - 0.028961182 - -0.01876831 - 0.0027942657 - -0.051116943 - 0.00093746185 - 0.0037384033 - -0.06982422 - -0.0107040405 - 0.030090332 - -0.019104004 - -0.016647339 - -0.037475586 - 0.0140686035 - -0.051086426 - -0.032409668 - -0.011131287 - -0.023620605 - -0.04159546 - -0.034851074 - -0.064941406 - -0.03451538 - 0.0047416687 - -0.04510498 - 0.020477295 - -0.03024292 - -0.034179688 - 0.058410645 - 0.008514404 - 0.0049858093 - 0.02331543 - 0.03704834 - -0.017333984 - 0.014389038 - 0.013786316 - 0.008583069 - -0.009643555 - 0.020095825 - 0.013496399 - -0.01991272 - -0.0446167 - 0.0075149536 - 0.0071029663 - 0.0446167 - -0.03933716 - 0.009902954 - 0.011077881 - 0.008781433 - -0.001701355 - 0.016235352 - 0.01802063 - -0.010765076 - -0.03427124 - 0.0112838745 - -0.023208618 - -0.009979248 - -0.010696411 - -0.023208618 - -0.026748657 - -0.02923584 - 0.013801575 - -0.050323486 - -0.0059661865 - -0.004837036 - 0.01940918 - 0.00018620491 - 0.0016450882 - 0.019012451 - -0.048034668 - 0.034423828 - -0.033599854 - 0.020126343 - -0.04949951 - 0.071899414 - -0.06060791 - -0.043395996 - 0.012138367 - 0.022476196 - 0.029006958 - 0.04550171 - -0.03564453 - -0.015090942 - 0.055541992 - 0.014884949 - 0.020767212 - -0.01071167 - 0.046905518 - 0.033813477 - -0.04260254 - -0.00094127655 - 0.016708374 - -0.0011367798 - -0.030426025 - -0.03427124 - 0.01763916 - -0.012634277 - 0.030517578 - -0.055480957 - -0.054992676 - 0.056274414 - -0.0007033348 - -0.058624268 - 0.0061531067 - -0.008613586 - 0.016067505 - 0.003376007 - -0.01586914 - -0.025146484 - 0.008491516 - 0.053222656 - -0.02923584 - 0.021408081 meta: api_version: version: "1" api_version: v1 EmbedByTypeResponse: type: object required: - id - embeddings - texts - api_version properties: response_type: type: string x-fern-audiences: - public enum: - embeddings_floats - embeddings_by_type id: type: string x-fern-audiences: - public embeddings: type: object x-fern-audiences: - public description: An object with different embedding types. The length of each embedding type array will be the same as the length of the original `texts` array. properties: float: type: array x-fern-audiences: - public description: An array of float embeddings. items: type: array x-fern-audiences: - public items: type: number x-fern-audiences: - public readOnly: true readOnly: true int8: type: array x-fern-audiences: - public description: An array of signed int8 embeddings. Each value is between -128 and 127. items: type: array x-fern-audiences: - public items: type: integer x-fern-audiences: - public readOnly: true readOnly: true uint8: type: array x-fern-audiences: - public description: An array of unsigned int8 embeddings. Each value is between 0 and 255. items: type: array x-fern-audiences: - public items: type: integer x-fern-audiences: - public readOnly: true readOnly: true binary: type: array x-fern-audiences: - public description: An array of packed signed binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between -128 and 127. items: type: array x-fern-audiences: - public items: type: integer x-fern-audiences: - public readOnly: true readOnly: true ubinary: type: array x-fern-audiences: - public description: An array of packed unsigned binary embeddings. The length of each binary embedding is 1/8 the length of the float embeddings of the provided model. Each value is between 0 and 255. items: type: array x-fern-audiences: - public items: type: integer x-fern-audiences: - public readOnly: true items: type: array x-fern-audiences: - public items: type: number x-fern-audiences: - public readOnly: true readOnly: true texts: type: array x-fern-audiences: - public description: The text entries for which embeddings were returned. items: type: string x-fern-audiences: - public images: type: array x-fern-audiences: - public description: The image entries for which embeddings were returned. items: $ref: "#/components/schemas/Image" x-fern-audiences: - public meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public x-examples: Example: value: id: bc57846a-3e56-4327-8acc-588ca1a37b8a texts: - hello world embeddings: float: - - -0.039520264 - -0.04574585 - -0.08807373 - -0.084106445 - -0.009742737 - -0.0090408325 - -0.048187256 - 0.07128906 - 0.010688782 - 0.016067505 - -0.02822876 - 0.036224365 - 0.037994385 - -0.041992188 - 0.052124023 - -0.027297974 - 0.048309326 - 0.017410278 - 0.004283905 - -0.0058555603 - -0.012992859 - 0.023040771 - 0.00121212 - 0.02078247 - 0.04827881 - -0.021530151 - 0.017807007 - 0.0075531006 - -0.047912598 - -0.042633057 - 0.0016927719 - 0.04547119 - 0.0143585205 - 0.022354126 - 0.0017910004 - 0.048614502 - -0.02609253 - 0.007850647 - 0.00907135 - 0.0035381317 - 0.015289307 - -0.008132935 - 0.016296387 - -0.02859497 - -0.023712158 - 0.008857727 - -0.04309082 - -0.025115967 - 0.032928467 - -0.029663086 - 0.00434494 - -0.022338867 - -0.004371643 - -0.0075035095 - -0.009529114 - 0.0038223267 - -0.06048584 - -0.018127441 - 0.010131836 - 0.08380127 - 0.03652954 - 0.0030384064 - 0.006034851 - -0.006286621 - 0.016784668 - -0.00308609 - 0.01612854 - 0.011413574 - 0.022491455 - 0.02482605 - 0.0047683716 - 0.012245178 - -0.017593384 - -0.023254395 - -0.012641907 - 0.030181885 - -0.015365601 - 0.031021118 - 0.015144348 - 0.016708374 - 0.02180481 - 0.010765076 - -0.015586853 - -0.05819702 - 0.02128601 - -0.021713257 - -0.013320923 - -0.0064849854 - -0.001657486 - -0.030715942 - -0.008666992 - 0.060668945 - -0.0011959076 - -0.032104492 - -0.057006836 - -0.015655518 - -0.014015198 - 0.036987305 - 0.011016846 - 0.037475586 - -0.015319824 - -0.016479492 - 0.0030403137 - -0.028167725 - -0.0067825317 - -0.00894928 - -0.026107788 - 0.010231018 - 0.031707764 - 0.050354004 - -0.016220093 - 0.04345703 - -0.008888245 - -0.0037784576 - -0.034576416 - 0.002565384 - -0.0018634796 - 0.013954163 - 0.012062073 - 0.046813965 - 0.033081055 - 0.028778076 - 0.0051231384 - 0.022094727 - -0.021881104 - -0.009788513 - -0.04647827 - -0.025482178 - 0.066833496 - -0.040863037 - -0.019714355 - 0.06866455 - -0.07519531 - -0.045532227 - -0.020507812 - 0.021331787 - 0.036376953 - -0.034210205 - 0.017669678 - 0.0155181885 - 0.047698975 - -0.010368347 - 0.010879517 - 0.016555786 - -0.028076172 - 0.03225708 - -0.0056152344 - -0.020690918 - 0.00011438131 - -0.021011353 - -0.04425049 - -0.029922485 - -0.0014362335 - 0.013618469 - 0.011260986 - 0.017532349 - -0.043426514 - 0.012557983 - 0.026748657 - 0.039154053 - -0.030944824 - 0.024169922 - 0.06573486 - -0.03817749 - -0.025314331 - -0.039794922 - -0.050445557 - -0.0020828247 - -0.0010194778 - 0.01725769 - 0.0017976761 - 0.029067993 - 0.0115356445 - 0.005214691 - 0.0066604614 - -0.014801025 - -0.033172607 - 0.023956299 - 0.008865356 - 0.09539795 - 0.062286377 - -0.0076408386 - -0.035125732 - 0.09082031 - -0.015350342 - -0.015625 - -0.0090789795 - -0.01876831 - 0.05239868 - -0.010406494 - 0.05078125 - -0.013694763 - -0.07244873 - 0.018539429 - -0.016983032 - -0.03353882 - 0.01739502 - 0.004055023 - -0.010147095 - -0.0027599335 - -0.002714157 - -0.0107040405 - 0.021438599 - -0.029525757 - 0.01902771 - -0.025909424 - 0.0008072853 - 0.026672363 - 0.0019044876 - 0.016937256 - -0.018814087 - -0.03668213 - 0.03338623 - -0.09240723 - -0.024765015 - -0.019378662 - -0.051757812 - 0.050109863 - 0.018859863 - 0.01687622 - 0.020111084 - -0.041534424 - 0.009559631 - -0.018859863 - 0.00005853176 - 0.032684326 - -0.04058838 - 0.015823364 - -0.038635254 - 0.0055656433 - -0.021560669 - 0.012481689 - -0.050872803 - -0.036071777 - -0.046844482 - -0.041900635 - -0.06561279 - 0.014785767 - 0.010124207 - 0.030426025 - 0.024261475 - 0.0057411194 - -0.026275635 - -0.006919861 - 0.022750854 - -0.015167236 - 0.022964478 - -0.0033664703 - 0.02734375 - 0.03201294 - 0.025939941 - 0.019104004 - 0.028030396 - -0.014328003 - -0.01574707 - 0.06982422 - -0.008026123 - 0.006816864 - -0.0019035339 - 0.026245117 - -0.028945923 - 0.014968872 - 0.0054244995 - -0.00028896332 - -0.02243042 - -0.0030822754 - -0.02558899 - -0.022918701 - -0.017089844 - -0.0035190582 - 0.029953003 - -0.037078857 - -0.02507019 - -0.017303467 - 0.064331055 - -0.028533936 - -0.07287598 - 0.028839111 - -0.0029792786 - -0.02104187 - -0.01663208 - -0.016571045 - -0.015106201 - 0.0027313232 - 0.031051636 - -0.025680542 - 0.004722595 - 0.032348633 - 0.020019531 - 0.056365967 - 0.07208252 - 0.01235199 - 0.00084495544 - 0.035369873 - -0.018569946 - -0.0063552856 - 0.03161621 - 0.064575195 - -0.02557373 - -0.007232666 - -0.017700195 - -0.003835678 - 0.007381439 - -0.0385437 - -0.0019102097 - -0.023223877 - -0.0124435425 - 0.013343811 - 0.020996094 - -0.014022827 - -0.01939392 - 0.044128418 - 0.0052757263 - -0.00068950653 - -0.04876709 - -0.05609131 - -0.020874023 - -0.00806427 - -0.13391113 - -0.06323242 - -0.021865845 - -0.021072388 - 0.005832672 - -0.015701294 - -0.006286621 - -0.012954712 - -0.017288208 - 0.0036773682 - -0.0084991455 - -0.03213501 - 0.021987915 - -0.010322571 - -0.029144287 - 0.003824234 - 0.02708435 - 0.0026187897 - 0.05496216 - -0.04916382 - 0.005466461 - -0.0070648193 - 0.0793457 - -0.040863037 - 0.012641907 - 0.016448975 - 0.02041626 - -0.029006958 - -0.008491516 - 0.0023422241 - 0.043640137 - 0.0121536255 - -0.0043525696 - -0.030899048 - 0.0062332153 - -0.013038635 - 0.007904053 - -0.03390503 - -0.034729004 - -0.0647583 - -0.0052375793 - -0.08154297 - 0.015960693 - 0.016235352 - -0.012130737 - -0.021469116 - -0.03253174 - -0.014465332 - 0.016448975 - 0.004589081 - -0.05291748 - 0.018005371 - -0.002981186 - -0.01247406 - 0.023147583 - -0.055419922 - -0.08526611 - 0.016723633 - 0.012939453 - -0.039031982 - 0.016677856 - 0.016937256 - 0.023147583 - 0.034576416 - -0.010635376 - 0.03466797 - 0.037750244 - 0.020141602 - -0.0046539307 - 0.0059432983 - 0.05609131 - 0.027709961 - 0.01838684 - 0.015022278 - -0.039215088 - -0.0048828125 - 0.047546387 - 0.0138549805 - -0.046203613 - 0.036193848 - -0.109680176 - 0.0019550323 - -0.03125 - 0.0084991455 - -0.0020256042 - -0.001739502 - -0.06756592 - 0.03491211 - -0.05633545 - -0.008491516 - 0.0048446655 - 0.042663574 - 0.025054932 - -0.022247314 - -0.0044555664 - 0.0022335052 - -0.0071907043 - -0.003982544 - -0.073913574 - -0.011253357 - 0.029220581 - -0.0047073364 - -0.04626465 - 0.05670166 - -0.041503906 - 0.014579773 - -0.016174316 - 0.021560669 - -0.019332886 - 0.01550293 - 0.02709961 - 0.010528564 - 0.012786865 - -0.023849487 - -0.016937256 - -0.04626465 - -0.04397583 - 0.026245117 - -0.017868042 - 0.021072388 - -0.02128601 - -0.012161255 - -0.004776001 - -0.0088272095 - 0.009246826 - -0.012313843 - 0.0096206665 - -0.0047950745 - -0.0079956055 - 0.052520752 - -0.06616211 - 0.0014686584 - -0.046081543 - 0.03289795 - -0.03656006 - 0.055389404 - 0.009773254 - 0.0013818741 - 0.043823242 - 0.034942627 - 0.055236816 - -0.011833191 - -0.024353027 - 0.011398315 - -0.051574707 - -0.019882202 - 0.0018358231 - -0.005859375 - 0.06677246 - -0.0009851456 - -0.026809692 - 0.0075798035 - -0.021347046 - -0.01146698 - 0.03262329 - 0.031585693 - -0.006729126 - 0.008659363 - -0.025665283 - 0.02947998 - -0.03744507 - 0.02027893 - -0.026062012 - 0.018585205 - -0.004463196 - -0.036865234 - -0.043670654 - 0.021392822 - -0.062561035 - -0.080078125 - 0.011451721 - 0.06762695 - 0.039001465 - -0.016799927 - 0.049072266 - 0.041412354 - -0.03062439 - 0.011795044 - -0.016555786 - 0.046569824 - 0.010688782 - -0.01902771 - -0.031097412 - -0.023391724 - -0.01651001 - 0.009399414 - 0.049041748 - -0.025817871 - -0.018356323 - 0.02154541 - -0.0029411316 - 0.074157715 - 0.017059326 - -0.0017595291 - 0.00390625 - 0.02645874 - -0.0010709763 - 0.040222168 - -0.034423828 - 0.0231781 - -0.016693115 - -0.022094727 - 0.004383087 - 0.007331848 - 0.018676758 - 0.023773193 - -0.0069770813 - 0.0029773712 - -0.023712158 - -0.0051956177 - -0.011810303 - -0.0519104 - 0.07244873 - 0.032409668 - 0.016662598 - 0.015716553 - -0.03640747 - 0.03918457 - -0.046722412 - -0.0046081543 - 0.006061554 - -0.011940002 - -0.0004878044 - 0.01260376 - 0.0073280334 - 0.0015096664 - 0.005844116 - 0.029129028 - 0.047668457 - 0.05960083 - -0.0647583 - 0.064697266 - -0.017440796 - -0.01889038 - 0.037628174 - 0.0048065186 - -0.023101807 - -0.048675537 - -0.02508545 - -0.007965088 - 0.0015897751 - 0.06866455 - -0.0099487305 - -0.0022964478 - -0.030014038 - -0.007713318 - -0.034362793 - 0.013931274 - 0.0026836395 - -0.0014476776 - 0.02532959 - -0.020584106 - -0.039001465 - -0.062347412 - -0.04736328 - -0.024368286 - -0.045776367 - 0.03149414 - -0.012825012 - 0.028076172 - 0.0058784485 - 0.08062744 - 0.0104599 - 0.014579773 - -0.041137695 - 0.04244995 - -0.021011353 - 0.06390381 - 0.0010871887 - 0.04147339 - -0.0053138733 - 0.02268982 - -0.028182983 - -0.022628784 - -0.021408081 - -0.006088257 - 0.028030396 - 0.025146484 - 0.00881958 - -0.04244995 - 0.027938843 - 0.013916016 - -0.04647827 - 0.0072288513 - 0.017745972 - -0.02381897 - -0.010147095 - 0.0096588135 - -0.04586792 - -0.014480591 - -0.0027217865 - -0.03111267 - 0.04522705 - -0.02772522 - -0.0013189316 - 0.017807007 - -0.0135269165 - -0.014175415 - -0.00019681454 - 0.03161621 - 0.0041007996 - -0.024871826 - 0.0039367676 - -0.026916504 - 0.03237915 - 0.007068634 - 0.029647827 - -0.0102005005 - 0.0076675415 - 0.0051078796 - -0.008041382 - -0.0062942505 - 0.0010309219 - 0.010543823 - -0.010101318 - -0.013496399 - 0.00920105 - 0.0546875 - -0.02784729 - -0.0056762695 - -0.08679199 - -0.050048828 - 0.03378296 - 0.010124207 - 0.019058228 - -0.037872314 - -0.0063323975 - 0.0014324188 - -0.010002136 - -0.015731812 - -0.036071777 - -0.0028915405 - -0.0082092285 - 0.0037841797 - -0.020629883 - 0.01725769 - -0.026000977 - 0.00012862682 - 0.021621704 - 0.07086182 - -0.008049011 - -0.012634277 - -0.064941406 - -0.0073013306 - -0.02760315 - -0.040649414 - 0.02809143 - 0.009849548 - 0.0011720657 - 0.059936523 - -0.032806396 - 0.06311035 - 0.009536743 - 0.014801025 - 0.03390503 - -0.002620697 - -0.04650879 - -0.015365601 - 0.03741455 - -0.0067443848 - -0.008888245 - -0.0013017654 - -0.010154724 - 0.0027217865 - 0.016052246 - 0.025100708 - -0.030532837 - 0.032318115 - 0.014564514 - -0.009109497 - 0.009628296 - -0.021438599 - -0.049926758 - -0.00088214874 - -0.019638062 - -0.020126343 - 0.055847168 - -0.006729126 - -0.044921875 - -0.01890564 - -0.0026683807 - 0.0038547516 - 0.004600525 - -0.013977051 - 0.018341064 - -0.05178833 - 0.011054993 - 0.019927979 - 0.011436462 - 0.010391235 - -0.012680054 - -0.017669678 - 0.01928711 - 0.025115967 - -0.07757568 - -0.030960083 - 0.013137817 - -0.066467285 - -0.054473877 - -0.04244995 - -0.027526855 - 0.02973938 - -0.024017334 - -0.03918457 - 0.0154800415 - -0.036315918 - 0.015510559 - -0.020385742 - -0.0390625 - -0.00137043 - 0.0016002655 - -0.010238647 - 0.014656067 - 0.029373169 - -0.027023315 - 0.0076141357 - -0.001917839 - 0.03451538 - 0.004814148 - 0.024887085 - 0.036315918 - -0.006500244 - -0.070495605 - -0.0071754456 - 0.025863647 - 0.022994995 - 0.007217407 - 0.032165527 - 0.016830444 - 0.02859497 - -0.011123657 - 0.020126343 - -0.0014410019 - 0.0021781921 - 0.053619385 - 0.015625 - 0.017150879 - -0.03326416 - -0.04626465 - 0.034332275 - 0.07165527 - -0.040740967 - -0.06628418 - -0.024291992 - -0.0066871643 - 0.065979004 - 0.034851074 - 0.07678223 - 0.053009033 - 0.0317688 - -0.04019165 - 0.030288696 - 0.062347412 - -0.011734009 - 0.0024604797 - 0.006095886 - -0.0152282715 - 0.056762695 - 0.021270752 - -0.011154175 - -0.0143966675 - 0.0057754517 - -0.0003619194 - 0.0053367615 - -0.030639648 - 0.0024776459 - -0.031799316 - -0.012710571 - 0.048828125 - 0.029632568 - 0.013244629 - 0.087890625 - -0.01134491 - 0.028656006 - -0.014778137 - 0.06695557 - 0.026275635 - -0.016113281 - 0.018859863 - -0.008239746 - 0.024383545 - -0.039154053 - -0.006252289 - 0.049224854 - -0.04638672 - 0.0031967163 - -0.04849243 - -0.04058838 - 0.038757324 - 0.00730896 - -0.04345703 - 0.04296875 - -0.0024299622 - -0.05670166 - 0.019119263 - -0.011802673 - 0.038970947 - -0.03366089 - 0.03591919 - -0.0009088516 - 0.013259888 - -0.07342529 - 0.004299164 - 0.0395813 - 0.013420105 - -0.004459381 - -0.0084991455 - 0.031982422 - 0.018249512 - -0.0038604736 - -0.022323608 - -0.013031006 - 0.0513916 - -0.007068634 - -0.003545761 - 0.010292053 - -0.010322571 - -0.0037841797 - 0.043701172 - -0.012672424 - 0.013725281 - 0.021575928 - -0.03942871 - -0.0105896 - -0.01878357 - -0.017623901 - -0.03414917 - 0.02142334 - 0.026550293 - -0.022903442 - 0.008598328 - 0.03100586 - 0.049957275 - 0.021438599 - 0.016204834 - -0.014129639 - 0.0079193115 - -0.004535675 - 0.0010051727 - -0.038208008 - -0.014923096 - -0.01436615 - -0.009666443 - 0.0006933212 - 0.0132369995 - 0.01486969 - 0.028762817 - 0.011329651 - -0.042663574 - 0.014961243 - -0.018127441 - -0.007232666 - 0.008369446 - 0.027557373 - 0.006706238 - -0.05038452 - -0.023666382 - -0.0072898865 - -0.007865906 - -0.008926392 - -0.013137817 - 0.08886719 - 0.030929565 - 0.021255493 - -0.0020389557 - -0.08337402 - -0.020385742 - 0.03866577 - -0.020523071 - 0.021881104 - 0.005756378 - 0.022003174 - 0.021209717 - -0.06161499 - -0.020309448 - -0.0057258606 - -0.033813477 - 0.0017337799 - -0.052612305 - 0.01461792 - -0.017944336 - 0.042816162 - -0.053710938 - -0.041259766 - -0.014549255 - 0.020843506 - -0.019760132 - 0.004890442 - -0.0007162094 - -0.009429932 - -0.01966858 - -0.014320374 - 0.041259766 - 0.00075244904 - -0.0064430237 - 0.028961182 - -0.01876831 - 0.0027942657 - -0.051116943 - 0.00093746185 - 0.0037384033 - -0.06982422 - -0.0107040405 - 0.030090332 - -0.019104004 - -0.016647339 - -0.037475586 - 0.0140686035 - -0.051086426 - -0.032409668 - -0.011131287 - -0.023620605 - -0.04159546 - -0.034851074 - -0.064941406 - -0.03451538 - 0.0047416687 - -0.04510498 - 0.020477295 - -0.03024292 - -0.034179688 - 0.058410645 - 0.008514404 - 0.0049858093 - 0.02331543 - 0.03704834 - -0.017333984 - 0.014389038 - 0.013786316 - 0.008583069 - -0.009643555 - 0.020095825 - 0.013496399 - -0.01991272 - -0.0446167 - 0.0075149536 - 0.0071029663 - 0.0446167 - -0.03933716 - 0.009902954 - 0.011077881 - 0.008781433 - -0.001701355 - 0.016235352 - 0.01802063 - -0.010765076 - -0.03427124 - 0.0112838745 - -0.023208618 - -0.009979248 - -0.010696411 - -0.023208618 - -0.026748657 - -0.02923584 - 0.013801575 - -0.050323486 - -0.0059661865 - -0.004837036 - 0.01940918 - 0.00018620491 - 0.0016450882 - 0.019012451 - -0.048034668 - 0.034423828 - -0.033599854 - 0.020126343 - -0.04949951 - 0.071899414 - -0.06060791 - -0.043395996 - 0.012138367 - 0.022476196 - 0.029006958 - 0.04550171 - -0.03564453 - -0.015090942 - 0.055541992 - 0.014884949 - 0.020767212 - -0.01071167 - 0.046905518 - 0.033813477 - -0.04260254 - -0.00094127655 - 0.016708374 - -0.0011367798 - -0.030426025 - -0.03427124 - 0.01763916 - -0.012634277 - 0.030517578 - -0.055480957 - -0.054992676 - 0.056274414 - -0.0007033348 - -0.058624268 - 0.0061531067 - -0.008613586 - 0.016067505 - 0.003376007 - -0.01586914 - -0.025146484 - 0.008491516 - 0.053222656 - -0.02923584 - 0.021408081 ubinary: - - 1 - 218 - 231 - 179 - 247 - 164 - 161 - 62 - 191 - 23 - 200 - 16 - 114 - 29 - 23 - 240 - 145 - 187 - 72 - 119 - 96 - 126 - 121 - 10 - 76 - 43 - 200 - 122 - 213 - 7 - 202 - 249 - 86 - 2 - 36 - 27 - 252 - 194 - 25 - 128 - 33 - 39 - 171 - 156 - 160 - 195 - 73 - 189 - 223 - 53 - 68 - 228 - 37 - 94 - 20 - 41 - 87 - 228 - 164 - 213 - 68 - 237 - 97 - 150 - 212 - 244 - 61 - 39 - 244 - 195 - 6 - 129 - 125 - 116 - 59 - 100 - 36 - 107 - 179 - 48 - 228 - 21 - 192 - 247 - 136 - 118 - 130 - 26 - 243 - 33 - 40 - 181 - 227 - 245 - 230 - 31 - 109 - 149 - 61 - 106 - 83 - 74 - 174 - 98 - 75 - 6 - 250 - 135 - 211 - 129 - 197 - 225 - 81 - 67 - 86 - 68 - 2 - 159 - 118 - 119 - 100 - 8 - 245 - 79 - 59 - 34 - 146 - 205 meta: api_version: version: "1" api_version: v2 EmbedJob: type: object required: - job_id - status - created_at - input_dataset_id - model - truncate properties: job_id: type: string x-fern-audiences: - public description: ID of the embed job name: type: string x-fern-audiences: - public description: The name of the embed job status: type: string x-fern-audiences: - public description: The status of the embed job enum: - processing - complete - cancelling - cancelled - failed created_at: type: string x-fern-audiences: - public description: The creation date of the embed job format: date-time input_dataset_id: type: string x-fern-audiences: - public description: ID of the input dataset output_dataset_id: type: string x-fern-audiences: - public description: ID of the resulting output dataset model: type: string x-fern-audiences: - public description: ID of the model used to embed truncate: type: string x-fern-audiences: - public description: The truncation option used enum: - START - END meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public ListEmbedJobResponse: type: object properties: embed_jobs: type: array items: $ref: "#/components/schemas/EmbedJob" x-fern-audiences: - public CreateEmbedJobRequest: type: object required: - model - dataset_id - input_type properties: model: type: string x-fern-audiences: - public format: string description: | ID of the embedding model. Available models and corresponding embedding dimensions: - `embed-english-v3.0` : 1024 - `embed-multilingual-v3.0` : 1024 - `embed-english-light-v3.0` : 384 - `embed-multilingual-light-v3.0` : 384 dataset_id: type: string x-fern-audiences: - public description: ID of a [Dataset](https://docs.cohere.com/docs/datasets). The Dataset must be of type `embed-input` and must have a validation status `Validated` input_type: x-fern-audiences: - public $ref: "#/components/schemas/EmbedInputType" name: type: string x-fern-audiences: - public description: The name of the embed job. embedding_types: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/EmbeddingType" description: |- Specifies the types of embeddings you want to get back. Not required and default is None, which returns the Embed Floats response type. Can be one or more of the following types. * `"float"`: Use this when you want to get back the default float embeddings. Valid for all models. * `"int8"`: Use this when you want to get back signed int8 embeddings. Valid for only v3 models. * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for only v3 models. * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for only v3 models. * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for only v3 models. truncate: type: string x-fern-audiences: - public description: | One of `START|END` to specify how the API will handle inputs longer than the maximum token length. Passing `START` will discard the start of the input. `END` will discard the end of the input. In both cases, input is discarded until the remaining input is exactly the maximum input token length for the model. default: END enum: - START - END CreateEmbedJobResponse: type: object required: - job_id description: Response from creating an embed job. properties: job_id: type: string x-fern-audiences: - public meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public RerankDocument: type: object x-fern-type: map properties: text: type: string x-fern-audiences: - public description: The text of the document to rerank. required: - text ClassifyExample: type: object properties: text: type: string x-fern-audiences: - public writeOnly: true label: type: string x-fern-audiences: - public writeOnly: true writeOnly: true DatasetValidationStatus: x-fern-audiences: - public description: The validation status of the dataset type: string enum: - unknown - queued - processing - failed - validated - skipped DatasetType: x-fern-audiences: - public description: The type of the dataset type: string enum: - embed-input - embed-result - cluster-result - cluster-outliers - reranker-finetune-input - single-label-classification-finetune-input - chat-finetune-input - multi-label-classification-finetune-input DatasetPart: type: object required: - id - name properties: id: type: string x-fern-audiences: - public description: The dataset part ID name: type: string x-fern-audiences: - public description: The name of the dataset part url: type: string x-fern-audiences: - public description: The download url of the file index: type: integer x-fern-audiences: - public format: int32 description: The index of the file size_bytes: type: integer x-fern-audiences: - public format: int32 description: The size of the file in bytes num_rows: type: integer x-fern-audiences: - public format: int32 description: The number of rows in the file original_url: type: string x-fern-audiences: - public description: The download url of the original file samples: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public description: The first few rows of the parsed file ParseInfo: type: object properties: separator: type: string x-fern-audiences: - public writeOnly: true delimiter: type: string x-fern-audiences: - public writeOnly: true writeOnly: true RerankerDataMetrics: type: object properties: num_train_queries: type: number format: int64 description: The number of training queries. x-fern-audiences: - public num_train_relevant_passages: type: number format: int64 description: The sum of all relevant passages of valid training examples. x-fern-audiences: - public num_train_hard_negatives: type: number format: int64 description: The sum of all hard negatives of valid training examples. x-fern-audiences: - public num_eval_queries: type: number format: int64 description: The number of evaluation queries. x-fern-audiences: - public num_eval_relevant_passages: type: number format: int64 description: The sum of all relevant passages of valid eval examples. x-fern-audiences: - public num_eval_hard_negatives: type: number format: int64 description: The sum of all hard negatives of valid eval examples. x-fern-audiences: - public ChatDataMetrics: type: object properties: num_train_turns: type: number format: int64 description: The sum of all turns of valid train examples. x-fern-audiences: - public num_eval_turns: type: number format: int64 description: The sum of all turns of valid eval examples. x-fern-audiences: - public preamble: type: string description: The preamble of this dataset. x-fern-audiences: - public LabelMetric: type: object properties: total_examples: type: number format: int64 description: Total number of examples for this label x-fern-audiences: - public label: type: string description: value of the label x-fern-audiences: - public samples: type: array items: type: string description: samples for this label x-fern-audiences: - public ClassifyDataMetrics: type: object properties: label_metrics: type: array items: $ref: "#/components/schemas/LabelMetric" FinetuneDatasetMetrics: type: object properties: trainable_token_count: type: number format: int64 description: The number of tokens of valid examples that can be used for training. x-fern-audiences: - public total_examples: type: number format: int64 description: The overall number of examples. x-fern-audiences: - public train_examples: type: number format: int64 description: The number of training examples. x-fern-audiences: - public train_size_bytes: type: number format: int64 description: The size in bytes of all training examples. x-fern-audiences: - public eval_examples: type: number format: int64 description: Number of evaluation examples. x-fern-audiences: - public eval_size_bytes: type: number format: int64 description: The size in bytes of all eval examples. x-fern-audiences: - public reranker_data_metrics: $ref: "#/components/schemas/RerankerDataMetrics" chat_data_metrics: $ref: "#/components/schemas/ChatDataMetrics" classify_data_metrics: $ref: "#/components/schemas/ClassifyDataMetrics" Metrics: type: object properties: finetune_dataset_metrics: $ref: "#/components/schemas/FinetuneDatasetMetrics" Dataset: type: object required: - id - name - created_at - updated_at - dataset_type - validation_status properties: id: type: string x-fern-audiences: - public description: The dataset ID name: type: string x-fern-audiences: - public description: The name of the dataset created_at: type: string x-fern-audiences: - public format: date-time description: The creation date updated_at: type: string x-fern-audiences: - public format: date-time description: The last update date dataset_type: x-fern-audiences: - public $ref: "#/components/schemas/DatasetType" validation_status: x-fern-audiences: - public $ref: "#/components/schemas/DatasetValidationStatus" validation_error: type: string x-fern-audiences: - public description: Errors found during validation schema: type: string x-fern-audiences: - public description: the avro schema of the dataset required_fields: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public preserve_fields: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public dataset_parts: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/DatasetPart" description: the underlying files that make up the dataset validation_warnings: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public description: warnings found during validation parse_info: $ref: "#/components/schemas/ParseInfo" metrics: $ref: "#/components/schemas/Metrics" ConnectorOAuth: type: object required: - authorize_url - token_url properties: client_id: type: string x-fern-audiences: - public description: The OAuth 2.0 client ID. This field is encrypted at rest. client_secret: type: string x-fern-audiences: - public description: The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. authorize_url: type: string x-fern-audiences: - public description: The OAuth 2.0 /authorize endpoint to use when users authorize the connector. token_url: type: string x-fern-audiences: - public description: The OAuth 2.0 /token endpoint to use when users authorize the connector. scope: type: string x-fern-audiences: - public description: The OAuth scopes to request when users authorize the connector. Connector: description: |- A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source. documents to help answer users. type: object required: - id - name - created_at - updated_at properties: id: type: string x-fern-audiences: - public description: |- The unique identifier of the connector (used in both `/connectors` & `/chat` endpoints). This is automatically created from the name of the connector upon registration. organization_id: type: string x-fern-audiences: - public description: |- The organization to which this connector belongs. This is automatically set to the organization of the user who created the connector. name: type: string x-fern-audiences: - public description: A human-readable name for the connector. description: type: string x-fern-audiences: - public description: A description of the connector. url: type: string x-fern-audiences: - public description: The URL of the connector that will be used to search for documents. created_at: type: string x-fern-audiences: - public format: date-time description: The UTC time at which the connector was created. updated_at: type: string x-fern-audiences: - public format: date-time description: The UTC time at which the connector was last updated. excludes: description: A list of fields to exclude from the prompt (fields remain in the document). type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public auth_type: description: "The type of authentication/authorization used by the connector. Possible values: [oauth, service_auth]" type: string x-fern-audiences: - public format: enum oauth: $ref: "#/components/schemas/ConnectorOAuth" x-fern-audiences: - public description: The OAuth 2.0 configuration for the connector. auth_status: type: string x-fern-audiences: - public enum: - valid - expired description: The OAuth status for the user making the request. One of ["valid", "expired", ""]. Empty string (field is omitted) means the user has not authorized the connector yet. active: type: boolean x-fern-audiences: - public description: Whether the connector is active or not. continue_on_failure: type: boolean x-fern-audiences: - public description: Whether a chat request should continue or not if the request to this connector fails. ListConnectorsResponse: type: object required: - connectors properties: connectors: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/Connector" total_count: type: number x-fern-audiences: - public description: Total number of connectors. readOnly: true CreateConnectorOAuth: required: - clientId - clientSecret - authorizeUrl - tokenUrl type: object properties: client_id: type: string x-fern-audiences: - public description: The OAuth 2.0 client ID. This fields is encrypted at rest. client_secret: type: string x-fern-audiences: - public description: The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response. authorize_url: type: string x-fern-audiences: - public description: The OAuth 2.0 /authorize endpoint to use when users authorize the connector. token_url: type: string x-fern-audiences: - public description: The OAuth 2.0 /token endpoint to use when users authorize the connector. scope: type: string x-fern-audiences: - public description: The OAuth scopes to request when users authorize the connector. AuthTokenType: type: string description: The token_type specifies the way the token is passed in the Authorization header. Valid values are "bearer", "basic", and "noscheme". enum: - bearer - basic - noscheme default: noscheme CreateConnectorServiceAuth: required: - type - token type: object properties: type: x-fern-audiences: - public $ref: "#/components/schemas/AuthTokenType" token: type: string x-fern-audiences: - public description: The token that will be used in the HTTP Authorization header when making requests to the connector. This field is encrypted at rest and never returned in a response. CreateConnectorRequest: type: object required: - name - url properties: name: type: string x-fern-audiences: - public description: A human-readable name for the connector. description: type: string x-fern-audiences: - public description: A description of the connector. url: type: string x-fern-audiences: - public description: The URL of the connector that will be used to search for documents. excludes: description: A list of fields to exclude from the prompt (fields remain in the document). type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public oauth: $ref: "#/components/schemas/CreateConnectorOAuth" x-fern-audiences: - public description: The OAuth 2.0 configuration for the connector. Cannot be specified if service_auth is specified. active: type: boolean x-fern-audiences: - public default: true description: Whether the connector is active or not. continue_on_failure: type: boolean x-fern-audiences: - public default: false description: Whether a chat request should continue or not if the request to this connector fails. service_auth: x-fern-audiences: - public $ref: "#/components/schemas/CreateConnectorServiceAuth" description: The service to service authentication configuration for the connector. Cannot be specified if oauth is specified. CreateConnectorResponse: type: object required: - connector properties: connector: $ref: "#/components/schemas/Connector" GetConnectorResponse: type: object required: - connector properties: connector: $ref: "#/components/schemas/Connector" DeleteConnectorResponse: type: object UpdateConnectorRequest: type: object properties: name: type: string x-fern-audiences: - public description: A human-readable name for the connector. url: type: string x-fern-audiences: - public description: The URL of the connector that will be used to search for documents. excludes: description: A list of fields to exclude from the prompt (fields remain in the document). type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public oauth: $ref: "#/components/schemas/CreateConnectorOAuth" x-fern-audiences: - public description: The OAuth 2.0 configuration for the connector. Cannot be specified if service_auth is specified. active: type: boolean x-fern-audiences: - public default: true continue_on_failure: type: boolean x-fern-audiences: - public default: false service_auth: x-fern-audiences: - public $ref: "#/components/schemas/CreateConnectorServiceAuth" description: The service to service authentication configuration for the connector. Cannot be specified if oauth is specified. UpdateConnectorResponse: type: object required: - connector properties: connector: $ref: "#/components/schemas/Connector" OAuthAuthorizeResponse: type: object properties: redirect_url: type: string x-fern-audiences: - public description: The OAuth 2.0 redirect url. Redirect the user to this url to authorize the connector. ConnectorLog: type: object required: - id - connector_id - request_id - user_id - organization_id - created_at - status_code - duration_millis properties: id: type: string description: Unique identifier for the connector log connector_id: type: string description: Unique identifier for the connector request_id: type: string description: Unique identifier for the request user_id: type: string description: Unique identifier for the user organization_id: type: string description: Unique identifier for the organization created_at: type: string description: Time of connector log creation in RFC3339 format format: date-time example: 2023-04-28T21:00:56.646257Z status_code: type: integer description: HTTP status code of the request duration_millis: type: integer description: Duration of the request in milliseconds error_message: type: string description: Error message of the request GetConnectorsLogsResponse: type: object required: - connector_logs - total properties: connector_logs: type: array items: $ref: "#/components/schemas/ConnectorLog" total: type: number description: Total number of connector logs readOnly: true FeedbackResponse: type: object TokenLikelihood: type: object properties: encoded: description: Tokenized text type: integer x-fern-audiences: - public decoded: description: Detokenized text type: string x-fern-audiences: - public log_likelihood: description: Non normalized probability of the token type: number x-fern-audiences: - public LogLikelihoodResponse: type: object required: - id - prompt_tokens - completion_tokens - raw_prompt_tokens properties: id: type: string x-fern-audiences: - public prompt_tokens: description: Probabilities for tokens in the request prompt type: array x-fern-audiences: - public items: $ref: "#/components/schemas/TokenLikelihood" completion_tokens: description: Probabilities for tokens in the request completion type: array x-fern-audiences: - public items: $ref: "#/components/schemas/TokenLikelihood" raw_prompt_tokens: description: Probabilities for tokens in the request raw_prompt type: array x-fern-audiences: - public items: $ref: "#/components/schemas/TokenLikelihood" meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public Cluster: type: object properties: id: type: string x-fern-audiences: - public keywords: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public description: type: string x-fern-audiences: - public size: type: integer x-fern-audiences: - public sample_elements: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public GetClusterJobResponse: type: object required: - job_id properties: job_id: type: string x-fern-audiences: - public created_at: type: string x-fern-audiences: - public description: Time of job creation in RFC3339 format format: date-time example: 2023-04-28T21:00:56.646257Z readOnly: true embeddings_url: type: string x-fern-audiences: - public description: The input file URL used for the job readOnly: true input_dataset_id: type: string x-fern-audiences: - public description: The input dataset ID used for the job readOnly: true min_cluster_size: type: integer x-fern-audiences: - public description: The parameter used in the job creation. Please refer to the job creation endpoint for more details readOnly: true n_neighbors: type: integer x-fern-audiences: - public description: The parameter used in the job creation. Please refer to the job creation endpoint for more details readOnly: true is_deterministic: type: boolean x-fern-audiences: - public description: The parameter used in the job creation. Please refer to the job creation endpoint for more details readOnly: true status: type: string x-fern-audiences: - public enum: - unknown - processing - failed - complete - queued is_final_state: type: boolean x-fern-audiences: - public description: A boolean indicating whether the job is in a final state, whether completed or failed readOnly: true output_clusters_url: type: string x-fern-audiences: - public description: The output file URL for the clusters (signed url that expires) readOnly: true output_outliers_url: type: string x-fern-audiences: - public description: The output file URL for the outliers (signed url that expires) readOnly: true clusters: type: array x-fern-audiences: - public description: The list of cluster summaries for the job readOnly: true items: $ref: "#/components/schemas/Cluster" error: type: string x-fern-audiences: - public meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public description: Response for getting a cluster job. ListClusterJobsResponse: type: object required: - jobs properties: jobs: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/GetClusterJobResponse" total_count: type: integer x-fern-audiences: - public meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public CreateClusterJobRequest: type: object required: - embeddings_url properties: embeddings_url: type: string x-fern-audiences: - public input_dataset_id: type: string x-fern-audiences: - public min_cluster_size: type: integer x-fern-audiences: - public description: Defaults to `10`. Parameter for HDBSCAN. Only clusters with this number of elements will be returned with a positive cluster number. default: 10 minimum: 1 n_neighbors: type: integer x-fern-audiences: - public description: Parameter for UMAP. A scalar governing how to balance global vs local structure in the data. minimum: 2 maximum: 100 default: 15 is_deterministic: type: boolean x-fern-audiences: - public description: Parameter for UMAP. A boolean governing whether the embeddings from UMAP (that will be clustered with HDBSCAN) are deterministic. default: true generate_descriptions: type: boolean x-fern-audiences: - public CreateClusterJobResponse: type: object required: - job_id properties: job_id: type: string x-fern-audiences: - public description: Response for creating a cluster job. UpdateClusterJobRequest: type: object properties: status: type: string x-fern-audiences: - public enum: - unknown - processing - failed - complete - queued clusters: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/Cluster" output_clusters_gs_path: type: string x-fern-audiences: - public output_outliers_gs_path: type: string x-fern-audiences: - public error: type: string x-fern-audiences: - public input_tracking_metrics: type: object x-fern-audiences: - public output_tracking_metrics: type: object x-fern-audiences: - public UpdateClusterJobResponse: type: object required: - job_id properties: job_id: type: string x-fern-audiences: - public description: Response for updating a cluster job. CompatibleEndpoint: type: string description: One of the Cohere API endpoints that the model can be used with. enum: - chat - embed - classify - summarize - rerank - rate - generate GetModelResponse: description: Contains information about the model and which API endpoints it can be used with. type: object properties: name: type: string x-fern-audiences: - public description: Specify this name in the `model` parameter of API requests to use your chosen model. endpoints: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/CompatibleEndpoint" description: The API endpoints that the model is compatible with. finetuned: type: boolean x-fern-audiences: - public description: Whether the model has been fine-tuned or not. context_length: type: number x-fern-audiences: - public description: The maximum number of tokens that the model can process in a single request. Note that not all of these tokens are always available due to special tokens and preambles that Cohere has added by default. tokenizer_url: type: string x-fern-audiences: - public description: Public URL to the tokenizer's configuration file. default_endpoints: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/CompatibleEndpoint" description: The API endpoints that the model is default to. ListModelsResponse: type: object required: - models properties: models: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/GetModelResponse" next_page_token: type: string x-fern-audiences: - public description: A token to retrieve the next page of results. Provide in the page_token parameter of the next request. BaseType: type: string enum: - BASE_TYPE_UNSPECIFIED - BASE_TYPE_GENERATIVE - BASE_TYPE_CLASSIFICATION - BASE_TYPE_RERANK - BASE_TYPE_CHAT default: BASE_TYPE_UNSPECIFIED description: |- The possible types of fine-tuned models. - BASE_TYPE_UNSPECIFIED: Unspecified model. - BASE_TYPE_GENERATIVE: Deprecated: Generative model. - BASE_TYPE_CLASSIFICATION: Classification model. - BASE_TYPE_RERANK: Rerank model. - BASE_TYPE_CHAT: Chat model. x-fern-sdk-group-name: - finetuning - finetuning Strategy: type: string enum: - STRATEGY_UNSPECIFIED - STRATEGY_VANILLA - STRATEGY_TFEW default: STRATEGY_UNSPECIFIED description: |- The possible strategy used to serve a fine-tuned models. - STRATEGY_UNSPECIFIED: Unspecified strategy. - STRATEGY_VANILLA: Deprecated: Serve the fine-tuned model on a dedicated GPU. - STRATEGY_TFEW: Serve the fine-tuned model on a shared GPU. x-fern-sdk-group-name: - finetuning - finetuning BaseModel: type: object properties: name: type: string description: The name of the base model. version: type: string description: read-only. The version of the base model. readOnly: true base_type: $ref: "#/components/schemas/BaseType" description: The type of the base model. strategy: $ref: "#/components/schemas/Strategy" description: "Deprecated: The fine-tuning strategy." description: The base model used for fine-tuning. required: - base_type x-fern-sdk-group-name: - finetuning - finetuning LoraTargetModules: type: string enum: - LORA_TARGET_MODULES_UNSPECIFIED - LORA_TARGET_MODULES_QV - LORA_TARGET_MODULES_QKVO - LORA_TARGET_MODULES_QKVO_FFN default: LORA_TARGET_MODULES_UNSPECIFIED description: |- The possible combinations of LoRA modules to target. - LORA_TARGET_MODULES_UNSPECIFIED: Unspecified LoRA target modules. - LORA_TARGET_MODULES_QV: LoRA adapts the query and value matrices in transformer attention layers. - LORA_TARGET_MODULES_QKVO: LoRA adapts query, key, value, and output matrices in attention layers. - LORA_TARGET_MODULES_QKVO_FFN: LoRA adapts attention projection matrices and feed-forward networks (FFN). x-fern-sdk-group-name: - finetuning - finetuning Hyperparameters: type: object properties: early_stopping_patience: type: integer format: int32 description: |- Stops training if the loss metric does not improve beyond the value of `early_stopping_threshold` after this many times of evaluation. early_stopping_threshold: type: number format: double description: How much the loss must improve to prevent early stopping. train_batch_size: type: integer format: int32 description: |- The batch size is the number of training examples included in a single training pass. train_epochs: type: integer format: int32 description: The number of epochs to train for. learning_rate: type: number format: double description: The learning rate to be used during training. lora_alpha: type: integer format: int32 description: |- Controls the scaling factor for LoRA updates. Higher values make the updates more impactful. lora_rank: type: integer format: int32 description: |- Specifies the rank for low-rank matrices. Lower ranks reduce parameters but may limit model flexibility. lora_target_modules: $ref: "#/components/schemas/LoraTargetModules" description: The combination of LoRA modules to target. description: The fine-tuning hyperparameters. x-fern-sdk-group-name: - finetuning - finetuning WandbConfig: type: object properties: project: type: string description: The WandB project name to be used during training. api_key: type: string description: The WandB API key to be used during training. entity: type: string description: The WandB entity name to be used during training. description: The Weights & Biases configuration. required: - project - api_key x-fern-sdk-group-name: - finetuning - finetuning Settings: type: object properties: base_model: $ref: "#/components/schemas/BaseModel" description: The base model to fine-tune. dataset_id: type: string description: The data used for training and evaluating the fine-tuned model. hyperparameters: $ref: "#/components/schemas/Hyperparameters" description: Fine-tuning hyper-parameters. multi_label: type: boolean description: read-only. Whether the model is single-label or multi-label (only for classification). readOnly: true wandb: $ref: "#/components/schemas/WandbConfig" description: The Weights & Biases configuration (Chat fine-tuning only). description: The configuration used for fine-tuning. required: - base_model - dataset_id x-fern-sdk-group-name: - finetuning - finetuning Status: type: string enum: - STATUS_UNSPECIFIED - STATUS_FINETUNING - STATUS_DEPLOYING_API - STATUS_READY - STATUS_FAILED - STATUS_DELETED - STATUS_TEMPORARILY_OFFLINE - STATUS_PAUSED - STATUS_QUEUED default: STATUS_UNSPECIFIED description: |- The possible stages of a fine-tuned model life-cycle. - STATUS_UNSPECIFIED: Unspecified status. - STATUS_FINETUNING: The fine-tuned model is being fine-tuned. - STATUS_DEPLOYING_API: Deprecated: The fine-tuned model is being deployed. - STATUS_READY: The fine-tuned model is ready to receive requests. - STATUS_FAILED: The fine-tuned model failed. - STATUS_DELETED: The fine-tuned model was deleted. - STATUS_TEMPORARILY_OFFLINE: Deprecated: The fine-tuned model is temporarily unavailable. - STATUS_PAUSED: Deprecated: The fine-tuned model is paused (Vanilla only). - STATUS_QUEUED: The fine-tuned model is queued for training. x-fern-sdk-group-name: - finetuning - finetuning FinetunedModel: type: object properties: id: type: string description: read-only. FinetunedModel ID. readOnly: true name: type: string description: FinetunedModel name (e.g. `foobar`). creator_id: type: string description: read-only. User ID of the creator. readOnly: true organization_id: type: string description: read-only. Organization ID. readOnly: true settings: $ref: "#/components/schemas/Settings" description: FinetunedModel settings such as dataset, hyperparameters... status: $ref: "#/components/schemas/Status" description: read-only. Current stage in the life-cycle of the fine-tuned model. readOnly: true created_at: type: string format: date-time description: read-only. Creation timestamp. readOnly: true updated_at: type: string format: date-time description: read-only. Latest update timestamp. readOnly: true completed_at: type: string format: date-time description: read-only. Timestamp for the completed fine-tuning. readOnly: true last_used: type: string format: date-time description: read-only. Timestamp for the latest request to this fine-tuned model. readOnly: true description: This resource represents a fine-tuned model. required: - name - settings x-fern-sdk-group-name: - finetuning - finetuning ListFinetunedModelsResponse: type: object properties: finetuned_models: type: array items: type: object $ref: "#/components/schemas/FinetunedModel" description: List of fine-tuned models matching the request. next_page_token: type: string description: |- Pagination token to retrieve the next page of results. If the value is "", it means no further results for the request. total_size: type: integer format: int32 description: Total count of results. description: Response to a request to list fine-tuned models. x-fern-sdk-group-name: - finetuning - finetuning Error: type: object properties: message: type: string description: A developer-facing error message. description: Error is the response for any unsuccessful event. x-fern-sdk-group-name: - finetuning - finetuning CreateFinetunedModelResponse: type: object properties: finetuned_model: $ref: "#/components/schemas/FinetunedModel" description: Information about the fine-tuned model. description: Response to request to create a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning GetFinetunedModelResponse: type: object properties: finetuned_model: $ref: "#/components/schemas/FinetunedModel" description: Information about the fine-tuned model. description: Response to a request to get a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning DeleteFinetunedModelResponse: type: object description: Response to request to delete a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning UpdateFinetunedModelResponse: type: object properties: finetuned_model: $ref: "#/components/schemas/FinetunedModel" description: Information about the fine-tuned model. description: Response to a request to update a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning Event: type: object properties: user_id: type: string description: ID of the user who initiated the event. Empty if initiated by the system. status: $ref: "#/components/schemas/Status" description: Status of the fine-tuned model. created_at: type: string format: date-time description: Timestamp when the event happened. description: A change in status of a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning ListEventsResponse: type: object properties: events: type: array items: type: object $ref: "#/components/schemas/Event" description: List of events for the fine-tuned model. next_page_token: type: string description: |- Pagination token to retrieve the next page of results. If the value is "", it means no further results for the request. total_size: type: integer format: int32 description: Total count of results. description: Response to a request to list events of a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning TrainingStepMetrics: type: object properties: created_at: type: string format: date-time description: Creation timestamp. step_number: type: integer format: int32 description: Step number. metrics: type: object additionalProperties: type: number format: double description: Map of names and values for each evaluation metrics. description: The evaluation metrics at a given step of the training of a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning ListTrainingStepMetricsResponse: type: object properties: step_metrics: type: array items: type: object $ref: "#/components/schemas/TrainingStepMetrics" description: The metrics for each step the evaluation was run on. next_page_token: type: string description: |- Pagination token to retrieve the next page of results. If the value is "", it means no further results for the request. description: Response to a request to list training-step metrics of a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning responses: BadRequest: description: | This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields content: application/json: schema: type: object properties: data: type: string Unauthorized: description: | This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions content: application/json: schema: type: object properties: data: type: string Forbidden: description: | This error indicates that the operation attempted to be performed is not allowed. This could be because: - The api token is invalid - The user does not have the necessary permissions content: application/json: schema: type: object properties: data: type: string NotFound: description: | This error is returned when a resource is not found. This could be because: - The endpoint does not exist - The resource does not exist eg model id, dataset id content: application/json: schema: type: object properties: data: type: string UnprocessableEntity: description: | This error is returned when the request is not well formed. This could be because: - JSON is invalid - The request is missing required fields - The request contains an invalid combination of fields content: application/json: schema: type: object properties: data: type: string RateLimit: description: Too many requests content: application/json: schema: type: object properties: data: type: string InvalidToken: description: | This error is returned when a request or response contains a deny-listed token. content: application/json: schema: type: object properties: data: type: string RequestCancelled: description: | This error is returned when a request is cancelled by the user. content: application/json: schema: type: object properties: data: type: string InternalServerError: description: | This error is returned when an uncategorised internal server error occurs. content: application/json: schema: type: object properties: data: type: string NotImplemented: description: | This error is returned when the requested feature is not implemented. content: application/json: schema: type: object properties: data: type: string ServiceUnavailable: description: | This error is returned when the service is unavailable. This could be due to: - Too many users trying to access the service at the same time content: application/json: schema: type: object properties: data: type: string GatewayTimeout: description: | This error is returned when a request to the server times out. This could be due to: - An internal services taking too long to respond content: application/json: schema: type: object properties: data: type: string