openapi: 3.1.0 info: title: API Reference version: "1.0" description: The Cohere API for interacting with Chat, Embed and Rerank models. 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 API (v1) 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Chat( context.TODO(), &cohere.ChatRequest{ Model: cohere.String("command-a-03-2025"), Message: "Tell me about LLMs", }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Default code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const response = await cohere.chat({ model: 'command-a-03-2025', message: 'Tell me about LLMs', }); 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() .model("command-a-03-2025") .message("Tell me about LLMs") .build()); System.out.println(response); } } - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.chat( model="command-a-03-2025", message="Tell me about LLMs", ) print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): return await co.chat( model="command-a-03-2025", message="Tell me about LLMs" ) 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 '{ "model": "command-a-03-2025", "message": "Tell me about LLMs" }' request: model: command-a-03-2025 message: Tell me about LLMs stream: false response: body: text: >- Large Language Models (LLMs) are advanced AI systems trained on vast amounts of text data to understand and generate human-like text. They use deep learning architectures, particularly transformers, to process and produce language. Key characteristics of LLMs include: 1. **Scale**: They're trained on billions or trillions of parameters, making them capable of understanding complex patterns in language. 2. **Versatility**: LLMs can perform various tasks like translation, summarization, question answering, and creative writing without being explicitly programmed for each task. 3. **Context Understanding**: They can maintain context over long conversations and generate coherent, contextually relevant responses. 4. **Few-shot Learning**: LLMs can often perform new tasks with just a few examples, adapting to new scenarios quickly. Popular examples include GPT (Generative Pre-trained Transformer) models, BERT, and Cohere's Command models. These models have revolutionized natural language processing and enabled new applications across industries. generation_id: f47ac10b-58cc-4372-a567-0e02b2c3d479 chat_history: - role: USER message: Tell me about LLMs - role: CHATBOT message: >- Large Language Models (LLMs) are advanced AI systems trained on vast amounts of text data to understand and generate human-like text. They use deep learning architectures, particularly transformers, to process and produce language. Key characteristics of LLMs include: 1. **Scale**: They're trained on billions or trillions of parameters, making them capable of understanding complex patterns in language. 2. **Versatility**: LLMs can perform various tasks like translation, summarization, question answering, and creative writing without being explicitly programmed for each task. 3. **Context Understanding**: They can maintain context over long conversations and generate coherent, contextually relevant responses. 4. **Few-shot Learning**: LLMs can often perform new tasks with just a few examples, adapting to new scenarios quickly. Popular examples include GPT (Generative Pre-trained Transformer) models, BERT, and Cohere's Command models. These models have revolutionized natural language processing and enabled new applications across industries. finish_reason: COMPLETE meta: api_version: version: '1' billed_units: input_tokens: 5 output_tokens: 198 tokens: input_tokens: 71 output_tokens: 198 - code-samples: - sdk: go name: Documents code: > package main import ( "context" "errors" "io" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.ChatStream( context.TODO(), &cohere.ChatStreamRequest{ Model: cohere.String("command-a-03-2025"), Message: "Tell me about LLMs", }, ) 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: > import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const response = await cohere.chat({ model: 'command-a-03-2025', 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() .model("command-a-03-2025") .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-a-03-2025", 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 '{ "model": "command-a-03-2025", "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: model: command-a-03-2025 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.ChatStream( context.TODO(), &cohere.ChatStreamRequest{ Model: cohere.String("command-a-03-2025"), Message: "Tell me about LLMs", }, ) 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: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const chatStream = await cohere.chatStream({ model: 'command-a-03-2025', message: 'Tell me about LLMs', }); 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() .model("command-a-03-2025") .message("Tell me about LLMs") .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( model="command-a-03-2025", message="Tell me about LLMs", ) 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 '{ "model": "command-a-03-2025", "stream": true, "message": "Tell me about LLMs" }' request: model: command-a-03-2025 message: hello! 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Chat( context.TODO(), &cohere.ChatRequest{ Model: cohere.String("command-a-03-2025"), 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: > import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const response = await cohere.chat({ model: 'command-a-03-2025', 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() .model("command-a-03-2025") .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( model="command-a-03-2025", 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 '{ "model": "command-a-03-2025", "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 } } } ] }' request: model: command-a-03-2025 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 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: | 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: deprecated: true 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: deprecated: true 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 `"enabled"`. Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments enum: - ENABLED - DISABLED - 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 raw_prompting: x-fern-audiences: - sdk-only type: boolean description: | When enabled, the user's prompt will be sent to the model without any pre-processing. Compatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments 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 newer Cohere models, starting with [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release) and [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release). **Note**: `command-r7b-12-2024` and newer models only support `"CONTEXTUAL"` and `"STRICT"` modes. 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 API (v2) 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" - $ref: "#/components/schemas/ChatDebugEvent" 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" debug: "#/components/schemas/ChatDebugEvent" 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: stream: description: | Defaults to `false`. When `true`, the response will be a SSE stream of events. Streaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated. type: boolean x-fern-audiences: - public model: x-fern-audiences: - public type: string description: The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models). messages: x-fern-audiences: - public $ref: "#/components/schemas/ChatMessages" tools: x-fern-audiences: - public type: array items: $ref: "#/components/schemas/ToolV2" description: | A list of tools (functions) available to the model. The model response may contain 'tool_calls' to the specified tools. Learn more in the [Tool Use guide](https://docs.cohere.com/docs/tools). strict_tools: x-fern-audiences: - public x-fern-availability: beta type: boolean description: | When set to `true`, tool calls in the Assistant message will be forced to follow the tool definition strictly. Learn more in the [Structured Outputs (Tools) guide](https://docs.cohere.com/docs/structured-outputs-json#structured-outputs-tools). **Note**: The first few requests with a new set of tools will take longer to process. documents: x-fern-audiences: - public 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: x-fern-audiences: - public $ref: "#/components/schemas/CitationOptions" response_format: x-fern-audiences: - public $ref: "#/components/schemas/ResponseFormatV2" safety_mode: x-fern-audiences: - public 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` and `documents` parameters. **Note**: This parameter is only compatible newer Cohere models, starting with [Command R 08-2024](https://docs.cohere.com/docs/command-r#august-2024-release) and [Command R+ 08-2024](https://docs.cohere.com/docs/command-r-plus#august-2024-release). **Note**: `command-r7b-12-2024` and newer models only support `"CONTEXTUAL"` and `"STRICT"` modes. max_tokens: x-fern-audiences: - public type: integer description: | The maximum number of output tokens the model will generate in the response. If not set, `max_tokens` defaults to the model's maximum output token limit. You can find the maximum output token limits for each model in the [model documentation](https://docs.cohere.com/docs/models). **Note**: Setting a low value may result in incomplete generations. In such cases, the `finish_reason` field in the response will be set to `"MAX_TOKENS"`. **Note**: If `max_tokens` is set higher than the model's maximum output token limit, the generation will be capped at that model-specific maximum limit. stop_sequences: x-fern-audiences: - public 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: x-fern-audiences: - public 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: x-fern-audiences: - public 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: x-fern-audiences: - public 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: x-fern-audiences: - public 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: x-fern-audiences: - public type: integer 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: x-fern-audiences: - public 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: x-fern-audiences: - public type: boolean description: | Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response. tool_choice: x-fern-audiences: - public enum: - REQUIRED - NONE description: | Used to control whether or not the model will be forced to use a tool when answering. When `REQUIRED` is specified, the model will be forced to use at least one of the user-defined tools, and the `tools` parameter must be passed in the request. When `NONE` is specified, the model will be forced **not** to use one of the specified tools, and give a direct response. If tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not. **Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer. thinking: x-fern-audiences: - public $ref: "#/components/schemas/Thinking" priority: x-fern-audiences: - public type: integer default: 0 minimum: 0 maximum: 999 description: "Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped." responses: "200": description: OK content: application/json: schema: oneOf: - $ref: "#/components/schemas/ChatResponseV2" - $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-a-03-2025', messages: [ { role: 'user', content: 'Tell me about LLMs', }, ], }); console.log(response); })(); - sdk: python name: Default code: > import cohere co = cohere.ClientV2() response = co.chat( model="command-a-03-2025", messages=[{"role": "user", "content": "Tell me about LLMs"}], ) print(response) - sdk: python name: Async code: > import cohere import asyncio co = cohere.AsyncClientV2() async def main(): response = await co.chat( model="command-a-03-2025", messages=[{"role": "user", "content": "Tell me about LLMs"}], ) print(response) asyncio.run(main()) - sdk: go name: Default code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.Chat( context.TODO(), &cohere.V2ChatRequest{ Model: "command-a-03-2025", Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ String: "Tell me about LLMs", }, }, }, }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - 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-a-03-2025") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content(UserMessageContent.of("Tell me about LLMs")) .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-a-03-2025", "messages": [ { "role": "user", "content": "Tell me about LLMs" } ] }' request: model: 'command-a-03-2025' 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-a-03-2025', messages: [ { role: 'user', content: 'Who is more popular: Nsync or Backstreet Boys?', }, ], documents: [ { data: { 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.', }, }, { data: { 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.", }, }, { data: { 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.", }, }, { data: { 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: python name: Documents code: > import cohere co = cohere.ClientV2() response = co.chat( model="command-a-03-2025", messages=[{ "role": "user", "content": "Who is more popular: Nsync or Backstreet Boys?" }], documents=[ { "data": { "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.", } }, { "data": { "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.", } }, { "data": { "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.", } }, { "data": { "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: 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; import java.util.Map; 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-a-03-2025") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content( UserMessageContent.of( "Who is more popular: Nsync or Backstreet Boys?")) .build()))) .documents( List.of( V2ChatRequestDocumentsItem.of( Document.builder() .data( 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.")) .build()), V2ChatRequestDocumentsItem.of( Document.builder() .data( 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.")) .build()), V2ChatRequestDocumentsItem.of( Document.builder() .data( 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.")) .build()), V2ChatRequestDocumentsItem.of( Document.builder() .data( 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()))) .build()); System.out.println(response); } } - sdk: go name: Documents code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.Chat( context.TODO(), &cohere.V2ChatRequest{ Model: "command-a-03-2025", Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ String: "Who is more popular: Nsync or Backstreet Boys?", }, }, }, }, Documents: []*cohere.V2ChatRequestDocumentsItem{ { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - 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-a-03-2025", "documents": [ { "data": { "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." } }, { "data": { "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 havent 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 wasnt 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": { "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 womens – 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." } }, { "data": { "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, Ill 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 NSYNCs 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?" } ] }' request: model: 'command-a-03-2025' 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: Default code: | const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const stream = await cohere.chatStream({ model: 'command-a-03-2025', messages: [ { role: 'user', content: 'Tell me about LLMs', }, ], }); for await (const chatEvent of stream) { if (chatEvent.type === 'content-delta') { console.log(chatEvent.delta?.message); } } })(); - sdk: python name: Default code: > import cohere co = cohere.ClientV2() response = co.chat_stream( model="command-a-03-2025", messages=[{"role": "user", "content": "Tell me about LLMs"}], ) for event in response: if event.type == "content-delta": print(event.delta.message.content.text, end="") - sdk: java name: Default 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-a-03-2025") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content(UserMessageContent.of("Tell me about LLMs")) .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: go name: Default code: > package main import ( "context" "errors" "io" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.ChatStream( context.TODO(), &cohere.V2ChatStreamRequest{ Model: "command-a-03-2025", Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ String: "Tell me about LLMs", }, }, }, }, }, ) 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.ContentDelta != nil { log.Printf("%+v", message) } } } - 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 '{ "stream": true, "model": "command-a-03-2025", "messages": [ { "role": "user", "content": "Tell me about LLMs" } ] }' request: model: 'command-a-03-2025' messages: - role: 'user' content: 'Tell me about LLMs' stream: true response: stream: - event: message-start data: type: message-start id: 29f14a5a-11de-4cae-9800-25e4747408ea delta: message: role: 'assistant' - event: content-start data: type: content-start index: 0 delta: message: content: type: 'text' text: '' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: 'LL' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: 'Ms' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' stand' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' for' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' Large' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' Language' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' Models' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ',' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' which' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' are' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' a' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' type' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' of' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' neural' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' network' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' model' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' specialized' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' in' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' processing' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' and' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' generating' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' human' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' language' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: '.' - event: content-end data: type: content-end index: 0 - event: message-end data: type: message-end delta: finish_reason: COMPLETE usage: billed_units: input_tokens: 5 output_tokens: 26 tokens: input_tokens: 71 output_tokens: 26 - code-samples: - sdk: typescript name: Tools code: > const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const response = await cohere.chat({ model: 'command-a-03-2025', 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?", }, ], 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', }, }, required: ['day'], }, }, }, { type: 'function', function: { name: 'query_product_catalog', description: 'Connects to 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', }, }, required: ['category'], }, }, }, ], }); console.log(response); })(); - sdk: python name: Tools code: > import cohere co = cohere.ClientV2() response = co.chat( model="command-a-reasoning-08-2025", 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?", } ], 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", } }, "required": ["day"], }, }, ), cohere.ToolV2( type="function", function={ "name": "query_product_catalog", "description": "Connects to 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", } }, "required": ["category"], }, }, ), ], ) 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-a-reasoning-08-2025") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content( UserMessageContent.of( "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?")) .build()))) .tools( List.of( ToolV2.builder() .type("function") .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( "type", "object", "properties", Map.of( "day", Map.of( "description", "Retrieves sales data for this day," + " formatted as YYYY-MM-DD.", "type", "string")), "required", List.of("day"))) .build()) .build(), ToolV2.builder() .type("function") .function( ToolV2Function.builder() .name("query_product_catalog") .description( "Connects to a product catalog with information" + " about all the products being sold, including" + " categories, prices, and stock levels.") .parameters( Map.of( "type", "object", "properties", Map.of( "category", Map.of( "description", "Retrieves product information data for all" + " products in this category.", "type", "string")), "required", List.of("category"))) .build()) .build())) .build()); System.out.println(response); } } - sdk: go name: Tools code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.Chat( context.TODO(), &cohere.V2ChatRequest{ Model: "command-a-03-2025", Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ String: "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.ToolV2{ { Function: &cohere.ToolV2Function{ Name: "query_daily_sales_report", Description: cohere.String("Connects to a database to retrieve overall sales volumes and sales information for a given day."), Parameters: map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "day": map[string]interface{}{ "type": "string", "description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.", }, }, "required": []string{"day"}, }, }, }, { Function: &cohere.ToolV2Function{ Name: "query_product_catalog", Description: cohere.String("Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels."), Parameters: map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "category": map[string]interface{}{ "type": "string", "description": "Retrieves product information data for all products in this category.", }, }, "required": []string{"category"}, }, }, }, }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - 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-a-03-2025", "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: '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: - 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 x-fern-type-name: tools-by6k68 - 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 x-fern-type-name: tools-o09qd6 stream: false response: body: id: 9e5f00aa-bf1e-481a-abe3-0eceac18c3ec message: role: 'assistant' content: - type: 'thinking' thinking: "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 - code-samples: - sdk: typescript name: Images code: | const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const response = await cohere.chat({ model: 'command-a-vision-07-2025', messages: [ { role: 'user', content: [ { type: 'text', text: 'Describe this image' }, { type: 'image_url', imageUrl: { // Can be either a base64 data URI or a web URL. url: 'https://cohere.com/favicon-32x32.png', detail: 'auto', }, }, ], }, ], }); console.log(response.message.content[0].text); })(); - sdk: python name: Images code: >- import cohere co = cohere.ClientV2() response = co.chat( model="command-a-vision-07-2025", messages=[ { "role": "user", "content": [ { "type": "text", "text": "Describe this image" }, { "type": "image_url", "image_url": { # Can be either a base64 data URI or a web URL. "url": "https://cohere.com/favicon-32x32.png", "detail": "auto" } } ] } ] ) print(response) - sdk: java name: Images code: > /* (C)2024 */ package chatv2post; import java.util.List; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2ChatRequest; import com.cohere.api.types.ChatMessageV2; import com.cohere.api.types.ChatResponse; import com.cohere.api.types.Content; import com.cohere.api.types.ImageContent; import com.cohere.api.types.ImageUrl; import com.cohere.api.types.TextContent; import com.cohere.api.types.UserMessage; import com.cohere.api.types.UserMessageContent; public class Image { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ChatResponse response = cohere .v2() .chat( V2ChatRequest.builder() .model("command-a-vision-07-2025") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content( UserMessageContent.of( List.of( Content.text( TextContent.builder() .text("Describe this image") .build()), Content.imageUrl( ImageContent.builder() .imageUrl( ImageUrl.builder() // Can be either a base64 data URI or a web URL. .url( "https://cohere.com/favicon-32x32.png") .build()) .build())))) .build()))) .build()); System.out.println(response); } } - sdk: go name: Images code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.Chat( context.TODO(), &cohere.V2ChatRequest{ Model: "command-a-vision-07-2025", Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ ContentList: []*cohere.Content{ {Type: "text", Text: &cohere.ChatTextContent{Text: "Describe this image"}}, {Type: "image_url", ImageUrl: &cohere.ImageContent{ ImageUrl: &cohere.ImageUrl{ // Can be either a base64 data URI or a web URL. Url: "https://cohere.com/favicon-32x32.png", Detail: cohere.ImageUrlDetailAuto.Ptr(), }, }}, }, }, }, }, }, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: curl name: Images 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-a-vision-07-2025", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe the logo in this image" }, { "type": "image_url", "image_url": { "url": "https://cohere.com/favicon-32x32.png", "detail": "auto" } } ] } ] }' request: model: 'command-a-vision-07-2025' messages: - role: 'user' content: - type: 'text' text: 'Describe this image' - type: 'image_url' image_url: url: 'https://cohere.com/favicon-32x32.png' detail: 'auto' stream: false response: body: id: c14c80c3-18eb-4519-9460-6c92edd8cfb4 message: role: 'assistant' content: - type: 'text' text: | The image you've provided is quite abstract and blurred, making it challenging to discern specific details. However, I can describe the general shapes and colors present: 1. **Shapes and Colors:** - There are three main shapes in the image. - The largest shape at the top is a dark green, irregular oval. - Below it, on the left, there's a smaller, bright orange circle. - To the right of the orange circle, there's another oval shape, this one in a light purple color. 2. **Arrangement:** - The green oval is positioned at the top center of the image. - The orange circle is directly below the green oval, slightly to the left. - The purple oval is to the right of the orange circle, forming a rough triangular arrangement with the other two shapes. 3. **Blurriness:** - The entire image is blurred, which softens the edges of the shapes and makes it difficult to identify any specific details or textures within the shapes. Given the abstract nature of the image, it's open to interpretation. The shapes could represent various objects or concepts depending on the viewer's perspective. If you have any specific questions about the image or need further clarification, feel free to ask! 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 stream = await cohere.chatStream({ model: 'command-a-03-2025', documents: [ { data: { 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.', }, }, { data: { 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.", }, }, { data: { 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.", }, }, { data: { 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.", }, }, ], messages: [ { role: 'user', content: 'Who is more popular: Nsync or Backstreet Boys?', }, ], }); for await (const chatEvent of stream) { console.log(chatEvent); } })(); - sdk: python name: Documents code: >+ import cohere co = cohere.ClientV2() response = co.chat_stream( model="command-a-03-2025", messages=[{"role": "user", "content": "Who is more popular: Nsync or Backstreet Boys?"}], documents=[ { "data": { "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.", } }, { "data": { "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.", } }, { "data": { "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.", } }, { "data": { "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.", } } ], ) for event in response: if event.type == "message-start": print("\nMessage started.") elif event.type == "message-end": print("\nMessage ended.") elif event.type == "content-delta": print(event.delta.message.content.text, end="") - sdk: java name: Documents code: | /* (C)2024 */ package chatv2post; import com.cohere.api.Cohere; import com.cohere.api.resources.v2.requests.V2ChatStreamRequest; import com.cohere.api.resources.v2.types.V2ChatStreamRequestDocumentsItem; import com.cohere.api.types.*; import java.util.List; public class StreamDocuments { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); Iterable response = cohere .v2() .chatStream( V2ChatStreamRequest.builder() .model("command-a-03-2025") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content(UserMessageContent.of("Who is the most popular?")) .build()))) .documents( List.of( V2ChatStreamRequestDocumentsItem.of( "↓ Skip to Main Content\n\n" + "Music industry – One step closer to being accurate\n\n" + "CSPC: Backstreet Boys Popularity Analysis\n\n" + "At one point, Backstreet Boys defined success: massive album" + " sales..."), V2ChatStreamRequestDocumentsItem.of( "↓ Skip to Main Content\n\n" + "CSPC: NSYNC Popularity Analysis\n\n" + "At the turn of the millennium, three teen acts were huge:" + " Backstreet Boys, Britney Spears, and NSYNC..."), V2ChatStreamRequestDocumentsItem.of( "Yet the way many music consumers embraced Backstreet Boys deserves" + " its own chapter..."), V2ChatStreamRequestDocumentsItem.of( "Was NSYNC only successful in the US, or were they a global" + " phenomenon?..."))) .build()); for (StreamedChatResponseV2 chatResponse : response) { if (chatResponse.isContentDelta()) { String text = chatResponse .getContentDelta() .flatMap(ChatContentDeltaEvent::getDelta) .flatMap(ChatContentDeltaEventDelta::getMessage) .flatMap(ChatContentDeltaEventDeltaMessage::getContent) .flatMap(ChatContentDeltaEventDeltaMessageContent::getText) .orElse(""); System.out.println(text); } } } } - sdk: go name: Documents code: > package main import ( "context" "errors" "io" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.ChatStream( context.TODO(), &cohere.V2ChatStreamRequest{ Model: "command-a-03-2025", Documents: []*cohere.V2ChatStreamRequestDocumentsItem{ { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, { Document: &cohere.Document{ Data: map[string]interface{}{ "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.", }, }, }, }, Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ String: "Who is more popular: Nsync or Backstreet Boys?", }, }, }, }, }, ) if err != nil { log.Fatal(err) } 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 } // Log the received message if message.ContentDelta != nil { log.Printf("%+v", message) } } } - 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 "{ \"stream\": true, \"model\": \"command-a-03-2025\", \"documents\": [ { \"data\": { \"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.\" } }, { \"data\": { \"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.\" } }, { \"data\": { \"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.\" } }, { \"data\": { \"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.\" } } ], \"messages\": [ { \"role\": \"user\", \"content\": \"Who is more popular: Nsync or Backstreet Boys?\" } ] }" request: stream: true model: 'command-a-03-2025' 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?' response: stream: - event: message-start data: type: message-start id: 8268c123-8264-4046-afd9-ae3d328f85f3 delta: message: role: 'assistant' - event: content-start data: type: content-start index: 0 delta: message: content: type: 'text' text: '' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: 'Both' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' Nsync' - event: citation-start data: type: citation-start index: 0 delta: message: citations: start: 5 end: 10 text: 'Nsync' sources: - type: 'document' id: '1' document: id: '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' type: 'TEXT_CONTENT' - event: citation-end data: type: citation-end index: 0 - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' and' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' Backstreet' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' Boys' - event: content-delta data: type: content-delta index: 0 delta: message: content: text: ' were' - event: content-end data: type: content-end index: 0 - event: message-end data: type: message-end delta: finish_reason: COMPLETE usage: billed_units: input_tokens: 18.0 output_tokens: 6.0 tokens: input_tokens: 1661.0 output_tokens: 19.0 - code-samples: - sdk: typescript name: Tools code: > const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const stream = await cohere.chatStream({ model: 'command-a-03-2025', 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?", }, ], 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', }, }, required: ['day'], }, }, }, { type: 'function', function: { name: 'query_product_catalog', description: 'Connects to 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', }, }, required: ['category'], }, }, }, ], }); for await (const chatEvent of stream) { if (chatEvent.type === 'tool-call-delta') { console.log(chatEvent.delta?.message); } } })(); - sdk: python name: Tools code: > import cohere co = cohere.ClientV2() response = co.chat_stream( model="command-a-03-2025", 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?", } ], 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", } }, "required": ["day"], }, }, ), cohere.ToolV2( type="function", function={ "name": "query_product_catalog", "description": "Connects to 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", } }, "required": ["category"], }, }, ), ], ) for event in response: if event.type in ["tool-call-start", "tool-call-delta"]: for tool_call in event.delta.message.tool_calls: print(tool_call) - sdk: java name: Tools 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; import java.util.Map; public class StreamTools { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); Iterable response = cohere .v2() .chatStream( V2ChatStreamRequest.builder() .model("command-a-03-2025") .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 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())) .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content( UserMessageContent.of( "Can you provide a sales summary for 29th September" + " 2023, and also give me some details about the" + " products in the 'Electronics' category?")) .build()))) .build()); for (StreamedChatResponseV2 chatResponse : response) { if (chatResponse.isContentDelta()) { String text = chatResponse .getContentDelta() .flatMap(ChatContentDeltaEvent::getDelta) .flatMap(ChatContentDeltaEventDelta::getMessage) .flatMap(ChatContentDeltaEventDeltaMessage::getContent) .flatMap(ChatContentDeltaEventDeltaMessageContent::getText) .orElse(""); System.out.println(text); } } } } - sdk: go name: Tools code: > package main import ( "context" "errors" "io" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.ChatStream( context.TODO(), &cohere.V2ChatStreamRequest{ Model: "command-a-03-2025", Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ String: "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.ToolV2{ { Function: &cohere.ToolV2Function{ Name: "query_daily_sales_report", Description: cohere.String("Connects to a database to retrieve overall sales volumes and sales information for a given day."), Parameters: map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "day": map[string]interface{}{ "type": "string", "description": "Retrieves sales data for this day, formatted as YYYY-MM-DD.", }, }, "required": []string{"day"}, }, }, }, { Function: &cohere.ToolV2Function{ Name: "query_product_catalog", Description: cohere.String("Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels."), Parameters: map[string]interface{}{ "type": "object", "properties": map[string]interface{}{ "category": map[string]interface{}{ "type": "string", "description": "Retrieves product information data for all products in this category.", }, }, "required": []string{"category"}, }, }, }, }, }, ) 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 } // Log the received message if message.ToolCallDelta != nil { log.Printf("%+v", message) } } } - 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 '{ "stream": true, "model": "command-a-03-2025", "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: stream: true model: 'command-a-03-2025' 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 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?' response: stream: - event: message-start data: type: message-start id: 2edfdf70-019c-4f7a-be20-3cdbfaa3dca6 delta: message: role: 'assistant' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: 'I' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' will' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' use' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' the' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' query' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '_' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: 'daily' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '_' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: 'sales' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '_' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: 'report' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' tool' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' to' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' find' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' the' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' sales' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' summary' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' for' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' 2' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '9' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: 'th' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' September' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' 2' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '0' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '2' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '3' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '.' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' I' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' will' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' also' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' use' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' the' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' query' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '_' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: 'product' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '_' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: 'catalog' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' tool' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' to' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' find' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' the' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' details' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' of' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' the' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' products' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' in' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' the' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' Electronics' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: ' category' - event: tool-plan-delta data: type: tool-plan-delta delta: message: tool_plan: '.' - event: tool-call-start data: type: tool-call-start index: 0 delta: message: tool_calls: id: 'query_daily_sales_report_j3f0adww9pmr' type: 'function' function: name: 'query_daily_sales_report' arguments: '' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '{"' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: 'day' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '": ' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '"' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '2' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '0' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '2' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '3' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '-' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '0' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '9' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '-' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '2' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '9' - event: tool-call-delta data: type: tool-call-delta index: 0 delta: message: tool_calls: function: arguments: '"}' - event: tool-call-end data: type: tool-call-end index: 0 - event: tool-call-start data: type: tool-call-start index: 1 delta: message: tool_calls: id: 'query_product_catalog_c66nf11r6s8g' type: 'function' function: name: 'query_product_catalog' arguments: '' - event: tool-call-delta data: type: tool-call-delta index: 1 delta: message: tool_calls: function: arguments: '{"' - event: tool-call-delta data: type: tool-call-delta index: 1 delta: message: tool_calls: function: arguments: 'category' - event: tool-call-delta data: type: tool-call-delta index: 1 delta: message: tool_calls: function: arguments: '": ' - event: tool-call-delta data: type: tool-call-delta index: 1 delta: message: tool_calls: function: arguments: '"' - event: tool-call-delta data: type: tool-call-delta index: 1 delta: message: tool_calls: function: arguments: 'Electron' - event: tool-call-delta data: type: tool-call-delta index: 1 delta: message: tool_calls: function: arguments: 'ics' - event: tool-call-delta data: type: tool-call-delta index: 1 delta: message: tool_calls: function: arguments: '"}' - event: tool-call-end data: type: tool-call-end index: 1 - event: message-end data: type: message-end delta: finish_reason: TOOL_CALL usage: billed_units: input_tokens: 126 output_tokens: 84 tokens: input_tokens: 1589 output_tokens: 135 - code-samples: - sdk: typescript name: Images code: | const { CohereClientV2 } = require('cohere-ai'); const cohere = new CohereClientV2({}); (async () => { const stream = await cohere.chatStream({ model: 'command-a-vision-07-2025', messages: [ { role: 'user', content: [ { type: 'text', text: 'Describe this image' }, { type: 'image_url', imageUrl: { // Can be either a base64 data URI or a web URL. url: 'https://cohere.com/favicon-32x32.png', detail: 'auto', }, }, ], }, ], }); for await (const chatEvent of stream) { if (chatEvent.type === 'content-delta') { console.log(chatEvent.delta?.message); } } })(); - sdk: python name: Images code: >- import cohere co = cohere.ClientV2() response = co.chat_stream( model="command-a-vision-07-2025", messages=[ { "role": "user", "content": [ { "type": "text", "text": "Describe this image" }, { "type": "image_url", "image_url": { # Can be either a base64 data URI or a web URL. "url": "https://cohere.com/favicon-32x32.png", "detail": "auto" } } ] } ] ) for event in response: if event.type == "content-delta": print(event.delta.message.content.text, end="") - sdk: java name: Images 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-a-vision-07-2025") .messages( List.of( ChatMessageV2.user( UserMessage.builder() .content( UserMessageContent.of( List.of( Content.text( TextContent.builder() .text("Describe this image") .build()), Content.imageUrl( ImageContent.builder() .imageUrl( ImageUrl.builder() // Can be either a base64 data URI or a web URL. .url( "https://cohere.com/favicon-32x32.png") .build()) .build())))) .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: go name: Images code: > package main import ( "context" "errors" "io" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.ChatStream( context.TODO(), &cohere.V2ChatStreamRequest{ Model: "command-a-vision-07-2025", Messages: cohere.ChatMessages{ { Role: "user", User: &cohere.UserMessageV2{ Content: &cohere.UserMessageV2Content{ ContentList: []*cohere.Content{ {Type: "text", Text: &cohere.ChatTextContent{Text: "Describe this image"}}, {Type: "image_url", ImageUrl: &cohere.ImageContent{ ImageUrl: &cohere.ImageUrl{ // Can be either a base64 data URI or a web URL. Url: "https://cohere.com/favicon-32x32.png", Detail: cohere.ImageUrlDetailAuto.Ptr(), }, }}, }, }, }, }, }, }, ) 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.ContentDelta != nil { log.Printf("%+v", message) } } } - sdk: curl name: Images 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-a-vision-07-2025", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe the logo in this image" }, { "type": "image_url", "image_url": { "url": "https://cohere.com/favicon-32x32.png", "detail": "auto" } } ] } ] }' request: model: 'command-a-vision-07-2025' messages: - role: 'user' content: - type: 'text' text: 'Describe this image' - type: 'image_url' image_url: url: 'https://cohere.com/favicon-32x32.png' detail: 'auto' stream: true response: stream: - event: message-start data: type: message-start id: 29f14a5a-11de-4cae-9800-25e4747408ea delta: message: role: 'assistant' - event: content-start data: type: content-start delta: message: content: type: text text: "" - event: content-delta data: type: content-delta delta: message: content: text: "The" - event: content-delta data: type: content-delta delta: message: content: text: " image" - event: content-delta data: type: content-delta delta: message: content: text: " you" - event: content-delta data: type: content-delta delta: message: content: text: "'ve" - event: content-delta data: type: content-delta delta: message: content: text: " provided" - event: content-delta data: type: content-delta delta: message: content: text: " appears" - event: content-delta data: type: content-delta delta: message: content: text: " to" - event: content-delta data: type: content-delta delta: message: content: text: " be" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " simple" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " abstract" - event: content-delta data: type: content-delta delta: message: content: text: " composition" - event: content-delta data: type: content-delta delta: message: content: text: " featuring" - event: content-delta data: type: content-delta delta: message: content: text: " three" - event: content-delta data: type: content-delta delta: message: content: text: " colored" - event: content-delta data: type: content-delta delta: message: content: text: " shapes" - event: content-delta data: type: content-delta delta: message: content: text: " on" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " white" - event: content-delta data: type: content-delta delta: message: content: text: " background" - event: content-delta data: type: content-delta delta: message: content: text: "." - event: content-delta data: type: content-delta delta: message: content: text: " At" - event: content-delta data: type: content-delta delta: message: content: text: " the" - event: content-delta data: type: content-delta delta: message: content: text: " top" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " there" - event: content-delta data: type: content-delta delta: message: content: text: "'s" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " large" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " dark" - event: content-delta data: type: content-delta delta: message: content: text: " green" - event: content-delta data: type: content-delta delta: message: content: text: " oval" - event: content-delta data: type: content-delta delta: message: content: text: " shape" - event: content-delta data: type: content-delta delta: message: content: text: "." - event: content-delta data: type: content-delta delta: message: content: text: " Below" - event: content-delta data: type: content-delta delta: message: content: text: " it" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " on" - event: content-delta data: type: content-delta delta: message: content: text: " the" - event: content-delta data: type: content-delta delta: message: content: text: " left" - event: content-delta data: type: content-delta delta: message: content: text: " side" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " there" - event: content-delta data: type: content-delta delta: message: content: text: "'s" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " smaller" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " bright" - event: content-delta data: type: content-delta delta: message: content: text: " orange" - event: content-delta data: type: content-delta delta: message: content: text: " circular" - event: content-delta data: type: content-delta delta: message: content: text: " shape" - event: content-delta data: type: content-delta delta: message: content: text: "." - event: content-delta data: type: content-delta delta: message: content: text: " To" - event: content-delta data: type: content-delta delta: message: content: text: " the" - event: content-delta data: type: content-delta delta: message: content: text: " right" - event: content-delta data: type: content-delta delta: message: content: text: " of" - event: content-delta data: type: content-delta delta: message: content: text: " the" - event: content-delta data: type: content-delta delta: message: content: text: " orange" - event: content-delta data: type: content-delta delta: message: content: text: " circle" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " there" - event: content-delta data: type: content-delta delta: message: content: text: "'s" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " medium" - event: content-delta data: type: content-delta delta: message: content: text: "-" - event: content-delta data: type: content-delta delta: message: content: text: "sized" - event: content-delta data: type: content-delta delta: message: content: text: "," - event: content-delta data: type: content-delta delta: message: content: text: " light" - event: content-delta data: type: content-delta delta: message: content: text: " purple" - event: content-delta data: type: content-delta delta: message: content: text: " oval" - event: content-delta data: type: content-delta delta: message: content: text: " shape" - event: content-delta data: type: content-delta delta: message: content: text: "." - event: content-delta data: type: content-delta delta: message: content: text: " The" - event: content-delta data: type: content-delta delta: message: content: text: " shapes" - event: content-delta data: type: content-delta delta: message: content: text: " are" - event: content-delta data: type: content-delta delta: message: content: text: " arranged" - event: content-delta data: type: content-delta delta: message: content: text: " in" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " somewhat" - event: content-delta data: type: content-delta delta: message: content: text: " triangular" - event: content-delta data: type: content-delta delta: message: content: text: " formation" - event: content-delta data: type: content-delta delta: message: content: text: "." - event: content-delta data: type: content-delta delta: message: content: text: " The" - event: content-delta data: type: content-delta delta: message: content: text: " overall" - event: content-delta data: type: content-delta delta: message: content: text: " style" - event: content-delta data: type: content-delta delta: message: content: text: " is" - event: content-delta data: type: content-delta delta: message: content: text: " minimalistic" - event: content-delta data: type: content-delta delta: message: content: text: " and" - event: content-delta data: type: content-delta delta: message: content: text: " could" - event: content-delta data: type: content-delta delta: message: content: text: " be" - event: content-delta data: type: content-delta delta: message: content: text: " interpreted" - event: content-delta data: type: content-delta delta: message: content: text: " as" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " form" - event: content-delta data: type: content-delta delta: message: content: text: " of" - event: content-delta data: type: content-delta delta: message: content: text: " modern" - event: content-delta data: type: content-delta delta: message: content: text: " art" - event: content-delta data: type: content-delta delta: message: content: text: " or" - event: content-delta data: type: content-delta delta: message: content: text: " a" - event: content-delta data: type: content-delta delta: message: content: text: " basic" - event: content-delta data: type: content-delta delta: message: content: text: " design" - event: content-delta data: type: content-delta delta: message: content: text: " element" - event: content-delta data: type: content-delta delta: message: content: text: "." - event: content-end data: type: content-end - event: message-end data: type: message-end delta: finish_reason: COMPLETE usage: billed_units: input_tokens: 262 output_tokens: 105 tokens: input_tokens: 499 output_tokens: 105 /v1/generate: post: deprecated: true x-fern-audiences: - public summary: Generate operationId: generate x-fern-streaming: stream-condition: $request.stream stream-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 with Streaming API. Generates realistic text conditioned on a given input. 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" x-fern-type-name: Generation-9h264n 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: $ref: "#/components/headers/ApiWarning" "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|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. WARNING: `ALL` is deprecated, and will be removed in a future release. 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 API (v1) operationId: embed parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Texts code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Embed( context.TODO(), &cohere.EmbedRequest{ Texts: []string{"hello", "goodbye"}, Model: cohere.String("embed-v4.0"), InputType: cohere.EmbedInputTypeSearchDocument.Ptr(), }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Texts code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const embed = await cohere.embed({ texts: ['hello', 'goodbye'], model: 'embed-v4.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-v4.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-v4.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-v4.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-v4.0", "texts": ["hello", "goodbye"], "input_type": "classification" }' request: texts: - hello - goodbye model: embed-v4.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 - code-samples: - sdk: go name: Images code: > package main import ( "context" "encoding/base64" "fmt" "io" "log" "net/http" "os" cohere "github.com/cohere-ai/cohere-go/v2" "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(client.WithToken(os.Getenv("CO_API_KEY"))) embed, err := co.Embed( context.TODO(), &cohere.EmbedRequest{ Images: []string{imageBase64}, Model: cohere.String("embed-v4.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: > import { CohereClient } from '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-v4.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-v4.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.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; 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(); try { URI uri = URI.create("https://cohere.com/favicon-32x32.png"); URL url = uri.toURL(); 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-v4.0") .inputType(EmbedInputType.IMAGE) .embeddingTypes(List.of(EmbeddingType.FLOAT)) .build()); System.out.println(response); } catch (MalformedURLException e) { System.err.println("Invalid URL: " + e.getMessage()); } catch (IOException e) { System.err.println("I/O error: " + e.getMessage()); } } } - 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-v4.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+m4AAA7Zo2cmaoAAANWdOOAA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GS/gI/5FqfHMIt10pb+H0DBjyGdYr03XRaLCojnw1sg/6FTTSzyPNNIXkc5szHMnYhuJIDmh3doPCo7+F9z5oaE0R4SrzrWR/cXnWsj+4vOtZH9xeYrWx/cXmKe6gTjID6b6lxAnMQrl5mmYsSzEkn92//2Q=="] }' request: model: embed-v4.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+suDUAVyfYbZTLajG8HxjgD153n3IAABH8QxxiVo4XPKpGlyTKjowvCbUAF4mD3AAACgqC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Wx/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 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: $ref: "#/components/headers/ApiWarning" "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`. 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`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB. Images are only supported with Embed v3.0 and newer models. items: type: string x-fern-audiences: - public writeOnly: true model: type: string x-fern-audiences: - public description: ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed). 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. Supported with all Embed models. * `"int8"`: Use this when you want to get back signed int8 embeddings. Supported with Embed v3.0 and newer Embed models. * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Supported with Embed v3.0 and newer Embed models. * `"binary"`: Use this when you want to get back signed binary embeddings. Supported with Embed v3.0 and newer Embed models. * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Supported with Embed v3.0 and newer Embed 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 x-fern-type-name: EmbedRequest description: "" /v2/embed: post: x-fern-audiences: - v2-beta x-fern-sdk-group-name: v2 x-fern-sdk-method-name: embed summary: Embed API (v2) operationId: embedv2 parameters: - $ref: "#/components/parameters/RequestSource" x-fern-examples: - code-samples: - sdk: go name: Texts code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.V2.Embed( context.TODO(), &cohere.V2EmbedRequest{ Texts: []string{"hello", "goodbye"}, Model: "embed-v4.0", InputType: cohere.EmbedInputTypeSearchDocument, EmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat}, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Texts code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const embed = await cohere.v2.embed({ texts: ['hello', 'goodbye'], model: 'embed-v4.0', inputType: 'classification', embeddingTypes: ['float'], }); console.log(embed); })(); - sdk: python name: Texts code: | import cohere co = cohere.ClientV2() text_inputs = [ { "content": [ {"type": "text", "text": "hello"}, {"type": "text", "text": "goodbye"} ] }, ] response = co.embed( inputs=text_inputs, model="embed-v4.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-v4.0", input_type="classification", ) print(response) asyncio.run(main()) - sdk: java name: Texts code: > package embedv2post; /* (C)2024 */ 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 java.util.List; 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-v4.0") .inputType(EmbedInputType.CLASSIFICATION) .texts(List.of("hello", "goodbye")) .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-v4.0", "texts": ["hello", "goodbye"], "input_type": "classification", "embedding_types": ["float"] }' request: texts: - hello - goodbye model: embed-v4.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/reference/about billed_units: input_tokens: 2 - code-samples: - sdk: go name: Images code: > package main import ( "context" "encoding/base64" "fmt" "io" "log" "net/http" "os" cohere "github.com/cohere-ai/cohere-go/v2" "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(client.WithToken(os.Getenv("CO_API_KEY"))) embed, err := co.V2.Embed( context.TODO(), &cohere.V2EmbedRequest{ Images: []string{imageBase64}, Model: "embed-v4.0", InputType: cohere.EmbedInputTypeImage, EmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat}, }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", embed) } - sdk: typescript name: Images code: > import { CohereClient } from '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-v4.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}" image_inputs = [ { "content": [ { "type": "image_url", "image_url": {"url": image_base64} } ] } ] response = co.embed( model="embed-v4.0", input_type="image", embedding_types=["float"], inputs=image_inputs ) print(response) - sdk: java name: Images code: > package embedv2post; /* (C)2024 */ 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; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; 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(); try { URI uri = URI.create("https://cohere.com/favicon-32x32.png"); URL url = uri.toURL(); 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-v4.0") .inputType(EmbedInputType.IMAGE) .images(List.of(imageBase64)) .embeddingTypes(List.of(EmbeddingType.FLOAT)) .build()); System.out.println(response); } catch (MalformedURLException e) { System.err.println("Invalid URL: " + e.getMessage()); } catch (IOException e) { System.err.println("I/O error: " + e.getMessage()); } } } - 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-v4.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+suDUAVyfYbZTLajG8HxjgD153n3IAABH8QxxiVo4XPKpGlyTKjowvCbUAF4mD3AAACgqCzYPiPQAA900XAACmN4favRk+a9wB0xdiNAAAvU1cgAxeDcUoPdL0s1B44atQAACSs8AEewD0gM72I5jjDFiAAA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jw60AscgMzSWrHe5yFJEkfBd/f1UiLIpU1JG0ZyPVJE7/pWktRxc/gUqKgyVQOtZVcZMMxUlqw3pvHdRBU5EEbIBO4CktpG3t8IpLeNOzM+fsSN5DkikmosPY75Wy8hS2duv0Z+te7wfaXlT2Nu3BSvoalsJE3xnTH81vG49UVVtzAGjbRH6cq90TxGvdE8RoW0Q7M6Cqu5VA9kVrNLvC5DvNRWEa75CWPIUqqgyVQB5bVzarMCy7n7++mUoxVhkRtW9tPdypBbRNJI3BVFYf0FdlWTErnQP24uP5JqLojgUYyNqznvZ2q46GYLKDq0khPejk/8ArOsU6HX1irTWre8xDeQBk4/FHduPtALEKozJq3skjAaQaT/wOqv4NJdco3jj6bNtby3c8VtAulJIwVRWCYJb4PbKqqGnYDWSdpPcPLZ6V9HEmikxOxjAlQaUqL9Q7x5+2xgCrrmG8/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-v4.0 input_type: image embedding_types: - float images: - data:image/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kikmosPY75Wy8hS2duv0Z+te7wfaXlT2Nu3BSvoalsJE3xnTH81vG49UVVtzAGjbRH6cq90TxGvdE8RoW0Q7M6Cqu5VA9kVrNLvC5DvNRWEa75CWPIUqqgyVQB5bVzarMCy7n7++mUoxVhkRtW9tPdypBbRNJI3BVFYf0FdlWTErnQP24uP5JqLojgUYyNqznvZ2q46GYLKDq0khPejk/8ArOsU6HX1irTWre8xDeQBk4/FHduPtALEKozJq3skjAaQaT/wOqv4NJdco3jj6bNtby3c8VtAulJIwVRWCYJb4PbKqqGnYDWSdpPcPLZ6V9HEmikxOxjAlQaUqL9Q7x5+2xgCrrmG8/p9OrIDAg8CKkTQd07iRsdBcPV3ucSkX9H9KP1O8naIBBBG410gsBh2K3MCDKNjrE/2tSLpuqDtIFKAqhRwA6y9GVw/mAdjohEEwK2I4u0jH/Lb6exgXljL2tEwP9pq0GdzF69bfHO4fyAGx0ScPgVpl9JkB/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 responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/EmbedByTypeResponse" headers: X-API-Warning: $ref: "#/components/headers/ApiWarning" "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 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`. 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`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB. Image embeddings are supported with Embed v3.0 and newer models. items: type: string x-fern-audiences: - public writeOnly: true model: type: string x-fern-audiences: - public description: ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed). writeOnly: true input_type: x-fern-audiences: - public $ref: "#/components/schemas/EmbedInputType" inputs: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/EmbedInput" description: An array of inputs for the model to embed. Maximum number of inputs per call is `96`. An input can contain a mix of text and image components. max_tokens: type: integer x-fern-audiences: - public description: The maximum number of tokens to embed per input. If the input text is longer than this, it will be truncated according to the `truncate` parameter. output_dimension: type: integer x-fern-audiences: - public description: |- The number of dimensions of the output embedding. This is only available for `embed-v4` and newer models. Possible values are `256`, `512`, `1024`, and `1536`. The default is `1536`. embedding_types: type: array x-fern-audiences: - public items: $ref: "#/components/schemas/EmbeddingType" description: |- Specifies the types of embeddings you want to get back. Can be one or more of the following types. * `"float"`: Use this when you want to get back the default float embeddings. Supported with all Embed models. * `"int8"`: Use this when you want to get back signed int8 embeddings. Supported with Embed v3.0 and newer Embed models. * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Supported with Embed v3.0 and newer Embed models. * `"binary"`: Use this when you want to get back signed binary embeddings. Supported with Embed v3.0 and newer Embed models. * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Supported with Embed v3.0 and newer Embed models. * `"base64"`: Use this when you want to get back base64 embeddings. Supported with Embed v3.0 and newer Embed models. writeOnly: true default: - float 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 priority: x-fern-audiences: - public type: integer default: 0 minimum: 0 maximum: 999 description: "Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped." x-fern-type-name: V2EmbedRequest description: "" /v2/batches: get: summary: List batches description: List the batches for the current user operationId: ListBatches responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/ListBatchesResponse" example: batches: - id: 9439e0e3-49a4-4336-93e3-485fc420bc18 name: my-batch creator_id: b5e1ffb9-49a1-4653-9927-94083316309d org_id: 62603116-1750-4c04-b1b6-9d5046764bc4 status: BATCH_STATUS_IN_PROGRESS model: command input_dataset_id: my-requests-dataset num_records: 5000 "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/BatchError" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/BatchError" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/BatchError" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/BatchError" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/BatchError" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/BatchError" parameters: - name: page_size description: |- The maximum number of batches to return. The service may return fewer than this value. If unspecified, at most 50 batches will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. in: query required: false schema: type: integer format: int32 - name: page_token description: |- A page token, received from a previous `ListBatches` call. Provide this to retrieve the subsequent page. in: query required: false schema: type: string - name: order_by description: |- Batches can be ordered by creation time or last updated time. Use `created_at` for creation time or `updated_at` for last updated time. in: query required: false schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /batches x-fern-sdk-group-name: batches x-fern-sdk-method-name: list x-fern-audiences: - public x-fern-request-name: batchesListBatchesRequest x-fern-examples: - code-samples: - sdk: python name: Default code: |- import cohere co = cohere.ClientV2() batches = co.batches.list() - sdk: typescript name: Default code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const batches = await cohere.batches.list(); console.log(batches); })(); - sdk: go name: Default code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Batches.List( context.TODO(), &cohere.BatchesListBatchesRequest{}) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: java name: Default code: >- import com.cohere.api.Cohere; import com.cohere.api.resources.batches.types.ListBatchesResponse; public class BatchGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); ListBatchesResponse response = cohere.batches().list(); System.out.println(response); } } - sdk: curl name: Default code: |- curl --request GET \ --url https://api.cohere.com/v2/batches \ --header 'accept: application/json' \ --header "Authorization: Bearer $CO_API_KEY" post: summary: Create a batch description: Creates and executes a batch from an uploaded dataset of requests operationId: CreateBatch responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/CreateBatchResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/BatchError" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/BatchError" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/BatchError" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/BatchError" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/BatchError" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/BatchError" tags: - /batches requestBody: description: |- Information about the batch. Must contain name, input_dataset_id, and model. Output-only fields are ignored. content: application/json: schema: $ref: "#/components/schemas/Batch" required: true parameters: - $ref: "#/components/parameters/RequestSource" x-fern-sdk-group-name: batches x-fern-sdk-method-name: create x-fern-audiences: - public x-fern-examples: - code-samples: - sdk: python name: Default code: | import cohere co = cohere.ClientV2() batch_job = co.batches.create( name="", input_dataset_id="", model="", ) - sdk: typescript name: Default code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const batchJob = await cohere.batches.create({ name: '', inputDatasetId: '', model: '', }); console.log(batchJob); })(); - sdk: go name: Default code: > package main import ( "context" "log" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Batches.Create( context.TODO(), &cohere.Batch{ Name: "", InputDatasetId: "", Model: "", }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: java name: Default code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.resources.batches.types.CreateBatchResponse; import com.cohere.api.resources.batches.types.Batch; public class BatchPost { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); CreateBatchResponse response = cohere .batches() .create( Batch.builder() .name("") .inputDatasetId("") .model("") .build()); System.out.println(response); } } - sdk: curl name: Default code: |- curl --request POST \ --url https://api.cohere.com/v2/batches/v2/batches \ --header 'accept: application/json' \ --header 'content-type: application/json' \ --header "Authorization: Bearer $CO_API_KEY" \ --data '{ "name": "", "input_dataset_id": "", "model": "" }' "/v2/batches/{id}": get: summary: Retrieve a batch description: Retrieves a batch operationId: GetBatch responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/GetBatchResponse" example: batch: id: 9439e0e3-49a4-4336-93e3-485fc420bc18 name: my-batch creator_id: b5e1ffb9-49a1-4653-9927-94083316309d org_id: 62603116-1750-4c04-b1b6-9d5046764bc4 status: BATCH_STATUS_IN_PROGRESS created_at: 2025-03-05T14:59:25.438936Z updated_at: 2025-03-05T15:00:26.126572Z input_dataset_id: my-requests-dataset output_dataset_id: my-batch-output-c2waz1 input_tokens: "0" output_tokens: "0" model: batch-command num_records: 5000 num_successful_records: 8 num_failed_records: 0 "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/BatchError" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/BatchError" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/BatchError" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/BatchError" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/BatchError" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/BatchError" parameters: - name: id description: The batch ID. in: path required: true schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /batches x-fern-sdk-group-name: batches x-fern-sdk-method-name: retrieve x-fern-audiences: - public x-fern-examples: - code-samples: - sdk: python name: Default code: |- import cohere co = cohere.ClientV2() batch_job = co.batches.retrieve("") - sdk: typescript name: Default code: > import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const batchJob = await cohere.batches.retrieve(''); console.log(batchJob); })(); - sdk: go name: Default code: > package main import ( "context" "log" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Batches.Retrieve(context.TODO(), "") if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: java name: Default code: >- import com.cohere.api.Cohere; import com.cohere.api.resources.batches.types.GetBatchResponse; public class BatchGetId { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); GetBatchResponse response = cohere.batches().retrieve(""); System.out.println(response); } } - sdk: curl name: Default code: |- curl --request GET \ --url https://api.cohere.com/v2/batches/ \ --header 'accept: application/json' \ --header "Authorization: Bearer $CO_API_KEY" "/v2/batches/{id}:cancel": post: summary: Cancel a batch description: Cancels an in-progress batch operationId: CancelBatch responses: "200": description: A successful response. content: application/json: schema: $ref: "#/components/schemas/CancelBatchResponse" "400": description: Bad Request content: application/json: schema: $ref: "#/components/schemas/BatchError" "401": description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/BatchError" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/BatchError" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/BatchError" "500": description: Internal Server Error content: application/json: schema: $ref: "#/components/schemas/BatchError" "503": description: Status Service Unavailable content: application/json: schema: $ref: "#/components/schemas/BatchError" parameters: - name: id description: The batch ID. in: path required: true schema: type: string - $ref: "#/components/parameters/RequestSource" tags: - /batches x-fern-sdk-group-name: batches x-fern-sdk-method-name: cancel x-fern-audiences: - public x-fern-examples: - code-samples: - sdk: python name: Default code: |- import cohere co = cohere.ClientV2() batch_job = co.batches.cancel("") - sdk: typescript name: Default code: > import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const batchJob = await cohere.batches.cancel(''); console.log(batchJob); })(); - sdk: go name: Default code: > package main import ( "context" "log" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) _, err := co.Batches.Cancel(context.TODO(), "") if err != nil { log.Fatal(err) } } - sdk: java name: Default code: >- /* (C)2024 */ import com.cohere.api.Cohere; public class BatchPostCancel { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); cohere.batches().cancel(""); } } - sdk: curl name: Default code: >- curl --request POST \ --url https://api.cohere.com/v2/batches/:cancel \ --header "Authorization: Bearer $CO_API_KEY" /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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.EmbedJobs.Create( context.TODO(), &cohere.CreateEmbedJobRequest{ DatasetId: "dataset_id", Model: "embed-english-v3.0", 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-v4.0") .datasetId("ds.id") .inputType(EmbedInputType.SEARCH_DOCUMENT) .build()); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const embedJob = await cohere.embedJobs.create({ datasetId: 'my-dataset', inputType: 'search_document', model: 'embed-v4.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-v4.0", "dataset_id": "my-dataset" }' responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/CreateEmbedJobResponse" headers: X-API-Warning: $ref: "#/components/headers/ApiWarning" "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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: $ref: "#/components/headers/ApiWarning" "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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: $ref: "#/components/headers/ApiWarning" "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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: $ref: "#/components/headers/ApiWarning" "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 API (v1) 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 x-fern-type-name: RerankResponseResultsItemDocument 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 required: - index - relevance_score x-fern-type-name: RerankResponseResultsItem meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - results x-fern-type-name: RerankResponse "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, eg `rerank-v3.5`. 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 x-fern-type-name: RerankRequest 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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-v4.0-pro"), }, ) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: typescript name: Cohere TypeScript SDK code: > import { CohereClient } from '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 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-v4.0-pro', }); 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 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-v4.0-pro", 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() async def main(): response = await co.rerank( model="rerank-v4.0-pro", query="What is the capital of the United States?", 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.", "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 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.", ], 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 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.5") .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-v4.0-pro", "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 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 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-v4.0-pro 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 API (v2) 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: 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 required: - index - relevance_score x-fern-type-name: V2RerankResponseResultsItem meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - results x-fern-type-name: V2RerankResponse "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, eg `rerank-v3.5`. query: type: string x-fern-audiences: - public description: The search query documents: type: array x-fern-audiences: - public description: |- A list of texts that will be compared to the `query`. For optimal performance we recommend against sending more than 1,000 documents in a single request. **Note**: long documents will automatically be truncated to the value of `max_tokens_per_doc`. **Note**: structured data should be formatted as YAML strings for best performance. items: type: string top_n: type: integer x-fern-audiences: - public minimum: 1 description: Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned. max_tokens_per_doc: type: integer x-fern-audiences: - public description: Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens. priority: x-fern-audiences: - public type: integer default: 0 minimum: 0 maximum: 999 description: "Controls how early the request is handled. Lower numbers indicate higher priority (default: 0, the highest). When the system is under load, higher-priority requests are processed first and are the least likely to be dropped." required: - query - documents - model x-fern-type-name: V2RerankRequest 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: > import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const rerank = await cohere.v2.rerank({ 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.', '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 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-v4.0-pro', }); 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 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-v4.0-pro", 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() async def main(): response = await co.rerank( model="rerank-v4.0-pro", query="What is the capital of the United States?", 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.", "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 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.", ], 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.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-v4.0-pro") .query("What is the capital of the United States?") .documents( List.of( "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 has existed in the United States since before the" + " 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-v4.0-pro", "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 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: - 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 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-v4.0-pro 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: false billed_units: search_units: 1 /v1/classify: post: deprecated: true 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) model := "" resp, err := co.Classify( context.TODO(), &cohere.ClassifyRequest{ Model: &model, 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: > import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const classify = await cohere.classify({ model: '', 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( model="", 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( model="", 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 '{ "model": "", "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 $ model: 'YOUR-FINE-TUNED-MODEL-ID' 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 classifications: type: array x-fern-audiences: - public items: type: object x-fern-audiences: - public properties: id: type: string x-fern-audiences: - public input: type: string x-fern-audiences: - public description: The input text that was classified prediction: type: string x-fern-audiences: - public description: The predicted label for the associated query (only filled for single-label models) 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) confidence: type: number x-fern-audiences: - public format: float description: The confidence score for the top predicted class (only filled for single-label classification) 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 labels: type: object x-fern-audiences: - public additionalProperties: type: object x-fern-audiences: - public properties: confidence: type: number x-fern-audiences: - public format: float 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. classification_type: type: string x-fern-audiences: - public enum: - single-label - multi-label description: The type of classification performed required: - id - predictions - confidences - labels - classification_type 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: ID of a [Fine-tuned](https://docs.cohere.com/v2/docs/classify-starting-the-training) Classify model 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). If you use a preset, all other parameters become optional, and any included parameters will override the preset's parameters. writeOnly: true deprecated: 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 x-fern-type-name: dataset-dytngn 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. The only valid type is `embed-input` used in conjunction with the Embed Jobs API. - 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" "os" "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(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Datasets.Create( context.TODO(), &cohere.DatasetsCreateRequest{ Name: "embed-dataset", Type: cohere.DatasetTypeEmbedInput, Data: &MyReader{Reader: strings.NewReader(`{"text": "The quick brown fox jumps over the lazy dog"}`), name: "test.jsonl"}, EvalData: &MyReader{Reader: strings.NewReader(""), name: "a.jsonl"}, }, ) 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="embed-dataset", data=open("./embed.jsonl", "rb"), type="embed-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="embed-dataset", data=open("./embed.jsonl", "rb"), type="embed-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("embed-dataset") .type(DatasetType.EMBED_INPUT) .build()); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: > import { CohereClient } from '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=embed-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 x-fern-type-name: DatasetsCreateResponse "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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) resp, err := co.Datasets.List( context.TODO(), &cohere.DatasetsListRequest{}) if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } - sdk: python name: Sync code: | import cohere co = cohere.Client() # get list of datasets response = co.datasets.list() print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.datasets.list() 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.DatasetsListResponse; public class DatasetList { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); DatasetsListResponse response = cohere.datasets().list(); System.out.println(response); } } - sdk: typescript name: Cohere TypeScript SDK code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const datasets = await cohere.datasets.list(); 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" x-fern-type-name: DatasetsListResponse "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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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. x-fern-type-name: DatasetsGetUsageResponse "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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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/id \ --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" x-fern-type-name: DatasetsGetResponse "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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) _, 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 x-fern-type-name: dataset-id-g4eh6t "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: deprecated: true 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: > import { CohereClient } from '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: $ref: "#/components/headers/ApiWarning" 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 x-fern-type-name: SummarizeResponse "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 x-fern-type-name: SummarizeRequest 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const tokenize = await cohere.tokenize({ text: 'tokenize me! :D', model: 'command', // optional }); console.log(tokenize); })(); - sdk: python name: Sync code: | import cohere co = cohere.Client() response = co.tokenize( text="tokenize me! :D", model="command-a-03-2025" ) # 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-a-03-2025") 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-a-03-2025").build()); System.out.println(response); } } - sdk: typescript name: Cohere Node.js SDK code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const tokenize = await cohere.tokenize({ text: 'tokenize me! :D', model: 'command', // optional }); console.log(tokenize); })(); - 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-a-03-2025", "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: $ref: "#/components/headers/ApiWarning" 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 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 x-fern-type-name: TokenizeResponse 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: The input will be tokenized by the tokenizer that is used by this model. required: - text - model x-fern-type-name: TokenizeRequest 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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-a-03-2025" # 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-a-03-2025", # 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-a-03-2025") .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-a-03-2025", "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: $ref: "#/components/headers/ApiWarning" 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. meta: $ref: "#/components/schemas/ApiMeta" x-fern-audiences: - public required: - text x-fern-type-name: DetokenizeResponse "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 x-fern-type-name: DetokenizeRequest description: "" parameters: [] /v1/connectors: get: x-fern-audiences: - public deprecated: true 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: deprecated: true 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: deprecated: true 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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: deprecated: true 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: > import { CohereClient } from '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: deprecated: true 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" "os" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: | import { CohereClient } from '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: deprecated: true 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: > import { CohereClient } from '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-a-03-2025 - $ref: "#/components/parameters/RequestSource" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/GetModelResponse" headers: X-API-Warning: $ref: "#/components/headers/ApiWarning" "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: | from cohere import Client client = Client() response = client.models.get( model="command-a-03-2025", ) print(response) - sdk: python name: Async code: | import cohere import asyncio co = cohere.AsyncClient() async def main(): response = await co.models.get( model="command-a-03-2025", ) print(response) asyncio.run(main()) - sdk: java name: Cohere java SDK code: > /* (C)2024 */ import com.cohere.api.Cohere; import com.cohere.api.types.GetModelResponse; public class ModelsGet { public static void main(String[] args) { Cohere cohere = Cohere.builder().clientName("snippet").build(); GetModelResponse response = cohere.models().get("command-a-03-2025"); System.out.println(response); } } - sdk: curl name: cURL code: |- curl --request GET \ --url https://api.cohere.com/v1/models/command-a-03-2025 \ --header 'accept: application/json' \ --header "Authorization: bearer $CO_API_KEY" - sdk: typescript name: Cohere TypeScript SDK code: | import { CohereClient } from 'cohere-ai'; const cohere = new CohereClient({}); (async () => { const model = await cohere.models.get('command-a-03-2025'); console.log(model); })(); - 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(client.WithToken("<>")) resp, err := co.Models.Get(context.TODO(), "command-a-03-2025") if err != nil { log.Fatal(err) } log.Printf("%+v", resp) } /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. 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: | import { CohereClient } from '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" "os" cohere "github.com/cohere-ai/cohere-go/v2" client "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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 x-fern-type-name: CheckApiKeyResponse "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: deprecated: true summary: Lists fine-tuned models. description: Returns a list of fine-tuned models that the user has access to. 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" "os" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: $ref: ./snippets/node/finetuning/list-finetuned-models.ts - 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: deprecated: true summary: Trains and deploys a fine-tuned model. description: Creates a new fine-tuned model. The model will be trained on the dataset specified in the request body. The training process may take some time, and the model will be available once the training is complete. 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: 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" "os" "github.com/cohere-ai/cohere-go/v2/client" "github.com/cohere-ai/cohere-go/v2/finetuning" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: $ref: ./snippets/node/finetuning/create-finetuned-model.ts - 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_epochs=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: deprecated: true summary: Updates a fine-tuned model. description: Updates the fine-tuned model with the given ID. The model will be updated with the new settings and name provided in the request body. 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: "Deprecated: 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 - finetuned_model 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" "os" cohere "github.com/cohere-ai/cohere-go/v2" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: $ref: ./snippets/node/finetuning/update-finetuned-model.ts - 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: deprecated: true summary: Returns a fine-tuned model by ID. description: Retrieve a fine-tuned model by its 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" "os" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: $ref: ./snippets/node/finetuning/get-finetuned-model.ts - 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: deprecated: true summary: Deletes a fine-tuned model. description: |- Deletes a fine-tuned model. The model will be removed from the system and will no longer be available for use. This operation is irreversible. 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" "os" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) _, err := co.Finetuning.DeleteFinetunedModel(context.TODO(), "test-id") if err != nil { log.Fatal(err) } } - sdk: typescript name: Cohere TypeScript SDK code: $ref: ./snippets/node/finetuning/delete-finetuned-model.ts - 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: deprecated: true summary: Fetch history of statuses for a fine-tuned model. description: |- Returns a list of events that occurred during the life-cycle of the fine-tuned model. The events are ordered by creation time, with the most recent event first. The list can be paginated using `page_size` and `page_token` parameters. 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" "os" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: $ref: ./snippets/node/finetuning/list-events.ts - 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: deprecated: true summary: Retrieve training metrics for fine-tuned models. description: |- Returns a list of metrics measured during the training of a fine-tuned model. The metrics are ordered by step number, with the most recent step first. The list can be paginated using `page_size` and `page_token` parameters. 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" "os" "github.com/cohere-ai/cohere-go/v2/client" ) func main() { co := client.NewClient(client.WithToken(os.Getenv("CO_API_KEY"))) 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: $ref: ./snippets/node/finetuning/list-training-step-metrics.ts - 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 x-fern-type-name: RequestSource 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 x-fern-type-name: ChatRole 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 x-fern-type-name: ToolCall-iovxf2 x-fern-type-name: ToolCall 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" x-fern-type-name: ChatMessage ToolResult: type: object required: - call - outputs properties: call: $ref: "#/components/schemas/ToolCall" outputs: type: array minItems: 0 items: type: object additionalProperties: true x-fern-type-name: ToolResult-68w0tx x-fern-type-name: ToolResult ChatToolMessage: 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" x-fern-type-name: ChatToolMessage Message: oneOf: - $ref: "#/components/schemas/ChatMessage" - $ref: "#/components/schemas/ChatToolMessage" discriminator: propertyName: role mapping: CHATBOT: "#/components/schemas/ChatMessage" SYSTEM: "#/components/schemas/ChatMessage" USER: "#/components/schemas/ChatMessage" TOOL: "#/components/schemas/ChatToolMessage" x-fern-type-name: Message 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 x-fern-type-name: ChatConnector-7ur0eu x-fern-type-name: ChatConnector 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 x-fern-type-name: ChatDocument 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 x-fern-type-name: ToolParameterDefinitionsValue x-fern-type-name: Tool-luhdwe x-fern-type-name: Tool 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 x-fern-type-name: ResponseFormatType ChatTextResponseFormat: x-fern-audiences: - public title: Text Response type: object properties: type: $ref: "#/components/schemas/ResponseFormatType" required: - type x-fern-type-name: ChatTextResponseFormat 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 x-fern-type-name: JSONResponseFormat-g7xopi required: - type x-fern-type-name: JSONResponseFormat 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/ChatTextResponseFormat" - $ref: "#/components/schemas/JSONResponseFormat" discriminator: propertyName: type mapping: text: "#/components/schemas/ChatTextResponseFormat" json_object: "#/components/schemas/JSONResponseFormat" x-fern-type-name: ResponseFormat 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 type: description: | The type of citation which indicates what part of the response the citation is for. type: string x-fern-audiences: - public enum: - TEXT_CONTENT - PLAN x-fern-type-name: ChatCitation 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 x-fern-type-name: ChatSearchQuery 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 x-fern-type-name: ChatSearchResultConnector 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 x-fern-type-name: ChatSearchResult FinishReason: type: string enum: - COMPLETE - STOP_SEQUENCE - ERROR - ERROR_TOXIC - ERROR_LIMIT - USER_CANCEL - MAX_TOKENS - TIMEOUT x-fern-type-name: FinishReason 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 x-fern-type-name: ApiMetaApiVersion 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. image_tokens: type: number x-fern-audiences: - public description: | The number of billed image 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. x-fern-type-name: ApiMetaBilledUnits 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. x-fern-type-name: ApiMetaTokens cached_tokens: type: number x-fern-audiences: - public description: | The number of prompt tokens that hit the inference cache. warnings: type: array x-fern-audiences: - public items: type: string x-fern-audiences: - public x-fern-type-name: ApiMeta 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 x-fern-type-name: ChatStreamEvent 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 x-fern-type-name: ChatStreamStartEvent-5v9jyv x-fern-type-name: ChatStreamStartEvent 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" x-fern-type-name: ChatSearchQueriesGenerationEvent-6evypd x-fern-type-name: ChatSearchQueriesGenerationEvent 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" x-fern-type-name: ChatSearchResultsEvent-44axt5 x-fern-type-name: ChatSearchResultsEvent 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 x-fern-type-name: ChatTextGenerationEvent-8yyj22 x-fern-type-name: ChatTextGenerationEvent 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" x-fern-type-name: ChatCitationGenerationEvent-lg3v2o x-fern-type-name: ChatCitationGenerationEvent 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" x-fern-type-name: ChatToolCallsGenerationEvent-nykiww x-fern-type-name: ChatToolCallsGenerationEvent 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" x-fern-type-name: ChatStreamEndEvent-y8gq2x x-fern-type-name: ChatStreamEndEvent 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 x-fern-type-name: ToolCallDelta 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 x-fern-type-name: ChatToolCallsChunkEvent-t7lliu x-fern-type-name: ChatToolCallsChunkEvent ChatDebugEvent: allOf: - $ref: "#/components/schemas/ChatStreamEvent" - type: object properties: prompt: type: string x-fern-audiences: - public x-fern-type-name: ChatDebugEvent-352j0t x-fern-type-name: ChatDebugEvent 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" ChatTextContent: type: object description: Text content of the message. required: - type - text properties: type: type: string enum: - text text: type: string x-fern-type-name: ChatTextContent ContentType: x-fern-audiences: - public description: | Type of message content type: string enum: - text - image_url x-fern-type-name: ContentType ImageUrl: type: object required: - url properties: url: type: string description: | URL of an image. Can be either a base64 data URI or a web URL. detail: type: string description: | Controls the level of detail in image processing. `"auto"` is the default and lets the system choose, `"low"` is faster but less detailed, and `"high"` preserves maximum detail. You can save tokens and speed up responses by using detail: `"low"`. enum: - auto - low - high x-fern-type-name: ImageUrl ImageContent: type: object description: Image content of the message. required: - type - image_url properties: type: $ref: "#/components/schemas/ContentType" image_url: $ref: "#/components/schemas/ImageUrl" x-fern-type-name: ImageContent Content: description: A Content block which contains information about the content type and the content itself. oneOf: - $ref: "#/components/schemas/ChatTextContent" - $ref: "#/components/schemas/ImageContent" discriminator: propertyName: type mapping: text: "#/components/schemas/ChatTextContent" image_url: "#/components/schemas/ImageContent" x-fern-type-name: Content UserMessageV2: 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" x-fern-type-name: UserMessageV2 ToolCallV2: description: An array of tool calls to be made. type: object required: - id - type properties: id: type: string type: type: string enum: - function function: type: object properties: name: type: string arguments: type: string x-fern-type-name: ToolCallV2Function x-fern-type-name: ToolCallV2 ChatThinkingContent: type: object description: Thinking content of the message. This will be present when `thinking` is enabled, and will contain the models internal reasoning. required: - type - thinking properties: type: type: string enum: - thinking thinking: type: string ChatToolSource: type: object title: Tool Output properties: id: type: string description: The unique identifier of the document tool_output: type: object additionalProperties: true x-fern-type-name: ChatToolSource-z53ra6 x-fern-type-name: ChatToolSource ChatDocumentSource: 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 x-fern-type-name: ChatDocumentSource-w70a62 x-fern-type-name: ChatDocumentSource Source: description: A source object containing information about the source of the data cited. oneOf: - $ref: "#/components/schemas/ChatToolSource" - $ref: "#/components/schemas/ChatDocumentSource" discriminator: propertyName: type mapping: tool: "#/components/schemas/ChatToolSource" document: "#/components/schemas/ChatDocumentSource" x-fern-type-name: Source CitationType: type: string enum: - TEXT_CONTENT - THINKING_CONTENT - PLAN description: | The type of citation which indicates what part of the response the citation is for. x-fern-type-name: CitationType 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" content_index: type: integer description: Index of the content block in which this citation appears. type: $ref: "#/components/schemas/CitationType" x-fern-type-name: Citation AssistantMessageV2: 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/ChatTextContent" - $ref: "#/components/schemas/ChatThinkingContent" discriminator: propertyName: type mapping: text: "#/components/schemas/ChatTextContent" thinking: "#/components/schemas/ChatThinkingContent" citations: type: array items: $ref: "#/components/schemas/Citation" x-fern-type-name: AssistantMessage SystemMessageV2: 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/ChatTextContent" discriminator: propertyName: type mapping: text: "#/components/schemas/ChatTextContent" x-fern-type-name: SystemMessageV2 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 description: | A relevant document that the model can cite to generate a more accurate reply. Each document is a string-any dictionary. x-fern-type-name: Document-qmvpd9 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 x-fern-type-name: Document DocumentContent: type: object description: Document content. required: - type - document properties: type: type: string enum: - document document: $ref: "#/components/schemas/Document" x-fern-type-name: DocumentContent ToolContent: description: A content block which contains information about the content of a tool result oneOf: - $ref: "#/components/schemas/ChatTextContent" - $ref: "#/components/schemas/DocumentContent" discriminator: propertyName: type mapping: text: "#/components/schemas/ChatTextContent" document: "#/components/schemas/DocumentContent" x-fern-type-name: ToolContent 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" x-fern-type-name: ToolMessageV2 ChatMessageV2: description: Represents a single message in the chat history from a given role. oneOf: - $ref: "#/components/schemas/UserMessageV2" - $ref: "#/components/schemas/AssistantMessageV2" - $ref: "#/components/schemas/SystemMessageV2" - $ref: "#/components/schemas/ToolMessageV2" discriminator: propertyName: role mapping: user: "#/components/schemas/UserMessageV2" assistant: "#/components/schemas/AssistantMessageV2" system: "#/components/schemas/SystemMessageV2" tool: "#/components/schemas/ToolMessageV2" x-fern-type-name: ChatMessageV2 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" x-fern-type-name: ChatMessages ToolV2: type: object required: - type properties: type: type: string enum: - function function: type: object description: The function to be executed. required: - name - parameters 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. x-fern-type-name: ToolV2-6eoehf x-fern-type-name: ToolV2Function x-fern-type-name: ToolV2 CitationOptions: type: object description: Options for controlling citation generation. properties: mode: type: string enum: - ENABLED - DISABLED - FAST - ACCURATE - OFF description: | Defaults to `"enabled"`. Citations are enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`. x-fern-type-name: CitationOptions TruncationStrategy: description: Describes the truncation strategy for when the prompt exceeds the context length. Defaults to 'none' oneOf: [] discriminator: propertyName: type mapping: auto: "#/components/schemas/TruncationStrategyAutoPreserveOrder" none: "#/components/schemas/TruncationStrategyNone" x-fern-type-name: TruncationStrategy 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 x-fern-type-name: ResponseFormatTypeV2 ChatTextResponseFormatV2: x-fern-audiences: - public type: object properties: type: $ref: "#/components/schemas/ResponseFormatTypeV2" required: - type x-fern-type-name: ChatTextResponseFormatV2 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 x-fern-type-name: JsonResponseFormatV2-uu9wid required: - type x-fern-type-name: JsonResponseFormatV2 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/ChatTextResponseFormatV2" - $ref: "#/components/schemas/JsonResponseFormatV2" discriminator: propertyName: type mapping: text: "#/components/schemas/ChatTextResponseFormatV2" json_object: "#/components/schemas/JsonResponseFormatV2" x-fern-type-name: ResponseFormatV2 Thinking: x-fern-audiences: - public description: | Configuration for [reasoning features](https://docs.cohere.com/docs/reasoning). type: object required: - type properties: type: x-fern-audiences: - public type: string enum: - enabled - disabled description: | Reasoning is enabled by default for models that support it, but can be turned off by setting `"type": "disabled"`. token_budget: x-fern-audiences: - public type: integer description: | The maximum number of tokens the model can use for thinking, which must be set to a positive integer. The model will stop thinking if it reaches the thinking token budget and will proceed with the response. minimum: 1 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 - **timeout**: The generation was stopped because it exceeded the allowed time limit. type: string enum: - COMPLETE - STOP_SEQUENCE - MAX_TOKENS - TOOL_CALL - ERROR - TIMEOUT x-fern-type-name: ChatFinishReason 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/ChatTextContent" - $ref: "#/components/schemas/ChatThinkingContent" discriminator: propertyName: type mapping: text: "#/components/schemas/ChatTextContent" thinking: "#/components/schemas/ChatThinkingContent" citations: type: array items: $ref: "#/components/schemas/Citation" x-fern-type-name: AssistantMessageResponse 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. x-fern-type-name: UsageBilledUnits 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. x-fern-type-name: UsageTokens cached_tokens: type: number description: | The number of prompt tokens that hit the inference cache. x-fern-type-name: Usage 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 x-fern-type-name: LogprobItem ChatResponseV2: 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 x-fern-type-name: ChatStreamEventType 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 x-fern-type-name: ChatMessageStartEventDeltaMessage x-fern-type-name: ChatMessageStartEventDelta x-fern-type-name: ChatMessageStartEvent-lsegeq x-fern-type-name: ChatMessageStartEvent 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: thinking: type: string text: type: string type: type: string enum: - text - thinking x-fern-type-name: ChatContentStartEventDeltaMessageContent x-fern-type-name: ChatContentStartEventDeltaMessage x-fern-type-name: ChatContentStartEventDelta x-fern-type-name: ChatContentStartEvent-6xvlq1 x-fern-type-name: ChatContentStartEvent 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: thinking: type: string text: type: string x-fern-type-name: ChatContentDeltaEventDeltaMessageContent x-fern-type-name: ChatContentDeltaEventDeltaMessage x-fern-type-name: ChatContentDeltaEventDelta logprobs: $ref: "#/components/schemas/LogprobItem" x-fern-type-name: ChatContentDeltaEvent-3m0vqs x-fern-type-name: ChatContentDeltaEvent 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 x-fern-type-name: ChatContentEndEvent-ma278i x-fern-type-name: ChatContentEndEvent 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: message: type: object properties: tool_plan: type: string x-fern-type-name: ChatToolPlanDeltaEventDeltaMessage x-fern-type-name: ChatToolPlanDeltaEventDelta x-fern-type-name: ChatToolPlanDeltaEvent-2obfex x-fern-type-name: ChatToolPlanDeltaEvent 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: message: type: object properties: tool_calls: $ref: "#/components/schemas/ToolCallV2" x-fern-type-name: ChatToolCallStartEventDeltaMessage x-fern-type-name: ChatToolCallStartEventDelta x-fern-type-name: ChatToolCallStartEvent-lv559x x-fern-type-name: ChatToolCallStartEvent 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: message: type: object properties: tool_calls: type: object properties: function: type: object properties: arguments: type: string x-fern-type-name: ChatToolCallDeltaEventDeltaMessageToolCallsFunction x-fern-type-name: ChatToolCallDeltaEventDeltaMessageToolCalls x-fern-type-name: ChatToolCallDeltaEventDeltaMessage x-fern-type-name: ChatToolCallDeltaEventDelta x-fern-type-name: ChatToolCallDeltaEvent-2bxzoc x-fern-type-name: ChatToolCallDeltaEvent 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 x-fern-type-name: ChatToolCallEndEvent-t6ph9s x-fern-type-name: ChatToolCallEndEvent 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" x-fern-type-name: CitationStartEventDeltaMessage x-fern-type-name: CitationStartEventDelta x-fern-type-name: CitationStartEvent-t3df62 x-fern-type-name: CitationStartEvent CitationEndEvent: description: A streamed event which signifies a citation has finished streaming. allOf: - $ref: "#/components/schemas/ChatStreamEventType" - type: object properties: index: type: integer x-fern-type-name: CitationEndEvent-fs3igt x-fern-type-name: CitationEndEvent 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: error: description: | An error message if an error occurred during the generation. type: string x-fern-audiences: - public finish_reason: x-fern-audiences: - public $ref: "#/components/schemas/ChatFinishReason" usage: x-fern-audiences: - public $ref: "#/components/schemas/Usage" x-fern-type-name: ChatMessageEndEventDelta x-fern-type-name: ChatMessageEndEvent-u3fzny x-fern-type-name: ChatMessageEndEvent 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" - $ref: "#/components/schemas/ChatDebugEvent" 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" debug: "#/components/schemas/ChatDebugEvent" 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 x-fern-type-name: SingleGenerationTokenLikelihoodsItem required: - text - id x-fern-type-name: SingleGeneration 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" x-fern-type-name: Generation-9h264n 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 x-fern-type-name: GenerateStreamEvent 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 x-fern-type-name: GenerateStreamText-yai5v6 x-fern-type-name: GenerateStreamText 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 x-fern-type-name: SingleGenerationInStream 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" x-fern-type-name: GenerateStreamEndResponse x-fern-type-name: GenerateStreamEnd-ubzr0t x-fern-type-name: GenerateStreamEnd 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 x-fern-type-name: GenerateStreamError-49d5xw x-fern-type-name: GenerateStreamError 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. x-fern-type-name: EmbedInputType EmbeddingType: x-fern-audiences: - public type: string writeOnly: true enum: - float - int8 - uint8 - binary - ubinary - base64 x-fern-type-name: EmbeddingType 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 x-fern-type-name: Image 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 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 x-fern-type-name: EmbedFloatsResponse EmbedByTypeResponse: type: object required: - id - embeddings - 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 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 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 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 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 base64: type: array x-fern-audiences: - public description: An array of base64 embeddings. Each string is the result of appending the float embedding bytes together and base64 encoding that. items: type: string x-fern-audiences: - public items: type: array x-fern-audiences: - public items: type: number x-fern-audiences: - public x-fern-type-name: EmbedByTypeResponseEmbeddings 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" x-fern-type-name: EmbedByTypeResponse EmbedContentType: x-fern-audiences: - public type: string writeOnly: true enum: - text - image_url x-fern-type-name: EmbedContentType EmbedImageUrl: type: object description: Base64 url of image. required: - url properties: url: type: string x-fern-type-name: EmbedImageUrl EmbedImage: type: object x-fern-audiences: - public description: Image content of the input. Supported with Embed v3.0 and newer models. properties: type: $ref: "#/components/schemas/EmbedContentType" image_url: $ref: "#/components/schemas/EmbedImageUrl" x-fern-type-name: EmbedImage EmbedText: type: object x-fern-audiences: - public description: Text content of the input. properties: type: $ref: "#/components/schemas/EmbedContentType" text: type: string x-fern-audiences: - public x-fern-type-name: EmbedText EmbedContent: oneOf: - $ref: "#/components/schemas/EmbedImage" - $ref: "#/components/schemas/EmbedText" discriminator: propertyName: type mapping: image_url: "#/components/schemas/EmbedImage" text: "#/components/schemas/EmbedText" x-fern-type-name: EmbedContent EmbedInput: type: object x-fern-audiences: - public required: - content properties: content: x-fern-audiences: - public type: array items: $ref: "#/components/schemas/EmbedContent" description: An array of objects containing the input data for the model to embed. x-fern-type-name: EmbedInput BatchStatus: type: string enum: - BATCH_STATUS_UNSPECIFIED - BATCH_STATUS_QUEUED - BATCH_STATUS_IN_PROGRESS - BATCH_STATUS_CANCELING - BATCH_STATUS_COMPLETED - BATCH_STATUS_FAILED - BATCH_STATUS_CANCELED default: BATCH_STATUS_UNSPECIFIED description: |- The possible stages of a batch life-cycle. - BATCH_STATUS_UNSPECIFIED: Unspecified status. - BATCH_STATUS_QUEUED: The batch has been queued. - BATCH_STATUS_IN_PROGRESS: The batch is in-progress. - BATCH_STATUS_CANCELING: The batch is being canceled. - BATCH_STATUS_COMPLETED: The batch has been completed. - BATCH_STATUS_FAILED: The batch has failed. - BATCH_STATUS_CANCELED: The batch has been canceled. x-fern-sdk-group-name: - batches readOnly: true Batch: type: object properties: id: type: string description: read-only. Batch ID. readOnly: true name: type: string description: Batch name (e.g. `foobar`). creator_id: type: string description: read-only. User ID of the creator. readOnly: true org_id: type: string description: read-only. Organization ID. readOnly: true status: $ref: "#/components/schemas/BatchStatus" description: read-only. Current stage in the life-cycle of the batch. 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 input_dataset_id: type: string description: ID of the dataset the batch reads inputs from. output_dataset_id: type: string title: ID of the dataset the batch writes outputs to readOnly: true input_tokens: type: string format: int64 description: read-only. The total number of input tokens in the batch. readOnly: true output_tokens: type: string format: int64 description: read-only. The total number of output tokens in the batch. readOnly: true model: type: string description: The name of the model the batch uses. num_records: type: integer format: int32 description: read-only. The total number of records in the batch. readOnly: true num_successful_records: type: integer format: int32 description: read-only. The current number of successful records in the batch. readOnly: true num_failed_records: type: integer format: int32 description: read-only. The current number of failed records in the batch. readOnly: true status_reason: type: string description: read-only. More details about the reason for the status of a batch job. readOnly: true description: This resource represents a batch job. required: - name - input_dataset_id - model x-fern-sdk-group-name: - batches ListBatchesResponse: type: object properties: batches: type: array items: type: object $ref: "#/components/schemas/Batch" description: The batches that belong to the authenticated user. next_page_token: type: string description: |- A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. description: Response to a request to list batches. x-fern-sdk-group-name: - batches BatchError: 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: - batches CreateBatchResponse: type: object properties: batch: $ref: "#/components/schemas/Batch" description: Information about the batch. description: Response to request to create a batch. required: - batch x-fern-sdk-group-name: - batches GetBatchResponse: type: object properties: batch: $ref: "#/components/schemas/Batch" description: Information about the batch. description: Response to a request to get a batch. required: - batch x-fern-sdk-group-name: - batches CancelBatchResponse: type: object description: Response to a request to cancel a batch. x-fern-sdk-group-name: - batches RetryBatchResponse: type: object properties: batch: $ref: "#/components/schemas/Batch" description: Information about the newly created retry batch. description: Response to a request to retry a batch. required: - batch x-fern-sdk-group-name: - batches 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 x-fern-type-name: EmbedJob ListEmbedJobResponse: type: object properties: embed_jobs: type: array items: $ref: "#/components/schemas/EmbedJob" x-fern-audiences: - public x-fern-type-name: ListEmbedJobResponse 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 v3 and newer model versions. * `"uint8"`: Use this when you want to get back unsigned int8 embeddings. Valid for v3 and newer model versions. * `"binary"`: Use this when you want to get back signed binary embeddings. Valid for v3 and newer model versions. * `"ubinary"`: Use this when you want to get back unsigned binary embeddings. Valid for v3 and newer model versions. 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 x-fern-type-name: CreateEmbedJobRequest 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 x-fern-type-name: CreateEmbedJobResponse 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 x-fern-type-name: RerankDocument ClassifyExample: type: object properties: text: type: string x-fern-audiences: - public writeOnly: true label: type: string x-fern-audiences: - public writeOnly: true writeOnly: true x-fern-type-name: ClassifyExample DatasetValidationStatus: x-fern-audiences: - public description: The validation status of the dataset type: string enum: - unknown - queued - processing - failed - validated - skipped x-fern-type-name: DatasetValidationStatus 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 - batch-chat-input - batch-openai-chat-input - batch-embed-v2-input - batch-chat-v2-input x-fern-type-name: DatasetType 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 x-fern-type-name: DatasetPart ParseInfo: type: object properties: separator: type: string x-fern-audiences: - public writeOnly: true delimiter: type: string x-fern-audiences: - public writeOnly: true writeOnly: true x-fern-type-name: ParseInfo 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 x-fern-type-name: RerankerDataMetrics 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 x-fern-type-name: ChatDataMetrics 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 x-fern-type-name: LabelMetric ClassifyDataMetrics: type: object properties: label_metrics: type: array items: $ref: "#/components/schemas/LabelMetric" x-fern-type-name: ClassifyDataMetrics 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" x-fern-type-name: FinetuneDatasetMetrics Metrics: type: object properties: finetune_dataset_metrics: $ref: "#/components/schemas/FinetuneDatasetMetrics" x-fern-type-name: Metrics 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" x-fern-type-name: Dataset 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. x-fern-type-name: ConnectorOAuth 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. x-fern-type-name: Connector 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. x-fern-type-name: ListConnectorsResponse 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. x-fern-type-name: CreateConnectorOAuth 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 x-fern-type-name: AuthTokenType 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. x-fern-type-name: CreateConnectorServiceAuth 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. x-fern-type-name: CreateConnectorRequest CreateConnectorResponse: type: object required: - connector properties: connector: $ref: "#/components/schemas/Connector" x-fern-type-name: CreateConnectorResponse GetConnectorResponse: type: object required: - connector properties: connector: $ref: "#/components/schemas/Connector" x-fern-type-name: GetConnectorResponse DeleteConnectorResponse: type: object x-fern-type-name: DeleteConnectorResponse 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. x-fern-type-name: UpdateConnectorRequest UpdateConnectorResponse: type: object required: - connector properties: connector: $ref: "#/components/schemas/Connector" x-fern-type-name: UpdateConnectorResponse 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. x-fern-type-name: OAuthAuthorizeResponse 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 x-fern-type-name: ConnectorLog 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 x-fern-type-name: GetConnectorsLogsResponse FeedbackResponse: type: object x-fern-type-name: FeedbackResponse 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 x-fern-type-name: TokenLikelihood 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 x-fern-type-name: LogLikelihoodResponse 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 x-fern-type-name: Cluster 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 embeddings_url: type: string x-fern-audiences: - public description: The input file URL used for the job input_dataset_id: type: string x-fern-audiences: - public description: The input dataset ID used for the job 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 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 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 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 output_clusters_url: type: string x-fern-audiences: - public description: The output file URL for the clusters (signed url that expires) output_outliers_url: type: string x-fern-audiences: - public description: The output file URL for the outliers (signed url that expires) clusters: type: array x-fern-audiences: - public description: The list of cluster summaries for the job 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. x-fern-type-name: GetClusterJobResponse 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 x-fern-type-name: ListClusterJobsResponse 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 x-fern-type-name: CreateClusterJobRequest CreateClusterJobResponse: type: object required: - job_id properties: job_id: type: string x-fern-audiences: - public description: Response for creating a cluster job. x-fern-type-name: CreateClusterJobResponse 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 x-fern-type-name: UpdateClusterJobRequest-yyd5g8 output_tracking_metrics: type: object x-fern-audiences: - public x-fern-type-name: UpdateClusterJobRequest-6wlqkj x-fern-type-name: UpdateClusterJobRequest UpdateClusterJobResponse: type: object required: - job_id properties: job_id: type: string x-fern-audiences: - public description: Response for updating a cluster job. x-fern-type-name: UpdateClusterJobResponse 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 x-fern-type-name: CompatibleEndpoint 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. is_deprecated: type: boolean x-fern-audiences: - public description: Whether the model is deprecated or not. 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. features: type: array x-fern-audiences: - public items: type: string description: The features that the model supports. x-fern-type-name: GetModelResponse 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. x-fern-type-name: ListModelsResponse BaseType: deprecated: true 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: deprecated: true 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: Deprecated: Serve the fine-tuned model on a shared GPU. x-fern-sdk-group-name: - finetuning - finetuning BaseModel: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true 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. Deprecated: 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: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true type: object description: Response to request to delete a fine-tuned model. x-fern-sdk-group-name: - finetuning - finetuning UpdateFinetunedModelResponse: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true 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: deprecated: true 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: message: type: string id: type: string x-fern-type-name: NotFoundErrorBody x-fern-type-name: BadRequest 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: message: type: string id: type: string x-fern-type-name: UnauthorizedErrorBody x-fern-type-name: Unauthorized 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: message: type: string id: type: string x-fern-type-name: BadRequestErrorBody x-fern-type-name: Forbidden 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: message: type: string id: type: string x-fern-type-name: UnauthorizedErrorBody x-fern-type-name: NotFound 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: message: type: string id: type: string x-fern-type-name: UnprocessableEntityErrorBody x-fern-type-name: UnprocessableEntity RateLimit: description: Too many requests content: application/json: schema: type: object properties: message: type: string id: type: string x-fern-type-name: GatewayTimeoutErrorBody x-fern-type-name: RateLimit InvalidToken: description: | This error is returned when a request or response contains a deny-listed token. content: application/json: schema: type: object properties: message: type: string id: type: string x-fern-type-name: ForbiddenErrorBody x-fern-type-name: InvalidToken RequestCancelled: description: | This error is returned when a request is cancelled by the user. content: application/json: schema: type: object properties: message: type: string id: type: string x-fern-type-name: InternalServerErrorBody x-fern-type-name: RequestCancelled InternalServerError: description: | This error is returned when an uncategorised internal server error occurs. content: application/json: schema: type: object properties: message: type: string id: type: string x-fern-type-name: ServiceUnavailableErrorBody x-fern-type-name: InternalServerError NotImplemented: description: | This error is returned when the requested feature is not implemented. content: application/json: schema: type: object properties: message: type: string id: type: string x-fern-type-name: NotImplementedErrorBody x-fern-type-name: NotImplemented 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: message: type: string id: type: string x-fern-type-name: TooManyRequestsErrorBody x-fern-type-name: ServiceUnavailable 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: message: type: string id: type: string x-fern-type-name: InvalidTokenErrorBody x-fern-type-name: GatewayTimeout headers: ApiWarning: description: The name of the project that is making the request. x-fern-audiences: - public schema: type: string required: false example: Parameter xyz is deprecated, for more information please refer to https://docs.cohere.com/reference/about x-fern-type-name: ApiWarning