{"components":{"headers":{"ApiWarning":{"description":"The name of the project that is making the request.","example":"Parameter xyz is deprecated, for more information please refer to https://docs.cohere.com/reference/about","required":false,"schema":{"type":"string"},"x-fern-audiences":["public"],"x-fern-type-name":"ApiWarning"}},"parameters":{"RequestSource":{"description":"The name of the project that is making the request.\n","example":"my-cool-project","in":"header","name":"X-Client-Name","required":false,"schema":{"type":"string"},"x-fern-audiences":["public"],"x-fern-type-name":"RequestSource"}},"responses":{"BadRequest":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"NotFoundErrorBody"}}},"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","x-fern-type-name":"BadRequest"},"Forbidden":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"BadRequestErrorBody"}}},"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","x-fern-type-name":"Forbidden"},"GatewayTimeout":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"InvalidTokenErrorBody"}}},"description":"This error is returned when a request to the server times out. This could be due to:\n  - An internal services taking too long to respond\n","x-fern-type-name":"GatewayTimeout"},"InternalServerError":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"ServiceUnavailableErrorBody"}}},"description":"This error is returned when an uncategorised internal server error occurs.\n","x-fern-type-name":"InternalServerError"},"InvalidToken":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"ForbiddenErrorBody"}}},"description":"This error is returned when a request or response contains a deny-listed token.\n","x-fern-type-name":"InvalidToken"},"NotFound":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"UnauthorizedErrorBody"}}},"description":"This error is returned when a resource is not found. This could be because:\n  - The endpoint does not exist\n  - The resource does not exist eg model id, dataset id\n","x-fern-type-name":"NotFound"},"NotImplemented":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"NotImplementedErrorBody"}}},"description":"This error is returned when the requested feature is not implemented.\n","x-fern-type-name":"NotImplemented"},"RateLimit":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"GatewayTimeoutErrorBody"}}},"description":"Too many requests","x-fern-type-name":"RateLimit"},"RequestCancelled":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"InternalServerErrorBody"}}},"description":"This error is returned when a request is cancelled by the user.\n","x-fern-type-name":"RequestCancelled"},"ServiceUnavailable":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"TooManyRequestsErrorBody"}}},"description":"This error is returned when the service is unavailable. This could be due to:\n  - Too many users trying to access the service at the same time\n","x-fern-type-name":"ServiceUnavailable"},"Unauthorized":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"UnauthorizedErrorBody"}}},"description":"This error indicates that the operation attempted to be performed is not allowed. This could be because:\n  - The api token is invalid\n  - The user does not have the necessary permissions\n","x-fern-type-name":"Unauthorized"},"UnprocessableEntity":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string"},"message":{"type":"string"}},"type":"object","x-fern-type-name":"UnprocessableEntityErrorBody"}}},"description":"This error is returned when the request is not well formed. This could be because:\n  - JSON is invalid\n  - The request is missing required fields\n  - The request contains an invalid combination of fields\n","x-fern-type-name":"UnprocessableEntity"}},"schemas":{"ApiMeta":{"properties":{"api_version":{"properties":{"is_deprecated":{"type":"boolean","x-fern-audiences":["public"]},"is_experimental":{"type":"boolean","x-fern-audiences":["public"]},"version":{"type":"string","x-fern-audiences":["public"]}},"required":["version"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"ApiMetaApiVersion"},"billed_units":{"properties":{"classifications":{"description":"The number of billed classifications units.\n","type":"number","x-fern-audiences":["public"]},"image_tokens":{"description":"The number of billed image tokens.\n","type":"number","x-fern-audiences":["public"]},"images":{"description":"The number of billed images.\n","type":"number","x-fern-audiences":["public"]},"input_tokens":{"description":"The number of billed input tokens.\n","type":"number","x-fern-audiences":["public"]},"output_tokens":{"description":"The number of billed output tokens.\n","type":"number","x-fern-audiences":["public"]},"pages":{"description":"The number of billed pages parsed.\n","type":"number","x-fern-audiences":["public"]},"search_units":{"description":"The number of billed search units.\n","type":"number","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"ApiMetaBilledUnits"},"cached_tokens":{"description":"The number of prompt tokens that hit the inference cache.\n","type":"number","x-fern-audiences":["public"]},"tokens":{"properties":{"input_tokens":{"description":"The number of tokens used as input to the model.\n","type":"number","x-fern-audiences":["public"]},"output_tokens":{"description":"The number of tokens produced by the model.\n","type":"number","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"ApiMetaTokens"},"warnings":{"items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"ApiMeta"},"AssistantMessageResponse":{"description":"A message from the assistant role can contain text and tool call information.","properties":{"citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array"},"content":{"items":{"discriminator":{"mapping":{"text":"#/components/schemas/ChatTextContent","thinking":"#/components/schemas/ChatThinkingContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatTextContent"},{"$ref":"#/components/schemas/ChatThinkingContent"}]},"type":"array"},"role":{"enum":["assistant"],"type":"string"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCallV2"},"type":"array"},"tool_plan":{"description":"A chain-of-thought style reflection and plan that the model generates when working with Tools.","type":"string"}},"required":["role"],"type":"object","x-fern-type-name":"AssistantMessageResponse"},"AssistantMessageV2":{"description":"A message from the assistant role can contain text and tool call information.","properties":{"citations":{"items":{"$ref":"#/components/schemas/Citation"},"type":"array"},"content":{"oneOf":[{"type":"string"},{"items":{"discriminator":{"mapping":{"text":"#/components/schemas/ChatTextContent","thinking":"#/components/schemas/ChatThinkingContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatTextContent"},{"$ref":"#/components/schemas/ChatThinkingContent"}],"x-fern-type-name":"AssistantMessageV2ContentOneItem"},"type":"array"}],"x-fern-type-name":"AssistantMessageV2Content"},"role":{"enum":["assistant"],"type":"string"},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCallV2"},"type":"array"},"tool_plan":{"description":"A chain-of-thought style reflection and plan that the model generates when working with Tools.","type":"string"}},"required":["role"],"title":"Assistant Message","type":"object","x-fern-type-name":"AssistantMessage"},"AuthTokenType":{"default":"noscheme","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"],"type":"string","x-fern-type-name":"AuthTokenType"},"BaseModel":{"deprecated":true,"description":"The base model used for fine-tuning.","properties":{"base_type":{"$ref":"#/components/schemas/BaseType","description":"The type of the base model."},"name":{"description":"The name of the base model.","type":"string"},"strategy":{"$ref":"#/components/schemas/Strategy","description":"Deprecated: The fine-tuning strategy."},"version":{"description":"read-only. The version of the base model.","readOnly":true,"type":"string"}},"required":["base_type"],"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"BaseType":{"default":"BASE_TYPE_UNSPECIFIED","deprecated":true,"description":"The possible types of fine-tuned models.\n\n - BASE_TYPE_UNSPECIFIED: Unspecified model.\n - BASE_TYPE_GENERATIVE: Deprecated: Generative model.\n - BASE_TYPE_CLASSIFICATION: Classification model.\n - BASE_TYPE_RERANK: Rerank model.\n - BASE_TYPE_CHAT: Chat model.","enum":["BASE_TYPE_UNSPECIFIED","BASE_TYPE_GENERATIVE","BASE_TYPE_CLASSIFICATION","BASE_TYPE_RERANK","BASE_TYPE_CHAT"],"type":"string","x-fern-sdk-group-name":["finetuning","finetuning"]},"Batch":{"description":"This resource represents a batch job.","properties":{"created_at":{"description":"read-only. Creation timestamp.","format":"date-time","readOnly":true,"type":"string"},"creator_id":{"description":"read-only. User ID of the creator.","readOnly":true,"type":"string"},"id":{"description":"read-only. Batch ID.","readOnly":true,"type":"string"},"input_dataset_id":{"description":"ID of the dataset the batch reads inputs from.","type":"string"},"input_tokens":{"description":"read-only. The total number of input tokens in the batch.","format":"int64","readOnly":true,"type":"string"},"model":{"description":"The name of the model the batch uses.","type":"string"},"name":{"description":"Batch name (e.g. `foobar`).","type":"string"},"num_failed_records":{"description":"read-only. The current number of failed records in the batch.","format":"int32","readOnly":true,"type":"integer"},"num_records":{"description":"read-only. The total number of records in the batch.","format":"int32","readOnly":true,"type":"integer"},"num_successful_records":{"description":"read-only. The current number of successful records in the batch.","format":"int32","readOnly":true,"type":"integer"},"org_id":{"description":"read-only. Organization ID.","readOnly":true,"type":"string"},"output_dataset_id":{"readOnly":true,"title":"ID of the dataset the batch writes outputs to","type":"string"},"output_tokens":{"description":"read-only. The total number of output tokens in the batch.","format":"int64","readOnly":true,"type":"string"},"status":{"$ref":"#/components/schemas/BatchStatus","description":"read-only. Current stage in the life-cycle of the batch.","readOnly":true},"status_reason":{"description":"read-only. More details about the reason for the status of a batch job.","readOnly":true,"type":"string"},"updated_at":{"description":"read-only. Latest update timestamp.","format":"date-time","readOnly":true,"type":"string"}},"required":["input_dataset_id","model","name"],"type":"object","x-fern-sdk-group-name":["batches"]},"BatchError":{"description":"Error is the response for any unsuccessful event.","properties":{"message":{"description":"A developer-facing error message.","type":"string"}},"type":"object","x-fern-sdk-group-name":["batches"]},"BatchStatus":{"default":"BATCH_STATUS_UNSPECIFIED","description":"The possible stages of a batch life-cycle.\n\n - BATCH_STATUS_UNSPECIFIED: Unspecified status.\n - BATCH_STATUS_QUEUED: The batch has been queued.\n - BATCH_STATUS_IN_PROGRESS: The batch is in-progress.\n - BATCH_STATUS_CANCELING: The batch is being canceled.\n - BATCH_STATUS_COMPLETED: The batch has been completed.\n - BATCH_STATUS_FAILED: The batch has failed.\n - BATCH_STATUS_CANCELED: The batch has been canceled.","enum":["BATCH_STATUS_UNSPECIFIED","BATCH_STATUS_QUEUED","BATCH_STATUS_IN_PROGRESS","BATCH_STATUS_CANCELING","BATCH_STATUS_COMPLETED","BATCH_STATUS_FAILED","BATCH_STATUS_CANCELED"],"readOnly":true,"type":"string","x-fern-sdk-group-name":["batches"]},"CancelBatchResponse":{"description":"Response to a request to cancel a batch.","type":"object","x-fern-sdk-group-name":["batches"]},"ChatCitation":{"description":"A section of the generated reply which cites external knowledge.\n","properties":{"document_ids":{"description":"Identifiers of documents cited by this section of the generated reply.\n","items":{"type":"string","x-fern-audiences":["public"]},"minItems":1,"type":"array","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.\n","type":"integer","x-fern-audiences":["public"]},"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.\n","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`.\n","minLength":1,"type":"string","x-fern-audiences":["public"]},"type":{"description":"The type of citation which indicates what part of the response the citation is for.\n","enum":["TEXT_CONTENT","PLAN"],"type":"string","x-fern-audiences":["public"]}},"required":["document_ids","end","start","text"],"x-fern-type-name":"ChatCitation"},"ChatCitationGenerationEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"citations":{"description":"Citations for the generated reply.\n","items":{"$ref":"#/components/schemas/ChatCitation"},"type":"array","x-fern-audiences":["public"]}},"required":["citations"],"type":"object","x-fern-type-name":"ChatCitationGenerationEvent-lg3v2o"}],"x-fern-type-name":"ChatCitationGenerationEvent"},"ChatConnector":{"description":"The connector used for fetching documents.\n","properties":{"continue_on_failure":{"description":"Defaults to `false`.\n\nWhen `true`, the request will continue if this connector returned an error.\n","type":"boolean","x-fern-audiences":["public"]},"id":{"description":"The identifier of the connector.\n","minLength":1,"type":"string","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.\n\nFor example, the connector `web-search` supports the `site` option, which limits search results to the specified domain.\n","type":"object","x-fern-audiences":["public"],"x-fern-type-name":"ChatConnector-7ur0eu"},"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.\n","type":"string","x-fern-audiences":["public"]}},"required":["id"],"type":"object","x-fern-type-name":"ChatConnector"},"ChatContentDeltaEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"delta":{"properties":{"message":{"properties":{"content":{"properties":{"text":{"type":"string"},"thinking":{"type":"string"}},"type":"object","x-fern-type-name":"ChatContentDeltaEventDeltaMessageContent"}},"type":"object","x-fern-type-name":"ChatContentDeltaEventDeltaMessage"}},"type":"object","x-fern-type-name":"ChatContentDeltaEventDelta"},"index":{"type":"integer"},"logprobs":{"$ref":"#/components/schemas/LogprobItem"}},"type":"object","x-fern-type-name":"ChatContentDeltaEvent-3m0vqs"}],"description":"A streamed delta event which contains a delta of chat text content.","x-fern-type-name":"ChatContentDeltaEvent"},"ChatContentEndEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"index":{"type":"integer"}},"type":"object","x-fern-type-name":"ChatContentEndEvent-ma278i"}],"description":"A streamed delta event which signifies that the content block has ended.","x-fern-type-name":"ChatContentEndEvent"},"ChatContentStartEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"delta":{"properties":{"message":{"properties":{"content":{"properties":{"text":{"type":"string"},"thinking":{"type":"string"},"type":{"enum":["text","thinking"],"type":"string"}},"type":"object","x-fern-type-name":"ChatContentStartEventDeltaMessageContent"}},"type":"object","x-fern-type-name":"ChatContentStartEventDeltaMessage"}},"type":"object","x-fern-type-name":"ChatContentStartEventDelta"},"index":{"type":"integer"}},"type":"object","x-fern-type-name":"ChatContentStartEvent-6xvlq1"}],"description":"A streamed delta event which signifies that a new content block has started.","x-fern-type-name":"ChatContentStartEvent"},"ChatDataMetrics":{"properties":{"num_eval_turns":{"description":"The sum of all turns of valid eval examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"num_train_turns":{"description":"The sum of all turns of valid train examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"preamble":{"description":"The preamble of this dataset.","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"ChatDataMetrics"},"ChatDebugEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"prompt":{"type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"ChatDebugEvent-352j0t"}],"x-fern-type-name":"ChatDebugEvent"},"ChatDocument":{"additionalProperties":{"type":"string","x-fern-audiences":["public"]},"description":"Relevant information that could be used by the model to generate a more accurate reply.\nThe contents of each document are generally short (under 300 words), and are passed in the form of a\ndictionary of strings. Some suggested keys are \"text\", \"author\", \"date\". Both the key name and the value will be\npassed to the model.\n","properties":{"id":{"description":"Unique identifier for this document.","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-type":"map<string, string>","x-fern-type-name":"ChatDocument"},"ChatDocumentSource":{"description":"A document source object containing the unique identifier of the document and the document itself.","properties":{"document":{"additionalProperties":true,"type":"object","x-fern-type-name":"ChatDocumentSource-w70a62"},"id":{"description":"The unique identifier of the document","type":"string"}},"type":"object","x-fern-type-name":"ChatDocumentSource"},"ChatFinishReason":{"description":"The reason a chat request has finished.\n\n- **complete**: The model finished sending a complete message.\n- **max_tokens**: The number of generated tokens exceeded the model's context length or the value specified via the `max_tokens` parameter.\n- **stop_sequence**: One of the provided `stop_sequence` entries was reached in the model's generation.\n- **tool_call**: The model generated a Tool Call and is expecting a Tool Message in return\n- **error**: The generation failed due to an internal error\n- **timeout**: The generation was stopped because it exceeded the allowed time limit.\n","enum":["COMPLETE","STOP_SEQUENCE","MAX_TOKENS","TOOL_CALL","ERROR","TIMEOUT"],"type":"string","x-fern-type-name":"ChatFinishReason"},"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.\n\nThe 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.\n","properties":{"message":{"description":"Contents of the chat message.\n","minLength":1,"type":"string","x-fern-audiences":["public"]},"role":{"$ref":"#/components/schemas/ChatRole","x-fern-audiences":["public"]},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","x-fern-audiences":["public"]}},"required":["message","role"],"x-fern-type-name":"ChatMessage"},"ChatMessageEndEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"delta":{"properties":{"error":{"description":"An error message if an error occurred during the generation.\n","type":"string","x-fern-audiences":["public"]},"finish_reason":{"$ref":"#/components/schemas/ChatFinishReason","x-fern-audiences":["public"]},"usage":{"$ref":"#/components/schemas/Usage","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"ChatMessageEndEventDelta"},"id":{"type":"string"}},"type":"object","x-fern-type-name":"ChatMessageEndEvent-u3fzny"}],"description":"A streamed event which signifies that the chat message has ended.","x-fern-type-name":"ChatMessageEndEvent"},"ChatMessageStartEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"delta":{"properties":{"message":{"properties":{"role":{"description":"The role of the message.","enum":["assistant"],"type":"string"}},"type":"object","x-fern-type-name":"ChatMessageStartEventDeltaMessage"}},"type":"object","x-fern-type-name":"ChatMessageStartEventDelta"},"id":{"description":"Unique identifier for the generated reply.","type":"string"}},"type":"object","x-fern-type-name":"ChatMessageStartEvent-lsegeq"}],"description":"A streamed event which signifies that a stream has started.","x-fern-type-name":"ChatMessageStartEvent"},"ChatMessageV2":{"description":"Represents a single message in the chat history from a given role.","discriminator":{"mapping":{"assistant":"#/components/schemas/AssistantMessageV2","system":"#/components/schemas/SystemMessageV2","tool":"#/components/schemas/ToolMessageV2","user":"#/components/schemas/UserMessageV2"},"propertyName":"role"},"oneOf":[{"$ref":"#/components/schemas/UserMessageV2"},{"$ref":"#/components/schemas/AssistantMessageV2"},{"$ref":"#/components/schemas/SystemMessageV2"},{"$ref":"#/components/schemas/ToolMessageV2"}],"x-fern-type-name":"ChatMessageV2"},"ChatMessages":{"description":"A list of chat messages in chronological order, representing a conversation between the user and the model.\n\nMessages 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).\n","items":{"$ref":"#/components/schemas/ChatMessageV2"},"type":"array","x-fern-type-name":"ChatMessages"},"ChatResponseV2":{"properties":{"finish_reason":{"$ref":"#/components/schemas/ChatFinishReason"},"id":{"description":"Unique identifier for the generated reply. Useful for submitting feedback.","type":"string"},"logprobs":{"items":{"$ref":"#/components/schemas/LogprobItem"},"type":"array"},"message":{"$ref":"#/components/schemas/AssistantMessageResponse"},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["finish_reason","id","message"]},"ChatRole":{"description":"One of `CHATBOT`, `SYSTEM`, `TOOL` or `USER` to identify who the message is coming from.\n","enum":["CHATBOT","SYSTEM","USER","TOOL"],"type":"string","x-fern-type-name":"ChatRole"},"ChatSearchQueriesGenerationEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"search_queries":{"description":"Generated search queries, meant to be used as part of the RAG flow.","items":{"$ref":"#/components/schemas/ChatSearchQuery"},"type":"array","x-fern-audiences":["public"]}},"required":["search_queries"],"type":"object","x-fern-type-name":"ChatSearchQueriesGenerationEvent-6evypd"}],"x-fern-type-name":"ChatSearchQueriesGenerationEvent"},"ChatSearchQuery":{"description":"The generated search query. Contains the text of the query and a unique identifier for the query.\n","properties":{"generation_id":{"description":"Unique identifier for the generated search query. Useful for submitting feedback.\n","format":"uuid","type":"string","x-fern-audiences":["public"]},"text":{"description":"The text of the search query.\n","type":"string","x-fern-audiences":["public"]}},"required":["generation_id","text"],"type":"object","x-fern-type-name":"ChatSearchQuery"},"ChatSearchResult":{"properties":{"connector":{"$ref":"#/components/schemas/ChatSearchResultConnector","description":"The connector from which this result comes from.\n","x-fern-audiences":["public"]},"continue_on_failure":{"description":"Whether a chat request should continue or not if the request to this connector fails.\n","type":"boolean","x-fern-audiences":["public"]},"document_ids":{"description":"Identifiers of documents found by this search query.\n","items":{"minLength":1,"type":"string","x-fern-audiences":["public"]},"minLength":0,"type":"array","x-fern-audiences":["public"]},"error_message":{"description":"An error message if the search failed.\n","type":"string","x-fern-audiences":["public"]},"search_query":{"$ref":"#/components/schemas/ChatSearchQuery","x-fern-audiences":["public"]}},"required":["connector","document_ids"],"type":"object","x-fern-type-name":"ChatSearchResult"},"ChatSearchResultConnector":{"description":"The connector used for fetching documents.\n","properties":{"id":{"description":"The identifier of the connector.\n","minLength":1,"type":"string","x-fern-audiences":["public"]}},"required":["id"],"type":"object","x-fern-type-name":"ChatSearchResultConnector"},"ChatSearchResultsEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"documents":{"description":"Documents fetched from searches or provided by the user.\n","items":{"$ref":"#/components/schemas/ChatDocument"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"search_results":{"description":"Conducted searches and the ids of documents retrieved from each of them.\n","items":{"$ref":"#/components/schemas/ChatSearchResult"},"minItems":0,"type":"array","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"ChatSearchResultsEvent-44axt5"}],"x-fern-type-name":"ChatSearchResultsEvent"},"ChatStreamEndEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"finish_reason":{"description":"- `COMPLETE` - the model sent back a finished reply\n- `ERROR_LIMIT` - the reply was cut off because the model reached the maximum number of tokens for its context length\n- `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens specified by the max_tokens parameter\n- `ERROR` - something went wrong when generating the reply\n- `ERROR_TOXIC` - the model generated a reply that was deemed toxic\n","enum":["COMPLETE","ERROR_LIMIT","MAX_TOKENS","ERROR","ERROR_TOXIC"],"type":"string","x-fern-audiences":["public"],"x-fern-type-name":"ChatStreamEndEventFinishReason"},"response":{"$ref":"#/components/schemas/NonStreamedChatResponse","description":"The consolidated response from the model. Contains the generated reply and all the other information streamed back in the previous events.\n","x-fern-audiences":["public"]}},"required":["finish_reason","response"],"type":"object","x-fern-type-name":"ChatStreamEndEvent-y8gq2x"}],"x-fern-type-name":"ChatStreamEndEvent"},"ChatStreamEvent":{"properties":{"event_type":{"enum":["stream-start","search-queries-generation","search-results","text-generation","citation-generation","stream-end","debug"],"type":"string","x-fern-audiences":["public"]}},"required":["event_type"],"x-fern-type-name":"ChatStreamEvent"},"ChatStreamEventType":{"description":"The streamed event types","properties":{"type":{"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"],"type":"string"}},"required":["type"],"x-fern-type-name":"ChatStreamEventType"},"ChatStreamStartEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"generation_id":{"description":"Unique identifier for the generated reply. Useful for submitting feedback.\n","format":"uuid","minLength":1,"type":"string","x-fern-audiences":["public"]}},"required":["generation_id"],"type":"object","x-fern-type-name":"ChatStreamStartEvent-5v9jyv"}],"x-fern-type-name":"ChatStreamStartEvent"},"ChatTextContent":{"description":"Text content of the message.","properties":{"text":{"type":"string"},"type":{"enum":["text"],"type":"string"}},"required":["text","type"],"type":"object","x-fern-type-name":"ChatTextContent"},"ChatTextGenerationEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"text":{"description":"The next batch of text generated by the model.\n","minLength":1,"type":"string","x-fern-audiences":["public"]}},"required":["text"],"type":"object","x-fern-type-name":"ChatTextGenerationEvent-8yyj22"}],"x-fern-type-name":"ChatTextGenerationEvent"},"ChatTextResponseFormat":{"properties":{"type":{"$ref":"#/components/schemas/ResponseFormatType"}},"required":["type"],"title":"Text Response","type":"object","x-fern-audiences":["public"],"x-fern-type-name":"ChatTextResponseFormat"},"ChatTextResponseFormatV2":{"properties":{"type":{"$ref":"#/components/schemas/ResponseFormatTypeV2"}},"required":["type"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"ChatTextResponseFormatV2"},"ChatThinkingContent":{"description":"Thinking content of the message. This will be present when `thinking` is enabled, and will contain the models internal reasoning.","properties":{"thinking":{"type":"string"},"type":{"enum":["thinking"],"type":"string"}},"required":["thinking","type"],"type":"object"},"ChatToolCallDeltaEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"delta":{"properties":{"message":{"properties":{"tool_calls":{"properties":{"function":{"properties":{"arguments":{"type":"string"}},"type":"object","x-fern-type-name":"ChatToolCallDeltaEventDeltaMessageToolCallsFunction"}},"type":"object","x-fern-type-name":"ChatToolCallDeltaEventDeltaMessageToolCalls"}},"type":"object","x-fern-type-name":"ChatToolCallDeltaEventDeltaMessage"}},"type":"object","x-fern-type-name":"ChatToolCallDeltaEventDelta"},"index":{"type":"integer"}},"type":"object","x-fern-type-name":"ChatToolCallDeltaEvent-2bxzoc"}],"description":"A streamed event delta which signifies a delta in tool call arguments.","x-fern-type-name":"ChatToolCallDeltaEvent"},"ChatToolCallEndEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"index":{"type":"integer"}},"type":"object","x-fern-type-name":"ChatToolCallEndEvent-t6ph9s"}],"description":"A streamed event delta which signifies a tool call has finished streaming.","x-fern-type-name":"ChatToolCallEndEvent"},"ChatToolCallStartEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"delta":{"properties":{"message":{"properties":{"tool_calls":{"$ref":"#/components/schemas/ToolCallV2"}},"type":"object","x-fern-type-name":"ChatToolCallStartEventDeltaMessage"}},"type":"object","x-fern-type-name":"ChatToolCallStartEventDelta"},"index":{"type":"integer"}},"type":"object","x-fern-type-name":"ChatToolCallStartEvent-lv559x"}],"description":"A streamed event delta which signifies a tool call has started streaming.","x-fern-type-name":"ChatToolCallStartEvent"},"ChatToolCallsChunkEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"text":{"type":"string","x-fern-audiences":["public"]},"tool_call_delta":{"$ref":"#/components/schemas/ToolCallDelta","x-fern-audiences":["public"]}},"required":["tool_call_delta"],"type":"object","x-fern-type-name":"ChatToolCallsChunkEvent-t7lliu"}],"x-fern-type-name":"ChatToolCallsChunkEvent"},"ChatToolCallsGenerationEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEvent"},{"properties":{"text":{"description":"The text generated related to the tool calls generated\n","type":"string","x-fern-audiences":["public"]},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","x-fern-audiences":["public"]}},"required":["tool_calls"],"type":"object","x-fern-type-name":"ChatToolCallsGenerationEvent-nykiww"}],"x-fern-type-name":"ChatToolCallsGenerationEvent"},"ChatToolMessage":{"description":"Represents tool result in the chat history.\n","properties":{"role":{"$ref":"#/components/schemas/ChatRole"},"tool_results":{"items":{"$ref":"#/components/schemas/ToolResult"},"type":"array"}},"required":["role"],"x-fern-type-name":"ChatToolMessage"},"ChatToolPlanDeltaEvent":{"allOf":[{"$ref":"#/components/schemas/ChatStreamEventType"},{"properties":{"delta":{"properties":{"message":{"properties":{"tool_plan":{"type":"string"}},"type":"object","x-fern-type-name":"ChatToolPlanDeltaEventDeltaMessage"}},"type":"object","x-fern-type-name":"ChatToolPlanDeltaEventDelta"}},"type":"object","x-fern-type-name":"ChatToolPlanDeltaEvent-2obfex"}],"description":"A streamed event which contains a delta of tool plan text.","x-fern-type-name":"ChatToolPlanDeltaEvent"},"ChatToolSource":{"properties":{"id":{"description":"The unique identifier of the document","type":"string"},"tool_output":{"additionalProperties":true,"type":"object","x-fern-type-name":"ChatToolSource-z53ra6"}},"title":"Tool Output","type":"object","x-fern-type-name":"ChatToolSource"},"Citation":{"description":"Citation information containing sources and the text cited.","properties":{"content_index":{"description":"Index of the content block in which this citation appears.","type":"integer"},"end":{"description":"End index of the cited snippet in the original source text.","type":"integer"},"sources":{"items":{"$ref":"#/components/schemas/Source"},"type":"array"},"start":{"description":"Start index of the cited snippet in the original source text.","type":"integer"},"text":{"description":"Text snippet that is being cited.","type":"string"},"type":{"$ref":"#/components/schemas/CitationType"}},"type":"object","x-fern-type-name":"Citation"},"CitationOptions":{"description":"Options for controlling citation generation.","properties":{"mode":{"description":"Defaults to `\"enabled\"`.\nCitations are enabled by default for models that support it, but can be turned off by setting `\"type\": \"disabled\"`.\n","enum":["ENABLED","DISABLED","FAST","ACCURATE","OFF"],"type":"string"}},"type":"object","x-fern-type-name":"CitationOptions"},"CitationType":{"description":"The type of citation which indicates what part of the response the citation is for.\n","enum":["TEXT_CONTENT","THINKING_CONTENT","PLAN"],"type":"string","x-fern-type-name":"CitationType"},"ClassifyDataMetrics":{"properties":{"label_metrics":{"items":{"$ref":"#/components/schemas/LabelMetric"},"type":"array"}},"type":"object","x-fern-type-name":"ClassifyDataMetrics"},"ClassifyExample":{"properties":{"label":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"text":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]}},"type":"object","writeOnly":true,"x-fern-type-name":"ClassifyExample"},"CompatibleEndpoint":{"description":"One of the Cohere API endpoints that the model can be used with.","enum":["chat","embed","classify","summarize","rerank","rate","generate"],"type":"string","x-fern-type-name":"CompatibleEndpoint"},"Connector":{"description":"A connector allows you to integrate data sources with the '/chat' endpoint to create grounded generations with citations to the data source.\ndocuments to help answer users.","properties":{"active":{"description":"Whether the connector is active or not.","type":"boolean","x-fern-audiences":["public"]},"auth_status":{"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.","enum":["valid","expired"],"type":"string","x-fern-audiences":["public"]},"auth_type":{"description":"The type of authentication/authorization used by the connector. Possible values: [oauth, service_auth]","format":"enum","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"]},"created_at":{"description":"The UTC time at which the connector was created.","format":"date-time","type":"string","x-fern-audiences":["public"]},"description":{"description":"A description of the connector.","type":"string","x-fern-audiences":["public"]},"excludes":{"description":"A list of fields to exclude from the prompt (fields remain in the document).","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"id":{"description":"The unique identifier of the connector (used in both `/connectors` & `/chat` endpoints).\nThis is automatically created from the name of the connector upon registration.","type":"string","x-fern-audiences":["public"]},"name":{"description":"A human-readable name for the connector.","type":"string","x-fern-audiences":["public"]},"oauth":{"$ref":"#/components/schemas/ConnectorOAuth","description":"The OAuth 2.0 configuration for the connector.","x-fern-audiences":["public"]},"organization_id":{"description":"The organization to which this connector belongs. This is automatically set to\nthe organization of the user who created the connector.","type":"string","x-fern-audiences":["public"]},"updated_at":{"description":"The UTC time at which the connector was last updated.","format":"date-time","type":"string","x-fern-audiences":["public"]},"url":{"description":"The URL of the connector that will be used to search for documents.","type":"string","x-fern-audiences":["public"]}},"required":["created_at","id","name","updated_at"],"type":"object","x-fern-type-name":"Connector"},"ConnectorOAuth":{"properties":{"authorize_url":{"description":"The OAuth 2.0 /authorize endpoint to use when users authorize the connector.","type":"string","x-fern-audiences":["public"]},"client_id":{"description":"The OAuth 2.0 client ID. This field is encrypted at rest.","type":"string","x-fern-audiences":["public"]},"client_secret":{"description":"The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response.","type":"string","x-fern-audiences":["public"]},"scope":{"description":"The OAuth scopes to request when users authorize the connector.","type":"string","x-fern-audiences":["public"]},"token_url":{"description":"The OAuth 2.0 /token endpoint to use when users authorize the connector.","type":"string","x-fern-audiences":["public"]}},"required":["authorize_url","token_url"],"type":"object","x-fern-type-name":"ConnectorOAuth"},"Content":{"description":"A Content block which contains information about the content type and the content itself.","discriminator":{"mapping":{"image_url":"#/components/schemas/ImageContent","text":"#/components/schemas/ChatTextContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatTextContent"},{"$ref":"#/components/schemas/ImageContent"}],"x-fern-type-name":"Content"},"ContentType":{"description":"Type of message content\n","enum":["text","image_url"],"type":"string","x-fern-audiences":["public"],"x-fern-type-name":"ContentType"},"CreateBatchResponse":{"description":"Response to request to create a batch.","properties":{"batch":{"$ref":"#/components/schemas/Batch","description":"Information about the batch."}},"required":["batch"],"type":"object","x-fern-sdk-group-name":["batches"]},"CreateConnectorOAuth":{"properties":{"authorize_url":{"description":"The OAuth 2.0 /authorize endpoint to use when users authorize the connector.","type":"string","x-fern-audiences":["public"]},"client_id":{"description":"The OAuth 2.0 client ID. This fields is encrypted at rest.","type":"string","x-fern-audiences":["public"]},"client_secret":{"description":"The OAuth 2.0 client Secret. This field is encrypted at rest and never returned in a response.","type":"string","x-fern-audiences":["public"]},"scope":{"description":"The OAuth scopes to request when users authorize the connector.","type":"string","x-fern-audiences":["public"]},"token_url":{"description":"The OAuth 2.0 /token endpoint to use when users authorize the connector.","type":"string","x-fern-audiences":["public"]}},"required":[],"type":"object","x-fern-type-name":"CreateConnectorOAuth"},"CreateConnectorRequest":{"properties":{"active":{"default":true,"description":"Whether the connector is active or not.","type":"boolean","x-fern-audiences":["public"]},"continue_on_failure":{"default":false,"description":"Whether a chat request should continue or not if the request to this connector fails.","type":"boolean","x-fern-audiences":["public"]},"description":{"description":"A description of the connector.","type":"string","x-fern-audiences":["public"]},"excludes":{"description":"A list of fields to exclude from the prompt (fields remain in the document).","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"name":{"description":"A human-readable name for the connector.","type":"string","x-fern-audiences":["public"]},"oauth":{"$ref":"#/components/schemas/CreateConnectorOAuth","description":"The OAuth 2.0 configuration for the connector. Cannot be specified if service_auth is specified.","x-fern-audiences":["public"]},"service_auth":{"$ref":"#/components/schemas/CreateConnectorServiceAuth","description":"The service to service authentication configuration for the connector. Cannot be specified if oauth is specified.","x-fern-audiences":["public"]},"url":{"description":"The URL of the connector that will be used to search for documents.","type":"string","x-fern-audiences":["public"]}},"required":["name","url"],"type":"object","x-fern-type-name":"CreateConnectorRequest"},"CreateConnectorResponse":{"properties":{"connector":{"$ref":"#/components/schemas/Connector"}},"required":["connector"],"type":"object","x-fern-type-name":"CreateConnectorResponse"},"CreateConnectorServiceAuth":{"properties":{"token":{"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.","type":"string","x-fern-audiences":["public"]},"type":{"$ref":"#/components/schemas/AuthTokenType","x-fern-audiences":["public"]}},"required":["token","type"],"type":"object","x-fern-type-name":"CreateConnectorServiceAuth"},"CreateEmbedJobRequest":{"properties":{"dataset_id":{"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`","type":"string","x-fern-audiences":["public"]},"embedding_types":{"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.\n\n* `\"float\"`: Use this when you want to get back the default float embeddings. Valid for all models.\n* `\"int8\"`: Use this when you want to get back signed int8 embeddings. Valid for v3 and newer model versions.\n* `\"uint8\"`: Use this when you want to get back unsigned int8 embeddings. Valid for v3 and newer model versions.\n* `\"binary\"`: Use this when you want to get back signed binary embeddings. Valid for v3 and newer model versions.\n* `\"ubinary\"`: Use this when you want to get back unsigned binary embeddings. Valid for v3 and newer model versions.","items":{"$ref":"#/components/schemas/EmbeddingType"},"type":"array","x-fern-audiences":["public"]},"input_type":{"$ref":"#/components/schemas/EmbedInputType","x-fern-audiences":["public"]},"model":{"description":"ID of the embedding model.\n\nAvailable models and corresponding embedding dimensions:\n\n- `embed-english-v3.0` : 1024\n- `embed-multilingual-v3.0` : 1024\n- `embed-english-light-v3.0` : 384\n- `embed-multilingual-light-v3.0` : 384\n","format":"string","type":"string","x-fern-audiences":["public"]},"name":{"description":"The name of the embed job.","type":"string","x-fern-audiences":["public"]},"truncate":{"default":"END","description":"One of `START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `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.\n","enum":["START","END"],"type":"string","x-fern-audiences":["public"]}},"required":["dataset_id","input_type","model"],"type":"object","x-fern-type-name":"CreateEmbedJobRequest"},"CreateEmbedJobResponse":{"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"]}},"required":["job_id"],"type":"object","x-fern-type-name":"CreateEmbedJobResponse"},"CreateFinetunedModelResponse":{"deprecated":true,"description":"Response to request to create a fine-tuned model.","properties":{"finetuned_model":{"$ref":"#/components/schemas/FinetunedModel","description":"Information about the fine-tuned model."}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"Dataset":{"properties":{"created_at":{"description":"The creation date","format":"date-time","type":"string","x-fern-audiences":["public"]},"dataset_parts":{"description":"the underlying files that make up the dataset","items":{"$ref":"#/components/schemas/DatasetPart"},"type":"array","x-fern-audiences":["public"]},"dataset_type":{"$ref":"#/components/schemas/DatasetType","x-fern-audiences":["public"]},"id":{"description":"The dataset ID","type":"string","x-fern-audiences":["public"]},"metrics":{"$ref":"#/components/schemas/Metrics"},"name":{"description":"The name of the dataset","type":"string","x-fern-audiences":["public"]},"parse_info":{"$ref":"#/components/schemas/ParseInfo"},"preserve_fields":{"items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"required_fields":{"items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"schema":{"description":"the avro schema of the dataset","type":"string","x-fern-audiences":["public"]},"updated_at":{"description":"The last update date","format":"date-time","type":"string","x-fern-audiences":["public"]},"validation_error":{"description":"Errors found during validation","type":"string","x-fern-audiences":["public"]},"validation_status":{"$ref":"#/components/schemas/DatasetValidationStatus","x-fern-audiences":["public"]},"validation_warnings":{"description":"warnings found during validation","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]}},"required":["created_at","dataset_type","id","name","updated_at","validation_status"],"type":"object","x-fern-type-name":"Dataset"},"DatasetPart":{"properties":{"id":{"description":"The dataset part ID","type":"string","x-fern-audiences":["public"]},"index":{"description":"The index of the file","format":"int32","type":"integer","x-fern-audiences":["public"]},"name":{"description":"The name of the dataset part","type":"string","x-fern-audiences":["public"]},"num_rows":{"description":"The number of rows in the file","format":"int32","type":"integer","x-fern-audiences":["public"]},"original_url":{"description":"The download url of the original file","type":"string","x-fern-audiences":["public"]},"samples":{"description":"The first few rows of the parsed file","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"size_bytes":{"description":"The size of the file in bytes","format":"int32","type":"integer","x-fern-audiences":["public"]},"url":{"description":"The download url of the file","type":"string","x-fern-audiences":["public"]}},"required":["id","name"],"type":"object","x-fern-type-name":"DatasetPart"},"DatasetType":{"description":"The type of the dataset","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"],"type":"string","x-fern-audiences":["public"],"x-fern-type-name":"DatasetType"},"DatasetValidationStatus":{"description":"The validation status of the dataset","enum":["unknown","queued","processing","failed","validated","skipped"],"type":"string","x-fern-audiences":["public"],"x-fern-type-name":"DatasetValidationStatus"},"DeleteConnectorResponse":{"type":"object","x-fern-type-name":"DeleteConnectorResponse"},"DeleteFinetunedModelResponse":{"deprecated":true,"description":"Response to request to delete a fine-tuned model.","type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"Document":{"description":"Relevant information that could be used by the model to generate a more accurate reply.\nThe 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\npassed to the model.\n","properties":{"data":{"description":"A relevant document that the model can cite to generate a more accurate reply. Each document is a string-any dictionary.\n","type":"object","x-fern-type-name":"Document-qmvpd9"},"id":{"description":"Unique identifier for this document which will be referenced in citations. If not provided an ID will be automatically generated.","type":"string"}},"required":["data"],"type":"object","x-fern-type-name":"Document"},"DocumentContent":{"description":"Document content.","properties":{"document":{"$ref":"#/components/schemas/Document"},"type":{"enum":["document"],"type":"string"}},"required":["document","type"],"type":"object","x-fern-type-name":"DocumentContent"},"EmbedByTypeResponse":{"properties":{"embeddings":{"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.","items":{"items":{"type":"number","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"properties":{"base64":{"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"]},"type":"array","x-fern-audiences":["public"]},"binary":{"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":{"items":{"type":"integer","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"float":{"description":"An array of float embeddings.","items":{"items":{"type":"number","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"int8":{"description":"An array of signed int8 embeddings. Each value is between -128 and 127.","items":{"items":{"type":"integer","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"ubinary":{"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":{"items":{"type":"integer","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"uint8":{"description":"An array of unsigned int8 embeddings. Each value is between 0 and 255.","items":{"items":{"type":"integer","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"EmbedByTypeResponseEmbeddings"},"id":{"type":"string","x-fern-audiences":["public"]},"images":{"description":"The image entries for which embeddings were returned.","items":{"$ref":"#/components/schemas/Image","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"response_type":{"enum":["embeddings_floats","embeddings_by_type"],"type":"string","x-fern-audiences":["public"]},"texts":{"description":"The text entries for which embeddings were returned.","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]}},"required":["embeddings","id"],"type":"object","x-examples":{"Example":{"value":{"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]]},"id":"bc57846a-3e56-4327-8acc-588ca1a37b8a","meta":{"api_version":{"version":"1"}},"texts":["hello world"]}}},"x-fern-type-name":"EmbedByTypeResponse"},"EmbedContent":{"discriminator":{"mapping":{"image_url":"#/components/schemas/EmbedImage","text":"#/components/schemas/EmbedText"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/EmbedImage"},{"$ref":"#/components/schemas/EmbedText"}],"x-fern-type-name":"EmbedContent"},"EmbedContentType":{"enum":["text","image_url"],"type":"string","writeOnly":true,"x-fern-audiences":["public"],"x-fern-type-name":"EmbedContentType"},"EmbedFloatsResponse":{"properties":{"embeddings":{"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":{"items":{"type":"number","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"id":{"type":"string","x-fern-audiences":["public"]},"images":{"description":"The image entries for which embeddings were returned.","items":{"$ref":"#/components/schemas/Image","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"response_type":{"enum":["embeddings_floats","embeddings_by_type"],"type":"string","x-fern-audiences":["public"]},"texts":{"description":"The text entries for which embeddings were returned.","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]}},"required":["embeddings","id","texts"],"type":"object","x-examples":{"Example":{"value":{"api_version":"v1","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]],"id":"bc57846a-3e56-4327-8acc-588ca1a37b8a","meta":{"api_version":{"version":"1"}},"texts":["hello world"]}}},"x-fern-type-name":"EmbedFloatsResponse"},"EmbedImage":{"description":"Image content of the input. Supported with Embed v3.0 and newer models.","properties":{"image_url":{"$ref":"#/components/schemas/EmbedImageUrl"},"type":{"$ref":"#/components/schemas/EmbedContentType"}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"EmbedImage"},"EmbedImageUrl":{"description":"Base64 url of image.","properties":{"url":{"type":"string"}},"required":["url"],"type":"object","x-fern-type-name":"EmbedImageUrl"},"EmbedInput":{"properties":{"content":{"description":"An array of objects containing the input data for the model to embed.","items":{"$ref":"#/components/schemas/EmbedContent"},"type":"array","x-fern-audiences":["public"]}},"required":["content"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"EmbedInput"},"EmbedInputType":{"description":"Specifies the type of input passed to the model. Required for embedding models v3 and higher.\n\n- `\"search_document\"`: Used for embeddings stored in a vector database for search use-cases.\n- `\"search_query\"`: Used for embeddings of search queries run against a vector DB to find relevant documents.\n- `\"classification\"`: Used for embeddings passed through a text classifier.\n- `\"clustering\"`: Used for the embeddings run through a clustering algorithm.\n- `\"image\"`: Used for embeddings with image input.\n","enum":["search_document","search_query","classification","clustering","image"],"type":"string","x-fern-type-name":"EmbedInputType"},"EmbedJob":{"properties":{"created_at":{"description":"The creation date of the embed job","format":"date-time","type":"string","x-fern-audiences":["public"]},"input_dataset_id":{"description":"ID of the input dataset","type":"string","x-fern-audiences":["public"]},"job_id":{"description":"ID of the embed job","type":"string","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"model":{"description":"ID of the model used to embed","type":"string","x-fern-audiences":["public"]},"name":{"description":"The name of the embed job","type":"string","x-fern-audiences":["public"]},"output_dataset_id":{"description":"ID of the resulting output dataset","type":"string","x-fern-audiences":["public"]},"status":{"description":"The status of the embed job","enum":["processing","complete","cancelling","cancelled","failed"],"type":"string","x-fern-audiences":["public"]},"truncate":{"description":"The truncation option used","enum":["START","END"],"type":"string","x-fern-audiences":["public"]}},"required":["created_at","input_dataset_id","job_id","model","status","truncate"],"type":"object","x-fern-type-name":"EmbedJob"},"EmbedText":{"description":"Text content of the input.","properties":{"text":{"type":"string","x-fern-audiences":["public"]},"type":{"$ref":"#/components/schemas/EmbedContentType"}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"EmbedText"},"EmbeddingType":{"enum":["float","int8","uint8","binary","ubinary","base64"],"type":"string","writeOnly":true,"x-fern-audiences":["public"],"x-fern-type-name":"EmbeddingType"},"Error":{"deprecated":true,"description":"Error is the response for any unsuccessful event.","properties":{"message":{"description":"A developer-facing error message.","type":"string"}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"Event":{"deprecated":true,"description":"A change in status of a fine-tuned model.","properties":{"created_at":{"description":"Timestamp when the event happened.","format":"date-time","type":"string"},"status":{"$ref":"#/components/schemas/Status","description":"Status of the fine-tuned model."},"user_id":{"description":"ID of the user who initiated the event. Empty if initiated by the system.","type":"string"}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"FinetuneDatasetMetrics":{"properties":{"chat_data_metrics":{"$ref":"#/components/schemas/ChatDataMetrics"},"classify_data_metrics":{"$ref":"#/components/schemas/ClassifyDataMetrics"},"eval_examples":{"description":"Number of evaluation examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"eval_size_bytes":{"description":"The size in bytes of all eval examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"reranker_data_metrics":{"$ref":"#/components/schemas/RerankerDataMetrics"},"total_examples":{"description":"The overall number of examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"train_examples":{"description":"The number of training examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"train_size_bytes":{"description":"The size in bytes of all training examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"trainable_token_count":{"description":"The number of tokens of valid examples that can be used for training.","format":"int64","type":"number","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"FinetuneDatasetMetrics"},"FinetunedModel":{"deprecated":true,"description":"This resource represents a fine-tuned model.","properties":{"completed_at":{"description":"read-only. Timestamp for the completed fine-tuning.","format":"date-time","readOnly":true,"type":"string"},"created_at":{"description":"read-only. Creation timestamp.","format":"date-time","readOnly":true,"type":"string"},"creator_id":{"description":"read-only. User ID of the creator.","readOnly":true,"type":"string"},"id":{"description":"read-only. FinetunedModel ID.","readOnly":true,"type":"string"},"last_used":{"description":"read-only. Deprecated: Timestamp for the latest request to this fine-tuned model.","format":"date-time","readOnly":true,"type":"string"},"name":{"description":"FinetunedModel name (e.g. `foobar`).","type":"string"},"organization_id":{"description":"read-only. Organization ID.","readOnly":true,"type":"string"},"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},"updated_at":{"description":"read-only. Latest update timestamp.","format":"date-time","readOnly":true,"type":"string"}},"required":["name","settings"],"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"FinishReason":{"enum":["COMPLETE","STOP_SEQUENCE","ERROR","ERROR_TOXIC","ERROR_LIMIT","USER_CANCEL","MAX_TOKENS","TIMEOUT"],"type":"string","x-fern-type-name":"FinishReason"},"GenerateStreamEnd":{"allOf":[{"$ref":"#/components/schemas/GenerateStreamEvent"},{"properties":{"finish_reason":{"$ref":"#/components/schemas/FinishReason","x-fern-audiences":["public"]},"is_finished":{"type":"boolean","x-fern-audiences":["public"]},"response":{"properties":{"generations":{"items":{"$ref":"#/components/schemas/SingleGenerationInStream"},"type":"array","x-fern-audiences":["public"]},"id":{"type":"string","x-fern-audiences":["public"]},"prompt":{"type":"string","x-fern-audiences":["public"]}},"required":["id"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"GenerateStreamEndResponse"}},"required":["is_finished","response"],"type":"object","x-fern-type-name":"GenerateStreamEnd-ubzr0t"}],"x-fern-type-name":"GenerateStreamEnd"},"GenerateStreamError":{"allOf":[{"$ref":"#/components/schemas/GenerateStreamEvent"},{"properties":{"err":{"description":"Error message","type":"string","x-fern-audiences":["public"]},"finish_reason":{"$ref":"#/components/schemas/FinishReason","x-fern-audiences":["public"]},"index":{"description":"Refers to the nth generation. Only present when `num_generations` is greater than zero.","type":"integer","x-fern-audiences":["public"]},"is_finished":{"type":"boolean","x-fern-audiences":["public"]}},"required":["err","finish_reason","is_finished"],"type":"object","x-fern-type-name":"GenerateStreamError-49d5xw"}],"x-fern-type-name":"GenerateStreamError"},"GenerateStreamEvent":{"properties":{"event_type":{"enum":["text-generation","stream-end","stream-error"],"type":"string"}},"required":["event_type"],"x-fern-type-name":"GenerateStreamEvent"},"GenerateStreamText":{"allOf":[{"$ref":"#/components/schemas/GenerateStreamEvent"},{"properties":{"index":{"description":"Refers to the nth generation. Only present when `num_generations` is greater than zero, and only when text responses are being streamed.","type":"integer"},"is_finished":{"type":"boolean"},"text":{"description":"A segment of text of the generation.","type":"string"}},"required":["is_finished","text"],"type":"object","x-fern-type-name":"GenerateStreamText-yai5v6"}],"x-fern-type-name":"GenerateStreamText"},"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.","discriminator":{"mapping":{"stream-end":"#/components/schemas/GenerateStreamEnd","stream-error":"#/components/schemas/GenerateStreamError","text-generation":"#/components/schemas/GenerateStreamText"},"propertyName":"event_type"},"oneOf":[{"$ref":"#/components/schemas/GenerateStreamText"},{"$ref":"#/components/schemas/GenerateStreamEnd"},{"$ref":"#/components/schemas/GenerateStreamError"}],"x-fern-type-name":"GenerateStreamedResponse"},"Generation":{"properties":{"generations":{"description":"List of generated results","items":{"$ref":"#/components/schemas/SingleGeneration","type":"object","x-fern-audiences":["public"],"x-fern-type-name":"Generation-9h264n"},"type":"array","x-fern-audiences":["public"]},"id":{"type":"string","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"prompt":{"description":"Prompt used for generations.","type":"string","x-fern-audiences":["public"]}},"required":["generations","id"],"type":"object","x-fern-type-name":"Generation"},"GetBatchResponse":{"description":"Response to a request to get a batch.","properties":{"batch":{"$ref":"#/components/schemas/Batch","description":"Information about the batch."}},"required":["batch"],"type":"object","x-fern-sdk-group-name":["batches"]},"GetConnectorResponse":{"properties":{"connector":{"$ref":"#/components/schemas/Connector"}},"required":["connector"],"type":"object","x-fern-type-name":"GetConnectorResponse"},"GetFinetunedModelResponse":{"deprecated":true,"description":"Response to a request to get a fine-tuned model.","properties":{"finetuned_model":{"$ref":"#/components/schemas/FinetunedModel","description":"Information about the fine-tuned model."}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"GetModelResponse":{"description":"Contains information about the model and which API endpoints it can be used with.","properties":{"context_length":{"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.","type":"number","x-fern-audiences":["public"]},"default_endpoints":{"description":"The API endpoints that the model is default to.","items":{"$ref":"#/components/schemas/CompatibleEndpoint"},"type":"array","x-fern-audiences":["public"]},"endpoints":{"description":"The API endpoints that the model is compatible with.","items":{"$ref":"#/components/schemas/CompatibleEndpoint"},"type":"array","x-fern-audiences":["public"]},"features":{"description":"The features that the model supports.","items":{"type":"string"},"type":"array","x-fern-audiences":["public"]},"finetuned":{"description":"Whether the model has been fine-tuned or not.","type":"boolean","x-fern-audiences":["public"]},"is_deprecated":{"description":"Whether the model is deprecated or not.","type":"boolean","x-fern-audiences":["public"]},"name":{"description":"Specify this name in the `model` parameter of API requests to use your chosen model.","type":"string","x-fern-audiences":["public"]},"sampling_defaults":{"description":"Default sampling parameters for this model when omitted from API requests.","properties":{"frequency_penalty":{"format":"float","type":"number"},"k":{"format":"int32","type":"integer"},"max_tokens_per_doc":{"format":"int32","type":"integer"},"p":{"format":"float","type":"number"},"presence_penalty":{"format":"float","type":"number"},"temperature":{"format":"float","type":"number"}},"type":"object","x-fern-audiences":["public"]},"tokenizer_url":{"description":"Public URL to the tokenizer's configuration file.","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"GetModelResponse"},"Hyperparameters":{"deprecated":true,"description":"The fine-tuning hyperparameters.","properties":{"early_stopping_patience":{"description":"Stops training if the loss metric does not improve beyond the value of\n`early_stopping_threshold` after this many times of evaluation.","format":"int32","type":"integer"},"early_stopping_threshold":{"description":"How much the loss must improve to prevent early stopping.","format":"double","type":"number"},"learning_rate":{"description":"The learning rate to be used during training.","format":"double","type":"number"},"lora_alpha":{"description":"Controls the scaling factor for LoRA updates. Higher values make the\nupdates more impactful.","format":"int32","type":"integer"},"lora_rank":{"description":"Specifies the rank for low-rank matrices. Lower ranks reduce parameters\nbut may limit model flexibility.","format":"int32","type":"integer"},"lora_target_modules":{"$ref":"#/components/schemas/LoraTargetModules","description":"The combination of LoRA modules to target."},"train_batch_size":{"description":"The batch size is the number of training examples included in a single\ntraining pass.","format":"int32","type":"integer"},"train_epochs":{"description":"The number of epochs to train for.","format":"int32","type":"integer"}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"Image":{"properties":{"bit_depth":{"description":"Bit depth of the image","format":"int64","type":"number","x-fern-audiences":["public"]},"format":{"description":"Format of the image","type":"string","x-fern-audiences":["public"]},"height":{"description":"Height of the image in pixels","format":"int64","type":"number","x-fern-audiences":["public"]},"width":{"description":"Width of the image in pixels","format":"int64","type":"number","x-fern-audiences":["public"]}},"required":["bit_depth","format","height","width"],"type":"object","x-fern-type-name":"Image"},"ImageContent":{"description":"Image content of the message.","properties":{"image_url":{"$ref":"#/components/schemas/ImageUrl"},"type":{"$ref":"#/components/schemas/ContentType"}},"required":["image_url","type"],"type":"object","x-fern-type-name":"ImageContent"},"ImageUrl":{"properties":{"detail":{"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\"`.\n","enum":["auto","low","high"],"type":"string"},"url":{"description":"URL of an image. Can be either a base64 data URI or a web URL.\n","type":"string"}},"required":["url"],"type":"object","x-fern-type-name":"ImageUrl"},"JSONResponseFormat":{"properties":{"schema":{"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.\nExample (required name and age object):\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": {\"type\": \"string\"},\n    \"age\": {\"type\": \"integer\"}\n  },\n  \"required\": [\"name\", \"age\"]\n}\n```\n\n**Note**: This field must not be specified when the `type` is set to `\"text\"`.\n","type":"object","x-fern-availability":"beta","x-fern-type-name":"JSONResponseFormat-g7xopi"},"type":{"$ref":"#/components/schemas/ResponseFormatType"}},"required":["type"],"title":"JSON Object Response","type":"object","x-fern-audiences":["public"],"x-fern-type-name":"JSONResponseFormat"},"JsonResponseFormatV2":{"properties":{"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.\nExample (required name and age object):\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"name\": {\"type\": \"string\"},\n    \"age\": {\"type\": \"integer\"}\n  },\n  \"required\": [\"name\", \"age\"]\n}\n```\n\n**Note**: This field must not be specified when the `type` is set to `\"text\"`.\n","type":"object","x-fern-type-name":"JsonResponseFormatV2-uu9wid"},"type":{"$ref":"#/components/schemas/ResponseFormatTypeV2"}},"required":["type"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"JsonResponseFormatV2"},"LabelMetric":{"properties":{"label":{"description":"value of the label","type":"string","x-fern-audiences":["public"]},"samples":{"description":"samples for this label","items":{"type":"string"},"type":"array","x-fern-audiences":["public"]},"total_examples":{"description":"Total number of examples for this label","format":"int64","type":"number","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"LabelMetric"},"ListBatchesResponse":{"description":"Response to a request to list batches.","properties":{"batches":{"description":"The batches that belong to the authenticated user.","items":{"$ref":"#/components/schemas/Batch","type":"object"},"type":"array"},"next_page_token":{"description":"A token, which can be sent as `page_token` to retrieve the next page.\nIf this field is omitted, there are no subsequent pages.","type":"string"}},"type":"object","x-fern-sdk-group-name":["batches"]},"ListConnectorsResponse":{"properties":{"connectors":{"items":{"$ref":"#/components/schemas/Connector"},"type":"array","x-fern-audiences":["public"]},"total_count":{"description":"Total number of connectors.","type":"number","x-fern-audiences":["public"]}},"required":["connectors"],"type":"object","x-fern-type-name":"ListConnectorsResponse"},"ListEmbedJobResponse":{"properties":{"embed_jobs":{"items":{"$ref":"#/components/schemas/EmbedJob"},"type":"array","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"ListEmbedJobResponse"},"ListEventsResponse":{"deprecated":true,"description":"Response to a request to list events of a fine-tuned model.","properties":{"events":{"description":"List of events for the fine-tuned model.","items":{"$ref":"#/components/schemas/Event","type":"object"},"type":"array"},"next_page_token":{"description":"Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request.","type":"string"},"total_size":{"description":"Total count of results.","format":"int32","type":"integer"}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"ListFinetunedModelsResponse":{"deprecated":true,"description":"Response to a request to list fine-tuned models.","properties":{"finetuned_models":{"description":"List of fine-tuned models matching the request.","items":{"$ref":"#/components/schemas/FinetunedModel","type":"object"},"type":"array"},"next_page_token":{"description":"Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request.","type":"string"},"total_size":{"description":"Total count of results.","format":"int32","type":"integer"}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"ListModelsResponse":{"properties":{"models":{"items":{"$ref":"#/components/schemas/GetModelResponse"},"type":"array","x-fern-audiences":["public"]},"next_page_token":{"description":"A token to retrieve the next page of results. Provide in the page_token parameter of the next request.","type":"string","x-fern-audiences":["public"]}},"required":["models"],"type":"object","x-fern-type-name":"ListModelsResponse"},"ListTrainingStepMetricsResponse":{"deprecated":true,"description":"Response to a request to list training-step metrics of a fine-tuned model.","properties":{"next_page_token":{"description":"Pagination token to retrieve the next page of results. If the value is \"\",\nit means no further results for the request.","type":"string"},"step_metrics":{"description":"The metrics for each step the evaluation was run on.","items":{"$ref":"#/components/schemas/TrainingStepMetrics","type":"object"},"type":"array"}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"LogprobItem":{"properties":{"logprobs":{"description":"The log probability of each token used to construct the text chunk.","items":{"format":"float","type":"number"},"type":"array"},"text":{"description":"The text chunk for which the log probabilities was calculated.","type":"string"},"token_ids":{"description":"The token ids of each token used to construct the text chunk.","items":{"type":"integer"},"type":"array"}},"required":["token_ids"],"type":"object","x-fern-type-name":"LogprobItem"},"LoraTargetModules":{"default":"LORA_TARGET_MODULES_UNSPECIFIED","deprecated":true,"description":"The possible combinations of LoRA modules to target.\n\n - LORA_TARGET_MODULES_UNSPECIFIED: Unspecified LoRA target modules.\n - LORA_TARGET_MODULES_QV: LoRA adapts the query and value matrices in transformer attention layers.\n - LORA_TARGET_MODULES_QKVO: LoRA adapts query, key, value, and output matrices in attention layers.\n - LORA_TARGET_MODULES_QKVO_FFN: LoRA adapts attention projection matrices and feed-forward networks (FFN).","enum":["LORA_TARGET_MODULES_UNSPECIFIED","LORA_TARGET_MODULES_QV","LORA_TARGET_MODULES_QKVO","LORA_TARGET_MODULES_QKVO_FFN"],"type":"string","x-fern-sdk-group-name":["finetuning","finetuning"]},"Message":{"discriminator":{"mapping":{"CHATBOT":"#/components/schemas/ChatMessage","SYSTEM":"#/components/schemas/ChatMessage","TOOL":"#/components/schemas/ChatToolMessage","USER":"#/components/schemas/ChatMessage"},"propertyName":"role"},"oneOf":[{"$ref":"#/components/schemas/ChatMessage"},{"$ref":"#/components/schemas/ChatToolMessage"}],"x-fern-type-name":"Message"},"Metrics":{"properties":{"finetune_dataset_metrics":{"$ref":"#/components/schemas/FinetuneDatasetMetrics"}},"type":"object","x-fern-type-name":"Metrics"},"NonStreamedChatResponse":{"properties":{"chat_history":{"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`.\n","items":{"$ref":"#/components/schemas/Message"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"citations":{"description":"Inline citations for the generated reply.","items":{"$ref":"#/components/schemas/ChatCitation"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"documents":{"description":"Documents seen by the model when generating the reply.","items":{"$ref":"#/components/schemas/ChatDocument"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"finish_reason":{"$ref":"#/components/schemas/FinishReason","x-fern-audiences":["public"]},"generation_id":{"description":"Unique identifier for the generated reply. Useful for submitting feedback.","format":"uuid","type":"string","x-fern-audiences":["public"]},"is_search_required":{"description":"Denotes that a search for documents is required during the RAG flow.","type":"boolean","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"response_id":{"description":"Unique identifier for the response.","format":"uuid","type":"string","x-fern-audiences":["public"]},"search_queries":{"description":"Generated search queries, meant to be used as part of the RAG flow.","items":{"$ref":"#/components/schemas/ChatSearchQuery"},"type":"array","x-fern-audiences":["public"]},"search_results":{"description":"Documents retrieved from each of the conducted searches.","items":{"$ref":"#/components/schemas/ChatSearchResult"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"text":{"description":"Contents of the reply generated by the model.","minLength":1,"type":"string","x-fern-audiences":["public"]},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","x-fern-audiences":["public"]}},"required":["text"],"x-fern-type-name":"NonStreamedChatResponse"},"OAuthAuthorizeResponse":{"properties":{"redirect_url":{"description":"The OAuth 2.0 redirect url. Redirect the user to this url to authorize the connector.","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"OAuthAuthorizeResponse"},"ParseBlock":{"description":"A content block on a parsed page.","discriminator":{"mapping":{"image":"#/components/schemas/ParseImageContentBlock","table":"#/components/schemas/ParseTableContentBlock","text":"#/components/schemas/ParseTextContentBlock"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ParseTextContentBlock"},{"$ref":"#/components/schemas/ParseImageContentBlock"},{"$ref":"#/components/schemas/ParseTableContentBlock"}],"x-fern-type-name":"ParseBlock"},"ParseBlocksPageVariant":{"description":"A parsed page with structured content blocks.","properties":{"blocks":{"description":"Ordered content blocks extracted from the page.","items":{"$ref":"#/components/schemas/ParseBlock"},"type":"array"},"index":{"description":"Zero-based page index.","type":"integer"},"type":{"enum":["blocks"],"type":"string"}},"required":["blocks","index","type"],"type":"object","x-fern-type-name":"ParseBlocksPageVariant"},"ParseBoundingBox":{"description":"A bounding box with pixel coordinates on the source document image.","properties":{"bottom_right_x":{"description":"X coordinate of the bottom-right corner.","type":"integer"},"bottom_right_y":{"description":"Y coordinate of the bottom-right corner.","type":"integer"},"top_left_x":{"description":"X coordinate of the top-left corner.","type":"integer"},"top_left_y":{"description":"Y coordinate of the top-left corner.","type":"integer"}},"required":["bottom_right_x","bottom_right_y","top_left_x","top_left_y"],"type":"object","x-fern-type-name":"ParseBoundingBox"},"ParseBoundingBoxNormalized":{"description":"A bounding box with coordinates in [0, 1] relative to the source page (model\ncoordinates are thousandths of page width/height).\n","properties":{"bottom_right_x":{"description":"Normalized X coordinate of the bottom-right corner.","format":"double","type":"number"},"bottom_right_y":{"description":"Normalized Y coordinate of the bottom-right corner.","format":"double","type":"number"},"top_left_x":{"description":"Normalized X coordinate of the top-left corner.","format":"double","type":"number"},"top_left_y":{"description":"Normalized Y coordinate of the top-left corner.","format":"double","type":"number"}},"required":["bottom_right_x","bottom_right_y","top_left_x","top_left_y"],"type":"object","x-fern-type-name":"ParseBoundingBoxNormalized"},"ParseDocument":{"description":"Document to parse. Currently only `image_url` documents are supported.\n","properties":{"image_url":{"description":"Image URL or base64 data URI to parse.\n\nLimits:\n- Maximum file size: 20 MB (compressed upload, download, or decoded\n  data-URI payload)\n- Maximum decoded size: 50 megapixels or 200 MB decompressed\n  (whichever is exceeded first)\n","type":"string"},"type":{"description":"Discriminator for the document payload.","enum":["image_url"],"type":"string"}},"required":["image_url","type"],"type":"object","x-fern-type-name":"ParseDocument"},"ParseImageBlock":{"description":"Payload for an image block.","properties":{"bounding_box":{"$ref":"#/components/schemas/ParseBoundingBox"},"bounding_box_normalized":{"$ref":"#/components/schemas/ParseBoundingBoxNormalized"},"category":{"$ref":"#/components/schemas/ParseImageCategory"},"description":{"description":"Model-generated description of the image.","type":"string"},"id":{"description":"Unique identifier for the image within the page (for example `img-0`).","type":"string"}},"required":["bounding_box","bounding_box_normalized","category","description","id"],"type":"object","x-fern-type-name":"ParseImageBlock"},"ParseImageCategory":{"description":"Image element category.","enum":["other","flowchart","logo","signature"],"type":"string","x-fern-type-name":"ParseImageCategory"},"ParseImageContentBlock":{"description":"An image content block.","properties":{"image":{"$ref":"#/components/schemas/ParseImageBlock"},"type":{"enum":["image"],"type":"string"}},"required":["image","type"],"type":"object","x-fern-type-name":"ParseImageContentBlock"},"ParseInfo":{"properties":{"delimiter":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"separator":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]}},"type":"object","writeOnly":true,"x-fern-type-name":"ParseInfo"},"ParseMarkdownPage":{"description":"Markdown output payload for a parsed page.","properties":{"content":{"description":"Page content as markdown. Images are embedded as\n`![<description>](<image_id>)`. Tables are inlined as HTML.\n","type":"string"},"images":{"description":"Image metadata referenced from `content`.","items":{"$ref":"#/components/schemas/ParseImageBlock"},"type":"array"}},"required":["content"],"type":"object","x-fern-type-name":"ParseMarkdownPage"},"ParseMarkdownPageVariant":{"description":"A parsed page with markdown content.","properties":{"index":{"description":"Zero-based page index.","type":"integer"},"markdown":{"$ref":"#/components/schemas/ParseMarkdownPage"},"type":{"enum":["markdown"],"type":"string"}},"required":["index","markdown","type"],"type":"object","x-fern-type-name":"ParseMarkdownPageVariant"},"ParseOutputFormat":{"default":"markdown","description":"Selects the page payload shape in the response. Defaults to `\"markdown\"`.\n\n- `\"markdown\"`: each page includes markdown content. Tables are inlined as\n  HTML, and images are referenced as `![<description>](<image_id>)` with\n  matching entries in `page.markdown.images`.\n- `\"blocks\"`: each page includes an ordered `blocks` array of text, image,\n  and table content regions, including bounding boxes where available.\n","enum":["blocks","markdown"],"type":"string","x-fern-type-name":"ParseOutputFormat"},"ParsePage":{"description":"A single parsed page. The payload shape depends on `output_format`.","discriminator":{"mapping":{"blocks":"#/components/schemas/ParseBlocksPageVariant","markdown":"#/components/schemas/ParseMarkdownPageVariant"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ParseBlocksPageVariant"},{"$ref":"#/components/schemas/ParseMarkdownPageVariant"}],"x-fern-type-name":"ParsePage"},"ParseResponse":{"description":"Response from the v2 parse endpoint.","properties":{"finish_reason":{"$ref":"#/components/schemas/ChatFinishReason","description":"The reason parsing finished. For Parse, this is only ever `COMPLETE` or\n`MAX_TOKENS`; `MAX_TOKENS` indicates the output was truncated because it\nexceeded the maximum output token limit.\n"},"id":{"description":"Unique identifier for the parse response.","type":"string"},"meta":{"$ref":"#/components/schemas/ApiMeta"},"pages":{"description":"Parsed pages in document order.","items":{"$ref":"#/components/schemas/ParsePage"},"type":"array"}},"required":["id","pages"],"type":"object","x-fern-type-name":"ParseResponse"},"ParseTableBlock":{"description":"Payload for a table block.","properties":{"bounding_box":{"$ref":"#/components/schemas/ParseBoundingBox"},"bounding_box_normalized":{"$ref":"#/components/schemas/ParseBoundingBoxNormalized"},"description":{"description":"Optional table description when detected.","type":"string"},"html":{"description":"Table content as HTML.","type":"string"},"title":{"description":"Optional table title when detected.","type":"string"},"type":{"$ref":"#/components/schemas/ParseTableContentType"}},"required":["bounding_box","bounding_box_normalized","html","type"],"type":"object","x-fern-type-name":"ParseTableBlock"},"ParseTableContentBlock":{"description":"A table content block.","properties":{"table":{"$ref":"#/components/schemas/ParseTableBlock"},"type":{"enum":["table"],"type":"string"}},"required":["table","type"],"type":"object","x-fern-type-name":"ParseTableContentBlock"},"ParseTableContentType":{"description":"Table serialization format.","enum":["html"],"type":"string","x-fern-type-name":"ParseTableContentType"},"ParseTextBlock":{"description":"Payload for a text block.","properties":{"content":{"description":"Extracted text content.","type":"string"}},"required":["content"],"type":"object","x-fern-type-name":"ParseTextBlock"},"ParseTextContentBlock":{"description":"A text content block.","properties":{"text":{"$ref":"#/components/schemas/ParseTextBlock"},"type":{"enum":["text"],"type":"string"}},"required":["text","type"],"type":"object","x-fern-type-name":"ParseTextContentBlock"},"RerankDocument":{"properties":{"text":{"description":"The text of the document to rerank.","type":"string","x-fern-audiences":["public"]}},"required":["text"],"type":"object","x-fern-type":"map<string, string>","x-fern-type-name":"RerankDocument"},"RerankerDataMetrics":{"properties":{"num_eval_hard_negatives":{"description":"The sum of all hard negatives of valid eval examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"num_eval_queries":{"description":"The number of evaluation queries.","format":"int64","type":"number","x-fern-audiences":["public"]},"num_eval_relevant_passages":{"description":"The sum of all relevant passages of valid eval examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"num_train_hard_negatives":{"description":"The sum of all hard negatives of valid training examples.","format":"int64","type":"number","x-fern-audiences":["public"]},"num_train_queries":{"description":"The number of training queries.","format":"int64","type":"number","x-fern-audiences":["public"]},"num_train_relevant_passages":{"description":"The sum of all relevant passages of valid training examples.","format":"int64","type":"number","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"RerankerDataMetrics"},"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.\n\nThe model can be forced into outputting JSON objects (with up to 5 levels of nesting) by setting `{ \"type\": \"json_object\" }`.\n\nA [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.\n\n**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.\n**Limitation**: The parameter is not supported in RAG mode (when any of `connectors`, `documents`, `tools`, `tool_results` are provided).\n","discriminator":{"mapping":{"json_object":"#/components/schemas/JSONResponseFormat","text":"#/components/schemas/ChatTextResponseFormat"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatTextResponseFormat"},{"$ref":"#/components/schemas/JSONResponseFormat"}],"x-fern-type-name":"ResponseFormat"},"ResponseFormatType":{"description":"Defaults to `\"text\"`.\n\nWhen set to `\"json_object\"`, the model's output will be a valid JSON Object.\n","enum":["text","json_object"],"type":"string","x-fern-audiences":["public"],"x-fern-type-name":"ResponseFormatType"},"ResponseFormatTypeV2":{"description":"Defaults to `\"text\"`.\n\nWhen set to `\"json_object\"`, the model's output will be a valid JSON Object.\n","enum":["text","json_object"],"type":"string","x-fern-audiences":["public"],"x-fern-type-name":"ResponseFormatTypeV2"},"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.\n\nThe model can be forced into outputting JSON objects by setting `{ \"type\": \"json_object\" }`.\n\nA [JSON Schema](https://json-schema.org/) can optionally be provided, to ensure a specific structure.\n\n**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.\n\n**Note**: When `json_schema` is not specified, the generated object can have up to 5 layers of nesting.\n\n**Limitation**: The parameter is not supported when used in combinations with the `documents` or `tools` parameters.\n","discriminator":{"mapping":{"json_object":"#/components/schemas/JsonResponseFormatV2","text":"#/components/schemas/ChatTextResponseFormatV2"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatTextResponseFormatV2"},{"$ref":"#/components/schemas/JsonResponseFormatV2"}],"x-fern-type-name":"ResponseFormatV2"},"Settings":{"deprecated":true,"description":"The configuration used for fine-tuning.","properties":{"base_model":{"$ref":"#/components/schemas/BaseModel","description":"The base model to fine-tune."},"dataset_id":{"description":"The data used for training and evaluating the fine-tuned model.","type":"string"},"hyperparameters":{"$ref":"#/components/schemas/Hyperparameters","description":"Fine-tuning hyper-parameters."},"multi_label":{"description":"read-only. Whether the model is single-label or multi-label (only for classification).","readOnly":true,"type":"boolean"},"wandb":{"$ref":"#/components/schemas/WandbConfig","description":"The Weights & Biases configuration (Chat fine-tuning only)."}},"required":["base_model","dataset_id"],"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"SingleGeneration":{"properties":{"id":{"type":"string","x-fern-audiences":["public"]},"index":{"description":"Refers to the nth generation. Only present when `num_generations` is greater than zero.","type":"integer","x-fern-audiences":["public"]},"likelihood":{"type":"number","x-fern-audiences":["public"]},"text":{"type":"string","x-fern-audiences":["public"]},"token_likelihoods":{"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":{"properties":{"likelihood":{"type":"number","x-fern-audiences":["public"]},"token":{"type":"string","x-fern-audiences":["public"]}},"required":["likelihood","token"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"SingleGenerationTokenLikelihoodsItem"},"type":"array","x-fern-audiences":["public"]}},"required":["id","text"],"type":"object","x-fern-type-name":"SingleGeneration"},"SingleGenerationInStream":{"properties":{"finish_reason":{"$ref":"#/components/schemas/FinishReason","x-fern-audiences":["public"]},"id":{"type":"string","x-fern-audiences":["public"]},"index":{"description":"Refers to the nth generation. Only present when `num_generations` is greater than zero.","type":"integer","x-fern-audiences":["public"]},"text":{"description":"Full text of the generation.","type":"string","x-fern-audiences":["public"]}},"required":["finish_reason","id","text"],"type":"object","x-fern-type-name":"SingleGenerationInStream"},"Source":{"description":"A source object containing information about the source of the data cited.","discriminator":{"mapping":{"document":"#/components/schemas/ChatDocumentSource","tool":"#/components/schemas/ChatToolSource"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatToolSource"},{"$ref":"#/components/schemas/ChatDocumentSource"}],"x-fern-type-name":"Source"},"Status":{"default":"STATUS_UNSPECIFIED","deprecated":true,"description":"The possible stages of a fine-tuned model life-cycle.\n\n - STATUS_UNSPECIFIED: Unspecified status.\n - STATUS_FINETUNING: The fine-tuned model is being fine-tuned.\n - STATUS_DEPLOYING_API: Deprecated: The fine-tuned model is being deployed.\n - STATUS_READY: The fine-tuned model is ready to receive requests.\n - STATUS_FAILED: The fine-tuned model failed.\n - STATUS_DELETED: The fine-tuned model was deleted.\n - STATUS_TEMPORARILY_OFFLINE: Deprecated: The fine-tuned model is temporarily unavailable.\n - STATUS_PAUSED: Deprecated: The fine-tuned model is paused (Vanilla only).\n - STATUS_QUEUED: The fine-tuned model is queued for training.","enum":["STATUS_UNSPECIFIED","STATUS_FINETUNING","STATUS_DEPLOYING_API","STATUS_READY","STATUS_FAILED","STATUS_DELETED","STATUS_TEMPORARILY_OFFLINE","STATUS_PAUSED","STATUS_QUEUED"],"type":"string","x-fern-sdk-group-name":["finetuning","finetuning"]},"Strategy":{"default":"STRATEGY_UNSPECIFIED","deprecated":true,"description":"The possible strategy used to serve a fine-tuned models.\n\n - STRATEGY_UNSPECIFIED: Unspecified strategy.\n - STRATEGY_VANILLA: Deprecated: Serve the fine-tuned model on a dedicated GPU.\n - STRATEGY_TFEW: Deprecated: Serve the fine-tuned model on a shared GPU.","enum":["STRATEGY_UNSPECIFIED","STRATEGY_VANILLA","STRATEGY_TFEW"],"type":"string","x-fern-sdk-group-name":["finetuning","finetuning"]},"StreamedChatResponse":{"description":"StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request).","discriminator":{"mapping":{"citation-generation":"#/components/schemas/ChatCitationGenerationEvent","debug":"#/components/schemas/ChatDebugEvent","search-queries-generation":"#/components/schemas/ChatSearchQueriesGenerationEvent","search-results":"#/components/schemas/ChatSearchResultsEvent","stream-end":"#/components/schemas/ChatStreamEndEvent","stream-start":"#/components/schemas/ChatStreamStartEvent","text-generation":"#/components/schemas/ChatTextGenerationEvent","tool-calls-chunk":"#/components/schemas/ChatToolCallsChunkEvent","tool-calls-generation":"#/components/schemas/ChatToolCallsGenerationEvent"},"propertyName":"event_type"},"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"}],"x-fern-type-name":"StreamedChatResponse"},"StreamedChatResponseV2":{"description":"StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request).","discriminator":{"mapping":{"citation-end":"#/components/schemas/CitationEndEvent","citation-start":"#/components/schemas/CitationStartEvent","content-delta":"#/components/schemas/ChatContentDeltaEvent","content-end":"#/components/schemas/ChatContentEndEvent","content-start":"#/components/schemas/ChatContentStartEvent","debug":"#/components/schemas/ChatDebugEvent","message-end":"#/components/schemas/ChatMessageEndEvent","message-start":"#/components/schemas/ChatMessageStartEvent","tool-call-delta":"#/components/schemas/ChatToolCallDeltaEvent","tool-call-end":"#/components/schemas/ChatToolCallEndEvent","tool-call-start":"#/components/schemas/ChatToolCallStartEvent","tool-plan-delta":"#/components/schemas/ChatToolPlanDeltaEvent"},"propertyName":"type"},"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"}]},"SystemMessageV2":{"description":"A message from the system.","properties":{"content":{"oneOf":[{"type":"string"},{"items":{"discriminator":{"mapping":{"text":"#/components/schemas/ChatTextContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatTextContent"}]},"type":"array"}]},"role":{"enum":["system"],"type":"string"}},"required":["content","role"],"title":"System Message","type":"object","x-fern-type-name":"SystemMessageV2"},"Thinking":{"description":"Configuration for [reasoning features](https://docs.cohere.com/docs/reasoning).\n","properties":{"token_budget":{"description":"The maximum number of tokens the model can use for thinking, which must be set to a positive integer.\nThe model will stop thinking if it reaches the thinking token budget and will proceed with the response.\n","minimum":1,"type":"integer","x-fern-audiences":["public"]},"type":{"description":"Reasoning is enabled by default for models that support it, but can be turned off by setting `\"type\": \"disabled\"`.\n","enum":["enabled","disabled"],"type":"string","x-fern-audiences":["public"]}},"required":["type"],"type":"object","x-fern-audiences":["public"]},"Tool":{"properties":{"description":{"description":"The description of what the tool does, the model uses the description to choose when and how to call the function.\n","type":"string"},"name":{"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.\n","type":"string"},"parameter_definitions":{"additionalProperties":{"properties":{"description":{"description":"The description of the parameter.\n","type":"string"},"required":{"default":false,"description":"Denotes whether the parameter is always present (required) or not. Defaults to not required.\n","type":"boolean"},"type":{"description":"The type of the parameter. Must be a valid Python type.\n","type":"string"}},"required":["type"],"type":"object","x-fern-type-name":"ToolParameterDefinitionsValue"},"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.\n```\n{\n  \"my_param\": {\n    \"description\": <string>,\n    \"type\": <string>, // any python data type, such as 'str', 'bool'\n    \"required\": <boolean>\n  }\n}\n```\n","type":"object","x-fern-type-name":"Tool-luhdwe"}},"required":["description","name"],"type":"object","x-fern-type-name":"Tool"},"ToolCall":{"description":"Contains the tool calls generated by the model. Use it to invoke your tools.\n","properties":{"name":{"description":"Name of the tool to call.","type":"string","x-fern-audiences":["public"]},"parameters":{"additionalProperties":true,"description":"The name and value of the parameters to use when invoking a tool.","type":"object","x-fern-audiences":["public"],"x-fern-type-name":"ToolCall-iovxf2"}},"required":["name","parameters"],"type":"object","x-fern-type-name":"ToolCall"},"ToolCallDelta":{"description":"Contains the chunk of the tool call generation in the stream.\n","properties":{"index":{"description":"Index of the tool call generated\n","type":"number","x-fern-audiences":["public"]},"name":{"description":"Name of the tool call\n","type":"string","x-fern-audiences":["public"]},"parameters":{"description":"Chunk of the tool parameters\n","type":"string","x-fern-audiences":["public"]},"text":{"description":"Chunk of the tool plan text\n","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"ToolCallDelta"},"ToolCallV2":{"description":"An array of tool calls to be made.","properties":{"function":{"properties":{"arguments":{"type":"string"},"name":{"type":"string"}},"type":"object","x-fern-type-name":"ToolCallV2Function"},"id":{"type":"string"},"type":{"enum":["function"],"type":"string"}},"required":["id","type"],"type":"object","x-fern-type-name":"ToolCallV2"},"ToolContent":{"description":"A content block which contains information about the content of a tool result","discriminator":{"mapping":{"document":"#/components/schemas/DocumentContent","text":"#/components/schemas/ChatTextContent"},"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/ChatTextContent"},{"$ref":"#/components/schemas/DocumentContent"}],"x-fern-type-name":"ToolContent"},"ToolMessageV2":{"description":"A message with Tool outputs.","properties":{"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"},{"items":{"$ref":"#/components/schemas/ToolContent"},"type":"array"}]},"role":{"enum":["tool"],"type":"string"},"tool_call_id":{"description":"The id of the associated tool call that has provided the given content","type":"string"}},"required":["content","role","tool_call_id"],"title":"Tool Message","type":"object","x-fern-type-name":"ToolMessageV2"},"ToolResult":{"properties":{"call":{"$ref":"#/components/schemas/ToolCall"},"outputs":{"items":{"additionalProperties":true,"type":"object","x-fern-type-name":"ToolResult-68w0tx"},"minItems":0,"type":"array"}},"required":["call","outputs"],"type":"object","x-fern-type-name":"ToolResult"},"ToolV2":{"properties":{"function":{"description":"The function to be executed.","properties":{"description":{"description":"The description of the function.","type":"string"},"name":{"description":"The name of the function.","type":"string"},"parameters":{"description":"The parameters of the function as a JSON schema.","type":"object","x-fern-type-name":"ToolV2-6eoehf"}},"required":["name","parameters"],"type":"object","x-fern-type-name":"ToolV2Function"},"type":{"enum":["function"],"type":"string"}},"required":["type"],"type":"object","x-fern-type-name":"ToolV2"},"TrainingStepMetrics":{"deprecated":true,"description":"The evaluation metrics at a given step of the training of a fine-tuned model.","properties":{"created_at":{"description":"Creation timestamp.","format":"date-time","type":"string"},"metrics":{"additionalProperties":{"format":"double","type":"number"},"description":"Map of names and values for each evaluation metrics.","type":"object"},"step_number":{"description":"Step number.","format":"int32","type":"integer"}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"UpdateConnectorRequest":{"properties":{"active":{"default":true,"type":"boolean","x-fern-audiences":["public"]},"continue_on_failure":{"default":false,"type":"boolean","x-fern-audiences":["public"]},"excludes":{"description":"A list of fields to exclude from the prompt (fields remain in the document).","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"name":{"description":"A human-readable name for the connector.","type":"string","x-fern-audiences":["public"]},"oauth":{"$ref":"#/components/schemas/CreateConnectorOAuth","description":"The OAuth 2.0 configuration for the connector. Cannot be specified if service_auth is specified.","x-fern-audiences":["public"]},"service_auth":{"$ref":"#/components/schemas/CreateConnectorServiceAuth","description":"The service to service authentication configuration for the connector. Cannot be specified if oauth is specified.","x-fern-audiences":["public"]},"url":{"description":"The URL of the connector that will be used to search for documents.","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-type-name":"UpdateConnectorRequest"},"UpdateConnectorResponse":{"properties":{"connector":{"$ref":"#/components/schemas/Connector"}},"required":["connector"],"type":"object","x-fern-type-name":"UpdateConnectorResponse"},"UpdateFinetunedModelResponse":{"deprecated":true,"description":"Response to a request to update a fine-tuned model.","properties":{"finetuned_model":{"$ref":"#/components/schemas/FinetunedModel","description":"Information about the fine-tuned model."}},"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]},"Usage":{"properties":{"billed_units":{"properties":{"classifications":{"description":"The number of billed classifications units.\n","type":"number"},"input_tokens":{"description":"The number of billed input tokens.\n","type":"number"},"output_tokens":{"description":"The number of billed output tokens.\n","type":"number"},"search_units":{"description":"The number of billed search units.\n","type":"number"}},"type":"object","x-fern-type-name":"UsageBilledUnits"},"cached_tokens":{"description":"The number of prompt tokens that hit the inference cache.\n","type":"number"},"tokens":{"properties":{"input_tokens":{"description":"The number of tokens used as input to the model.\n","type":"number"},"output_tokens":{"description":"The number of tokens produced by the model.\n","type":"number"}},"type":"object","x-fern-type-name":"UsageTokens"}},"type":"object","x-fern-type-name":"Usage"},"UserMessageV2":{"description":"A message from the user.","properties":{"content":{"description":"The content of the message. This can be a string or a list of content blocks.\nIf a string is provided, it will be treated as a text content block.\n","oneOf":[{"type":"string"},{"items":{"$ref":"#/components/schemas/Content"},"type":"array"}]},"role":{"enum":["user"],"type":"string"}},"required":["content","role"],"title":"User Message","type":"object","x-fern-type-name":"UserMessageV2"},"WandbConfig":{"deprecated":true,"description":"The Weights & Biases configuration.","properties":{"api_key":{"description":"The WandB API key to be used during training.","type":"string"},"entity":{"description":"The WandB entity name to be used during training.","type":"string"},"project":{"description":"The WandB project name to be used during training.","type":"string"}},"required":["api_key","project"],"type":"object","x-fern-sdk-group-name":["finetuning","finetuning"]}},"securitySchemes":{"bearerAuth":{"scheme":"bearer","type":"http","x-fern-audiences":["public"],"x-fern-bearer":{"env":"CO_API_KEY"}}}},"info":{"contact":{"email":"team@cohere.com","name":"Cohere Developers","url":"https://cohere.com/"},"description":"The Cohere API for interacting with Chat, Embed and Rerank models.","license":{"name":"proprietary","url":"https://cohere.com/terms-of-use"},"summary":"Cohere's API","termsOfService":"https://cohere.com/terms-of-use","title":"API Reference","version":"1.0"},"openapi":"3.1.0","paths":{"/v1/chat":{"post":{"description":"Generates a text response to a user message.\nTo learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).\n","operationId":"chat","parameters":[{"$ref":"#/components/parameters/RequestSource"},{"description":"Pass text/event-stream to receive the streamed response as server-sent events. The default is `\\n` delimited events.\n","example":"text/event-stream","in":"header","name":"Accepts","required":false,"schema":{"enum":["text/event-stream"],"type":"string"},"x-fern-audiences":["public"]}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"chat_history":{"description":"A list of previous messages between the user and the model, giving the model conversational context for responding to the user's `message`.\n\nEach 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.\n\nThe 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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","items":{"$ref":"#/components/schemas/Message"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"citation_quality":{"description":"Defaults to `\"enabled\"`.\nCitations are enabled by default for models that support it, but can be turned off by setting `\"type\": \"disabled\"`.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","enum":["ENABLED","DISABLED","FAST","ACCURATE","OFF"],"type":"string","x-fern-audiences":["public"]},"connectors":{"deprecated":true,"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.\n\nWhen specified, the model's reply will be enriched with information found by querying each of the connectors (RAG).\n\nCompatible Deployments: Cohere Platform\n","items":{"$ref":"#/components/schemas/ChatConnector"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"conversation_id":{"description":"An alternative to `chat_history`.\n\nProviding a `conversation_id` creates or resumes a persisted conversation with the specified ID. The ID can be any non empty string.\n\nCompatible Deployments: Cohere Platform\n","type":"string","x-fern-audiences":["public"]},"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.\n\nExample:\n```\n[\n  { \"title\": \"Tall penguins\", \"text\": \"Emperor penguins are the tallest.\" },\n  { \"title\": \"Penguin habitats\", \"text\": \"Emperor penguins only live in Antarctica.\" },\n]\n```\n\nKeys 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.\n\nSome 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.\n\nAn `id` field (string) can be optionally supplied to identify the document in the citations. This field will not be passed to the model.\n\nAn `_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.\n\nSee ['Document Mode'](https://docs.cohere.com/docs/retrieval-augmented-generation-rag#document-mode) in the guide for more information.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","items":{"$ref":"#/components/schemas/ChatDocument"},"type":"array","x-fern-audiences":["public"]},"force_single_step":{"description":"Forces the chat to be single step. Defaults to `false`.","type":"boolean","x-fern-audiences":["public"]},"frequency_penalty":{"description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nUsed 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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"number","writeOnly":true,"x-fern-audiences":["public"]},"k":{"default":0,"description":"Ensures only the top `k` most likely tokens are considered for generation at each step.\nDefaults to `0`, min value of `0`, max value of `500`.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","maximum":500,"minimum":0,"type":"integer","writeOnly":true,"x-fern-audiences":["public"]},"max_input_tokens":{"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.\n\nInput will be truncated according to the `prompt_truncation` parameter.\n\nCompatible Deployments: Cohere Platform\n","type":"integer","writeOnly":true,"x-fern-audiences":["public"]},"max_tokens":{"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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"integer","writeOnly":true,"x-fern-audiences":["public"]},"message":{"description":"Text input for the model to respond to.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"string","x-fern-audiences":["public"]},"model":{"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.\n\nCompatible Deployments: Cohere Platform, Private Deployments\n","type":"string","x-fern-audiences":["public"]},"p":{"default":0.75,"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`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","maximum":0.99,"minimum":0.01,"type":"number","writeOnly":true,"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.\n\nThe `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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"string","x-fern-audiences":["public"]},"presence_penalty":{"description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nUsed 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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"number","writeOnly":true,"x-fern-audiences":["public"]},"prompt_truncation":{"description":"Defaults to `AUTO` when `connectors` are specified and `OFF` in all other cases.\n\nDictates how the prompt will be constructed.\n\nWith `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.\n\nWith `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.\n\nWith `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.\n\nCompatible Deployments:\n - AUTO: Cohere Platform Only\n - AUTO_PRESERVE_ORDER: Azure, AWS Sagemaker/Bedrock, Private Deployments\n","enum":["OFF","AUTO","AUTO_PRESERVE_ORDER"],"type":"string","x-fern-audiences":["public"]},"raw_prompting":{"description":"When enabled, the user's prompt will be sent to the model without\nany pre-processing.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"boolean","x-fern-audiences":["sdk-only"]},"response_format":{"$ref":"#/components/schemas/ResponseFormat","x-fern-audiences":["public"]},"safety_mode":{"description":"Used to select the [safety instruction](https://docs.cohere.com/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.\nWhen `NONE` is specified, the safety instruction will be omitted.\n\nSafety modes are not yet configurable in combination with `tools`, `tool_results` and `documents` parameters.\n\n**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).\n\n**Note**: `command-r7b-12-2024` and newer models only support `\"CONTEXTUAL\"` and `\"STRICT\"` modes.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","enum":["CONTEXTUAL","STRICT","NONE"],"x-fern-audiences":["public"],"x-fern-availability":"beta"},"search_queries_only":{"deprecated":true,"description":"Defaults to `false`.\n\nWhen `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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"boolean","x-fern-audiences":["public"]},"seed":{"description":"If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","maximum":{"$doctorine.bigint":"18446744073709552000"},"minimum":0,"type":"integer","x-fern-audiences":["public"]},"stop_sequences":{"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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","items":{"type":"string"},"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"stream":{"description":"Defaults to `false`.\n\nWhen `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\"`.\n\nStreaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","type":"boolean","x-fern-audiences":["public"]},"temperature":{"description":"Defaults to `0.3`.\n\nA non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.\n\nRandomness can be further maximized by increasing the  value of the `p` parameter.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","format":"float","maximum":1,"minimum":0,"type":"number","x-fern-audiences":["public"]},"tool_results":{"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.\nEach tool_result contains information about how it was invoked, as well as a list of outputs in the form of dictionaries.\n\n**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.\n```\ntool_results = [\n  {\n    \"call\": {\n      \"name\": <tool name>,\n      \"parameters\": {\n        <param name>: <param value>\n      }\n    },\n    \"outputs\": [{\n      <key>: <value>\n    }]\n  },\n  ...\n]\n```\n**Note**: Chat calls with `tool_results` should not be included in the Chat history to avoid duplication of the message text.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","items":{"$ref":"#/components/schemas/ToolResult"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"tools":{"description":"A list of available tools (functions) that the model may suggest invoking before producing a text response.\n\nWhen `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.\n\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","items":{"$ref":"#/components/schemas/Tool"},"minItems":0,"type":"array","x-fern-audiences":["public"]}},"required":["message"],"type":"object","x-examples":{"Chat":{"value":{"chat_history":[{"message":"Hi!","role":"User"},{"message":"How can I help you today?","role":"Chatbot"}],"message":"Can you give me a global market overview of solar panels?","prompt_truncation":"OFF","stream":false,"temperature":0.3}}},"x-fern-audiences":["public"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NonStreamedChatResponse"},{"$ref":"#/components/schemas/StreamedChatResponse"}]}}},"description":"OK"},"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"}},"summary":"Chat API (v1)","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/chat\");\nrequest.Content = new StringContent(\"{\\\"chat_history\\\":[{\\\"message\\\":\\\"string\\\",\\\"role\\\":\\\"CHATBOT\\\",\\\"tool_calls\\\":[{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}}]}],\\\"citation_quality\\\":\\\"ACCURATE\\\",\\\"connectors\\\":[{\\\"continue_on_failure\\\":true,\\\"id\\\":\\\"string\\\",\\\"options\\\":{},\\\"user_access_token\\\":\\\"string\\\"}],\\\"conversation_id\\\":\\\"string\\\",\\\"documents\\\":[{\\\"id\\\":\\\"string\\\"}],\\\"force_single_step\\\":true,\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_input_tokens\\\":0,\\\"max_tokens\\\":0,\\\"message\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"preamble\\\":\\\"string\\\",\\\"presence_penalty\\\":0,\\\"prompt_truncation\\\":\\\"AUTO\\\",\\\"raw_prompting\\\":true,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"search_queries_only\\\":true,\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"tool_results\\\":[{\\\"call\\\":{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}},\\\"outputs\\\":[{\\\"additionalProp1\\\":null}]}],\\\"tools\\\":[{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameter_definitions\\\":{\\\"additionalProp1\\\":{\\\"description\\\":\\\"string\\\",\\\"required\\\":false,\\\"type\\\":\\\"string\\\"}}}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/chat' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"chat_history\":[{\"message\":\"string\",\"role\":\"CHATBOT\",\"tool_calls\":[{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}}]}],\"citation_quality\":\"ACCURATE\",\"connectors\":[{\"continue_on_failure\":true,\"id\":\"string\",\"options\":{},\"user_access_token\":\"string\"}],\"conversation_id\":\"string\",\"documents\":[{\"id\":\"string\"}],\"force_single_step\":true,\"frequency_penalty\":0,\"k\":0,\"max_input_tokens\":0,\"max_tokens\":0,\"message\":\"string\",\"model\":\"string\",\"p\":0.75,\"preamble\":\"string\",\"presence_penalty\":0,\"prompt_truncation\":\"AUTO\",\"raw_prompting\":true,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"search_queries_only\":true,\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"tool_results\":[{\"call\":{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}},\"outputs\":[{\"additionalProp1\":null}]}],\"tools\":[{\"description\":\"string\",\"name\":\"string\",\"parameter_definitions\":{\"additionalProp1\":{\"description\":\"string\",\"required\":false,\"type\":\"string\"}}}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"chat_history\":[{\"message\":\"string\",\"role\":\"CHATBOT\",\"tool_calls\":[{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}}]}],\"citation_quality\":\"ACCURATE\",\"connectors\":[{\"continue_on_failure\":true,\"id\":\"string\",\"options\":{},\"user_access_token\":\"string\"}],\"conversation_id\":\"string\",\"documents\":[{\"id\":\"string\"}],\"force_single_step\":true,\"frequency_penalty\":0,\"k\":0,\"max_input_tokens\":0,\"max_tokens\":0,\"message\":\"string\",\"model\":\"string\",\"p\":0.75,\"preamble\":\"string\",\"presence_penalty\":0,\"prompt_truncation\":\"AUTO\",\"raw_prompting\":true,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"search_queries_only\":true,\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"tool_results\":[{\"call\":{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}},\"outputs\":[{\"additionalProp1\":null}]}],\"tools\":[{\"description\":\"string\",\"name\":\"string\",\"parameter_definitions\":{\"additionalProp1\":{\"description\":\"string\",\"required\":false,\"type\":\"string\"}}}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/chat\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/chat\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"chat_history\\\":[{\\\"message\\\":\\\"string\\\",\\\"role\\\":\\\"CHATBOT\\\",\\\"tool_calls\\\":[{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}}]}],\\\"citation_quality\\\":\\\"ACCURATE\\\",\\\"connectors\\\":[{\\\"continue_on_failure\\\":true,\\\"id\\\":\\\"string\\\",\\\"options\\\":{},\\\"user_access_token\\\":\\\"string\\\"}],\\\"conversation_id\\\":\\\"string\\\",\\\"documents\\\":[{\\\"id\\\":\\\"string\\\"}],\\\"force_single_step\\\":true,\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_input_tokens\\\":0,\\\"max_tokens\\\":0,\\\"message\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"preamble\\\":\\\"string\\\",\\\"presence_penalty\\\":0,\\\"prompt_truncation\\\":\\\"AUTO\\\",\\\"raw_prompting\\\":true,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"search_queries_only\\\":true,\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"tool_results\\\":[{\\\"call\\\":{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}},\\\"outputs\\\":[{\\\"additionalProp1\\\":null}]}],\\\"tools\\\":[{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameter_definitions\\\":{\\\"additionalProp1\\\":{\\\"description\\\":\\\"string\\\",\\\"required\\\":false,\\\"type\\\":\\\"string\\\"}}}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/chat', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"chat_history\":[{\"message\":\"string\",\"role\":\"CHATBOT\",\"tool_calls\":[{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}}]}],\"citation_quality\":\"ACCURATE\",\"connectors\":[{\"continue_on_failure\":true,\"id\":\"string\",\"options\":{},\"user_access_token\":\"string\"}],\"conversation_id\":\"string\",\"documents\":[{\"id\":\"string\"}],\"force_single_step\":true,\"frequency_penalty\":0,\"k\":0,\"max_input_tokens\":0,\"max_tokens\":0,\"message\":\"string\",\"model\":\"string\",\"p\":0.75,\"preamble\":\"string\",\"presence_penalty\":0,\"prompt_truncation\":\"AUTO\",\"raw_prompting\":true,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"search_queries_only\":true,\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"tool_results\":[{\"call\":{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}},\"outputs\":[{\"additionalProp1\":null}]}],\"tools\":[{\"description\":\"string\",\"name\":\"string\",\"parameter_definitions\":{\"additionalProp1\":{\"description\":\"string\",\"required\":false,\"type\":\"string\"}}}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/chat', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"chat_history\\\":[{\\\"message\\\":\\\"string\\\",\\\"role\\\":\\\"CHATBOT\\\",\\\"tool_calls\\\":[{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}}]}],\\\"citation_quality\\\":\\\"ACCURATE\\\",\\\"connectors\\\":[{\\\"continue_on_failure\\\":true,\\\"id\\\":\\\"string\\\",\\\"options\\\":{},\\\"user_access_token\\\":\\\"string\\\"}],\\\"conversation_id\\\":\\\"string\\\",\\\"documents\\\":[{\\\"id\\\":\\\"string\\\"}],\\\"force_single_step\\\":true,\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_input_tokens\\\":0,\\\"max_tokens\\\":0,\\\"message\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"preamble\\\":\\\"string\\\",\\\"presence_penalty\\\":0,\\\"prompt_truncation\\\":\\\"AUTO\\\",\\\"raw_prompting\\\":true,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"search_queries_only\\\":true,\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"tool_results\\\":[{\\\"call\\\":{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}},\\\"outputs\\\":[{\\\"additionalProp1\\\":null}]}],\\\"tools\\\":[{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameter_definitions\\\":{\\\"additionalProp1\\\":{\\\"description\\\":\\\"string\\\",\\\"required\\\":false,\\\"type\\\":\\\"string\\\"}}}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/chat\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"chat_history\\\":[{\\\"message\\\":\\\"string\\\",\\\"role\\\":\\\"CHATBOT\\\",\\\"tool_calls\\\":[{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}}]}],\\\"citation_quality\\\":\\\"ACCURATE\\\",\\\"connectors\\\":[{\\\"continue_on_failure\\\":true,\\\"id\\\":\\\"string\\\",\\\"options\\\":{},\\\"user_access_token\\\":\\\"string\\\"}],\\\"conversation_id\\\":\\\"string\\\",\\\"documents\\\":[{\\\"id\\\":\\\"string\\\"}],\\\"force_single_step\\\":true,\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_input_tokens\\\":0,\\\"max_tokens\\\":0,\\\"message\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"preamble\\\":\\\"string\\\",\\\"presence_penalty\\\":0,\\\"prompt_truncation\\\":\\\"AUTO\\\",\\\"raw_prompting\\\":true,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"search_queries_only\\\":true,\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"tool_results\\\":[{\\\"call\\\":{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}},\\\"outputs\\\":[{\\\"additionalProp1\\\":null}]}],\\\"tools\\\":[{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameter_definitions\\\":{\\\"additionalProp1\\\":{\\\"description\\\":\\\"string\\\",\\\"required\\\":false,\\\"type\\\":\\\"string\\\"}}}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/chat\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"chat_history\":[{\"message\":\"string\",\"role\":\"CHATBOT\",\"tool_calls\":[{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}}]}],\"citation_quality\":\"ACCURATE\",\"connectors\":[{\"continue_on_failure\":true,\"id\":\"string\",\"options\":{},\"user_access_token\":\"string\"}],\"conversation_id\":\"string\",\"documents\":[{\"id\":\"string\"}],\"force_single_step\":true,\"frequency_penalty\":0,\"k\":0,\"max_input_tokens\":0,\"max_tokens\":0,\"message\":\"string\",\"model\":\"string\",\"p\":0.75,\"preamble\":\"string\",\"presence_penalty\":0,\"prompt_truncation\":\"AUTO\",\"raw_prompting\":true,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"search_queries_only\":true,\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"tool_results\":[{\"call\":{\"name\":\"string\",\"parameters\":{\"additionalProp1\":null}},\"outputs\":[{\"additionalProp1\":null}]}],\"tools\":[{\"description\":\"string\",\"name\":\"string\",\"parameter_definitions\":{\"additionalProp1\":{\"description\":\"string\",\"required\":false,\"type\":\"string\"}}}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/chat\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"chat_history\\\":[{\\\"message\\\":\\\"string\\\",\\\"role\\\":\\\"CHATBOT\\\",\\\"tool_calls\\\":[{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}}]}],\\\"citation_quality\\\":\\\"ACCURATE\\\",\\\"connectors\\\":[{\\\"continue_on_failure\\\":true,\\\"id\\\":\\\"string\\\",\\\"options\\\":{},\\\"user_access_token\\\":\\\"string\\\"}],\\\"conversation_id\\\":\\\"string\\\",\\\"documents\\\":[{\\\"id\\\":\\\"string\\\"}],\\\"force_single_step\\\":true,\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_input_tokens\\\":0,\\\"max_tokens\\\":0,\\\"message\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"preamble\\\":\\\"string\\\",\\\"presence_penalty\\\":0,\\\"prompt_truncation\\\":\\\"AUTO\\\",\\\"raw_prompting\\\":true,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"search_queries_only\\\":true,\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"tool_results\\\":[{\\\"call\\\":{\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{\\\"additionalProp1\\\":null}},\\\"outputs\\\":[{\\\"additionalProp1\\\":null}]}],\\\"tools\\\":[{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameter_definitions\\\":{\\\"additionalProp1\\\":{\\\"description\\\":\\\"string\\\",\\\"required\\\":false,\\\"type\\\":\\\"string\\\"}}}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatRequest{\n\t\t\tModel:   cohere.String(\"command-a-03-2025\"),\n\t\t\tMessage: \"Tell me about LLMs\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Default","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const response = await cohere.chat({\n    model: 'command-a-03-2025',\n    message: 'Tell me about LLMs',\n  });\n\n  console.log(response);\n})();\n","name":"Default","sdk":"typescript"},{"code":"/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatRequest;\nimport com.cohere.api.types.ChatMessage;\nimport com.cohere.api.types.Message;\nimport com.cohere.api.types.NonStreamedChatResponse;\nimport java.util.List;\n\npublic class Default {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    NonStreamedChatResponse response =\n        cohere.chat(\n            ChatRequest.builder()\n                .model(\"command-a-03-2025\")\n                .message(\"Tell me about LLMs\")\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Default","sdk":"java"},{"code":"import cohere\n\nco = cohere.Client()\n\nresponse = co.chat(\n    model=\"command-a-03-2025\",\n    message=\"Tell me about LLMs\",\n)\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    return await co.chat(\n        model=\"command-a-03-2025\",\n        message=\"Tell me about LLMs\"\n    )\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-03-2025\",\n    \"message\": \"Tell me about LLMs\"\n  }'\n","name":"Default","sdk":"curl"}],"request":{"message":"Tell me about LLMs","model":"command-a-03-2025","stream":false},"response":{"body":{"chat_history":[{"message":"Tell me about LLMs","role":"USER"},{"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.\n\nKey characteristics of LLMs include:\n\n1. **Scale**: They're trained on billions or trillions of parameters, making them capable of understanding complex patterns in language.\n\n2. **Versatility**: LLMs can perform various tasks like translation, summarization, question answering, and creative writing without being explicitly programmed for each task.\n\n3. **Context Understanding**: They can maintain context over long conversations and generate coherent, contextually relevant responses.\n\n4. **Few-shot Learning**: LLMs can often perform new tasks with just a few examples, adapting to new scenarios quickly.\n\nPopular 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.","role":"CHATBOT"}],"finish_reason":"COMPLETE","generation_id":"f47ac10b-58cc-4372-a567-0e02b2c3d479","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":5,"output_tokens":198},"tokens":{"input_tokens":71,"output_tokens":198}},"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.\n\nKey characteristics of LLMs include:\n\n1. **Scale**: They're trained on billions or trillions of parameters, making them capable of understanding complex patterns in language.\n\n2. **Versatility**: LLMs can perform various tasks like translation, summarization, question answering, and creative writing without being explicitly programmed for each task.\n\n3. **Context Understanding**: They can maintain context over long conversations and generate coherent, contextually relevant responses.\n\n4. **Few-shot Learning**: LLMs can often perform new tasks with just a few examples, adapting to new scenarios quickly.\n\nPopular 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."}}},{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatStreamRequest{\n\t\t\tModel:   cohere.String(\"command-a-03-2025\"),\n\t\t\tMessage: \"Tell me about LLMs\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.TextGeneration != nil {\n\t\t\tlog.Printf(\"%+v\", resp)\n\t\t}\n\t}\n\n}\n","name":"Documents","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const response = await cohere.chat({\n    model: 'command-a-03-2025',\n    message: 'Who is more popular: Nsync or Backstreet Boys?',\n    documents: [\n      {\n        title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n        snippet:\n          '↓ 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.',\n      },\n      {\n        title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n        snippet:\n          \"↓ 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.\",\n      },\n      {\n        title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n        snippet:\n          ' 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.',\n      },\n      {\n        title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n        snippet:\n          ' 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.',\n      },\n    ],\n  });\n\n  console.log(response);\n})();\n","name":"Documents","sdk":"typescript"},{"code":"/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatRequest;\nimport com.cohere.api.types.NonStreamedChatResponse;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Documents {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    NonStreamedChatResponse response =\n        cohere.chat(\n            ChatRequest.builder()\n                .model(\"command-a-03-2025\")\n                .message(\"What year was he born?\")\n                .documents(\n                    List.of(\n                        Map.of(\n                            \"title\",\n                                \"CSPC: Backstreet Boys Popularity\" + \" Analysis - ChartMasters\",\n                            \"snippet\",\n                                \"↓ Skip to Main Content\\n\\n\"\n                                    + \"Music industry – One step\"\n                                    + \" closer to being\"\n                                    + \" accurate\\n\\n\"\n                                    + \"CSPC: Backstreet Boys\"\n                                    + \" Popularity Analysis\\n\\n\"\n                                    + \"Hernán Lopez Posted on\"\n                                    + \" February 9, 2017 Posted in\"\n                                    + \" CSPC 72 Comments Tagged\"\n                                    + \" with Backstreet Boys, Boy\"\n                                    + \" band\\n\\n\"\n                                    + \"At one point, Backstreet\"\n                                    + \" Boys defined success:\"\n                                    + \" massive albums sales across\"\n                                    + \" the globe, great singles\"\n                                    + \" sales, plenty of chart\"\n                                    + \" topping releases, hugely\"\n                                    + \" hyped tours and tremendous\"\n                                    + \" media coverage.\\n\\n\"\n                                    + \"It is true that they\"\n                                    + \" benefited from\"\n                                    + \" extraordinarily good market\"\n                                    + \" conditions in all markets.\"\n                                    + \" After all, the all-time\"\n                                    + \" record year for the music\"\n                                    + \" business, as far as\"\n                                    + \" revenues in billion dollars\"\n                                    + \" are concerned, was actually\"\n                                    + \" 1999. That is, back when\"\n                                    + \" this five men group was at\"\n                                    + \" its peak.\"),\n                        Map.of(\n                            \"title\", \"CSPC: NSYNC Popularity Analysis -\" + \" ChartMasters\",\n                            \"snippet\",\n                                \"↓ Skip to Main Content\\n\\n\"\n                                    + \"Music industry – One step\"\n                                    + \" closer to being\"\n                                    + \" accurate\\n\\n\"\n                                    + \"CSPC: NSYNC Popularity\"\n                                    + \" Analysis\\n\\n\"\n                                    + \"MJD Posted on February 9,\"\n                                    + \" 2018 Posted in CSPC 27\"\n                                    + \" Comments Tagged with Boy\"\n                                    + \" band, N'Sync\\n\\n\"\n                                    + \"At the turn of the\"\n                                    + \" millennium three teen acts\"\n                                    + \" were huge in the US, the\"\n                                    + \" Backstreet Boys, Britney\"\n                                    + \" Spears and NSYNC. The\"\n                                    + \" latter is the only one we\"\n                                    + \" haven’t study so far. It\"\n                                    + \" took 15 years and Adele to\"\n                                    + \" break their record of 2,4\"\n                                    + \" million units sold of No\"\n                                    + \" Strings Attached in its\"\n                                    + \" first week alone.\\n\\n\"\n                                    + \"It wasn’t a fluke, as the\"\n                                    + \" second fastest selling\"\n                                    + \" album of the Soundscan era\"\n                                    + \" prior 2015, was also theirs\"\n                                    + \" since Celebrity debuted\"\n                                    + \" with 1,88 million units\"\n                                    + \" sold.\"),\n                        Map.of(\n                            \"title\",\n                                \"CSPC: Backstreet Boys Popularity\" + \" Analysis - ChartMasters\",\n                            \"snippet\",\n                                \" 1997, 1998, 2000 and 2001 also\"\n                                    + \" rank amongst some of the\"\n                                    + \" very best years.\\n\\n\"\n                                    + \"Yet the way many music\"\n                                    + \" consumers – especially\"\n                                    + \" teenagers and young women’s\"\n                                    + \" – embraced their output\"\n                                    + \" deserves its own chapter.\"\n                                    + \" If Jonas Brothers and more\"\n                                    + \" recently One Direction\"\n                                    + \" reached a great level of\"\n                                    + \" popularity during the past\"\n                                    + \" decade, the type of success\"\n                                    + \" achieved by Backstreet Boys\"\n                                    + \" is in a completely\"\n                                    + \" different level as they\"\n                                    + \" really dominated the\"\n                                    + \" business for a few years\"\n                                    + \" all over the world,\"\n                                    + \" including in some countries\"\n                                    + \" that were traditionally\"\n                                    + \" hard to penetrate for\"\n                                    + \" Western artists.\\n\\n\"\n                                    + \"We will try to analyze the\"\n                                    + \" extent of that hegemony\"\n                                    + \" with this new article with\"\n                                    + \" final results which will\"\n                                    + \" more than surprise many\"\n                                    + \" readers.\"),\n                        Map.of(\n                            \"title\",\n                            \"CSPC: NSYNC Popularity Analysis -\" + \" ChartMasters\",\n                            \"snippet\",\n                            \" Was the teen group led by Justin\"\n                                + \" Timberlake really that big? Was it\"\n                                + \" only in the US where they found\"\n                                + \" success? Or were they a global\"\n                                + \" phenomenon?\\n\\n\"\n                                + \"As usual, I’ll be using the\"\n                                + \" Commensurate Sales to Popularity\"\n                                + \" Concept in order to relevantly\"\n                                + \" gauge their results. This concept\"\n                                + \" will not only bring you sales\"\n                                + \" information for all NSYNC‘s albums,\"\n                                + \" physical and download singles, as\"\n                                + \" well as audio and video streaming,\"\n                                + \" but it will also determine their\"\n                                + \" true popularity. If you are not yet\"\n                                + \" familiar with the CSPC method, the\"\n                                + \" next page explains it with a short\"\n                                + \" video. I fully recommend watching\"\n                                + \" the video before getting into the\"\n                                + \" sales figures.\")))\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Documents","sdk":"java"},{"code":"import cohere\n\nco = cohere.Client()\n\nresponse = co.chat(\n    model=\"command-a-03-2025\",\n    message=\"Who is more popular: Nsync or Backstreet Boys?\",\n    documents=[\n        {\n            \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n            \"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.\",\n        },\n        {\n            \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n            \"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.\",\n        },\n        {\n            \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n            \"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.\",\n        },\n        {\n            \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n            \"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.\",\n        },\n    ],\n)\n\nprint(response)\n","name":"Documents","sdk":"python"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-03-2025\",\n    \"message\": \"Who is more popular: Nsync or Backstreet Boys?\",\n    \"documents\": [\n      {\n        \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n        \"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.\"\n      },\n      {\n        \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n        \"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.\"\n      },\n      {\n        \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n        \"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.\"\n      },\n      {\n        \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n        \"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.\"\n      }\n    ]\n  }'\n","name":"Documents","sdk":"curl"}],"request":{"documents":[{"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: Backstreet Boys 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: NSYNC Popularity Analysis - ChartMasters"},{"snippet":"1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\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: Backstreet Boys 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?\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.","title":"CSPC: NSYNC Popularity Analysis - ChartMasters"}],"message":"Who is more popular: Nsync or Backstreet Boys?","model":"command-a-03-2025","stream":false},"response":{"body":{"chat_history":[{"message":"Who is more popular: Nsync or Backstreet Boys?","role":"USER"},{"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.\n\nWhile 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.","role":"CHATBOT"}],"citations":[{"document_ids":["doc_1"],"end":84,"start":36,"text":"extremely popular at the turn of the millennium."},{"document_ids":["doc_0"],"end":141,"start":105,"text":"massive album sales across the globe"},{"document_ids":["doc_0"],"end":162,"start":143,"text":"great singles sales"},{"document_ids":["doc_0"],"end":196,"start":164,"text":"plenty of chart-topping releases"},{"document_ids":["doc_0"],"end":209,"start":198,"text":"hyped tours"},{"document_ids":["doc_0"],"end":241,"start":215,"text":"tremendous media coverage."},{"document_ids":["doc_1"],"end":350,"start":280,"text":"album No Strings Attached selling 2.4 million units in its first week."},{"document_ids":["doc_1"],"end":430,"start":369,"text":"second fastest-selling album of the Soundscan era before 2015"},{"document_ids":["doc_1"],"end":483,"start":437,"text":"Celebrity debuting at 1.88 million units sold."},{"document_ids":["doc_2"],"end":677,"start":589,"text":"success in some countries that were traditionally hard to penetrate for Western artists."}],"documents":[{"id":"doc_1","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: NSYNC Popularity Analysis - ChartMasters"},{"id":"doc_0","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: Backstreet Boys Popularity Analysis - ChartMasters"},{"id":"doc_2","snippet":"1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\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: Backstreet Boys Popularity Analysis - ChartMasters"}],"finish_reason":"COMPLETE","generation_id":"c14c80c3-18eb-4519-9460-6c92edd8cfb4","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":682,"output_tokens":143},"tokens":{"input_tokens":1380,"output_tokens":434}},"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.\n\nWhile 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."}}},{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatStreamRequest{\n\t\t\tModel:   cohere.String(\"command-a-03-2025\"),\n\t\t\tMessage: \"Tell me about LLMs\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.TextGeneration != nil {\n\t\t\tlog.Printf(\"%+v\", resp)\n\t\t}\n\t}\n\n}\n","name":"Streaming","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const chatStream = await cohere.chatStream({\n    model: 'command-a-03-2025',\n    message: 'Tell me about LLMs',\n  });\n\n  for await (const message of chatStream) {\n    if (message.eventType === 'text-generation') {\n      process.stdout.write(message);\n    }\n  }\n})();\n","name":"Streaming","sdk":"typescript"},{"code":"/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatStreamRequest;\nimport com.cohere.api.types.ChatMessage;\nimport com.cohere.api.types.ChatTextGenerationEvent;\nimport com.cohere.api.types.Message;\nimport com.cohere.api.types.StreamedChatResponse;\nimport java.util.List;\n\npublic class Stream {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    Iterable<StreamedChatResponse> response =\n        cohere.chatStream(\n            ChatStreamRequest.builder()\n                .model(\"command-a-03-2025\")\n                .message(\"Tell me about LLMs\")\n                .build());\n\n    for (StreamedChatResponse chatResponse : response) {\n      if (chatResponse.isTextGeneration()) {\n        System.out.println(\n            chatResponse.getTextGeneration().map(ChatTextGenerationEvent::getText).orElse(\"\"));\n      }\n    }\n\n    System.out.println(response);\n  }\n}\n","name":"Streaming","sdk":"java"},{"code":"import cohere\n\nco = cohere.Client()\n\nresponse = co.chat_stream(\n    model=\"command-a-03-2025\",\n    message=\"Tell me about LLMs\",\n)\n\nfor event in response:\n    if event.event_type == \"text-generation\":\n        print(event.text, end=\"\")\n","name":"Streaming","sdk":"python"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-03-2025\",\n    \"stream\": true,\n    \"message\": \"Tell me about LLMs\"\n  }'\n","name":"Streaming","sdk":"curl"}],"request":{"message":"hello!","model":"command-a-03-2025","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","finish_reason":"COMPLETE","response":{"chat_history":[{"message":"hello world!","role":"USER"},{"message":"Hello! How can I help you today?","role":"CHATBOT"}],"finish_reason":"COMPLETE","generation_id":"29f14a5a-11de-4cae-9800-25e4747408ea","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":3,"output_tokens":9},"tokens":{"input_tokens":69,"output_tokens":9}},"text":"Hello! How can I help you today?"}}]}},{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.ChatRequest{\n\t\t\tModel:   cohere.String(\"command-a-03-2025\"),\n\t\t\tMessage: \"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?\",\n\t\t\tTools: []*cohere.Tool{\n\t\t\t\t{\n\t\t\t\t\tName:        \"query_daily_sales_report\",\n\t\t\t\t\tDescription: \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n\t\t\t\t\tParameterDefinitions: map[string]*cohere.ToolParameterDefinitionsValue{\n\t\t\t\t\t\t\"day\": {\n\t\t\t\t\t\t\tDescription: cohere.String(\"Retrieves sales data for this day, formatted as YYYY-MM-DD.\"),\n\t\t\t\t\t\t\tType:        \"str\",\n\t\t\t\t\t\t\tRequired:    cohere.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tName:        \"query_product_catalog\",\n\t\t\t\t\tDescription: \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n\t\t\t\t\tParameterDefinitions: map[string]*cohere.ToolParameterDefinitionsValue{\n\t\t\t\t\t\t\"category\": {\n\t\t\t\t\t\t\tDescription: cohere.String(\"Retrieves product information data for all products in this category.\"),\n\t\t\t\t\t\t\tType:        \"str\",\n\t\t\t\t\t\t\tRequired:    cohere.Bool(true),\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Tools","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const response = await cohere.chat({\n    model: 'command-a-03-2025',\n    message:\n      \"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?\",\n    tools: [\n      {\n        name: 'query_daily_sales_report',\n        description:\n          'Connects to a database to retrieve overall sales volumes and sales information for a given day.',\n        parameterDefinitions: {\n          day: {\n            description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.',\n            type: 'str',\n            required: true,\n          },\n        },\n      },\n      {\n        name: 'query_product_catalog',\n        description:\n          'Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.',\n        parameterDefinitions: {\n          category: {\n            description: 'Retrieves product information data for all products in this category.',\n            type: 'str',\n            required: true,\n          },\n        },\n      },\n    ],\n  });\n\n  console.log(response);\n})();\n","name":"Tools","sdk":"typescript"},{"code":"/* (C)2024 */\npackage chatpost;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ChatRequest;\nimport com.cohere.api.types.NonStreamedChatResponse;\nimport com.cohere.api.types.Tool;\nimport com.cohere.api.types.ToolParameterDefinitionsValue;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Tools {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    NonStreamedChatResponse response =\n        cohere.chat(\n            ChatRequest.builder()\n                .model(\"command-a-03-2025\")\n                .message(\n                    \"Can you provide a sales summary for 29th September 2023,\"\n                        + \" and also give me some details about the products in\"\n                        + \" the 'Electronics' category, for example their\"\n                        + \" prices and stock levels?\")\n                .tools(\n                    List.of(\n                        Tool.builder()\n                            .name(\"query_daily_sales_report\")\n                            .description(\n                                \"Connects to a database to retrieve\"\n                                    + \" overall sales volumes and\"\n                                    + \" sales information for a\"\n                                    + \" given day.\")\n                            .parameterDefinitions(\n                                Map.of(\n                                    \"day\",\n                                    ToolParameterDefinitionsValue.builder()\n                                        .type(\"str\")\n                                        .description(\n                                            \"Retrieves\"\n                                                + \" sales\"\n                                                + \" data\"\n                                                + \" for this\"\n                                                + \" day,\"\n                                                + \" formatted\"\n                                                + \" as YYYY-MM-DD.\")\n                                        .required(true)\n                                        .build()))\n                            .build(),\n                        Tool.builder()\n                            .name(\"query_product_catalog\")\n                            .description(\n                                \"Connects to a a product catalog\"\n                                    + \" with information about all\"\n                                    + \" the products being sold,\"\n                                    + \" including categories,\"\n                                    + \" prices, and stock levels.\")\n                            .parameterDefinitions(\n                                Map.of(\n                                    \"category\",\n                                    ToolParameterDefinitionsValue.builder()\n                                        .type(\"str\")\n                                        .description(\n                                            \"Retrieves\"\n                                                + \" product\"\n                                                + \" information\"\n                                                + \" data\"\n                                                + \" for all\"\n                                                + \" products\"\n                                                + \" in this\"\n                                                + \" category.\")\n                                        .required(true)\n                                        .build()))\n                            .build()))\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Tools","sdk":"java"},{"code":"import cohere\n\nco = cohere.Client()\n\n# tool descriptions that the model has access to\ntools = [\n    {\n        \"name\": \"query_daily_sales_report\",\n        \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n        \"parameter_definitions\": {\n            \"day\": {\n                \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n                \"type\": \"str\",\n                \"required\": True,\n            }\n        },\n    },\n    {\n        \"name\": \"query_product_catalog\",\n        \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n        \"parameter_definitions\": {\n            \"category\": {\n                \"description\": \"Retrieves product information data for all products in this category.\",\n                \"type\": \"str\",\n                \"required\": True,\n            }\n        },\n    },\n]\n\n\n# user request\nmessage = \"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?\"\n\nresponse = co.chat(\n    model=\"command-a-03-2025\",\n    message=message,\n    tools=tools,\n)\n\nprint(response)\n","name":"Tools","sdk":"python"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-03-2025\",\n    \"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?\",\n    \"tools\": [\n      {\n        \"name\": \"query_daily_sales_report\",\n        \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n        \"parameter_definitions\": {\n          \"day\": {\n            \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n            \"type\": \"str\",\n            \"required\": true\n          }\n        }\n      },\n      {\n        \"name\": \"query_product_catalog\",\n        \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n        \"parameter_definitions\": {\n          \"category\": {\n            \"description\": \"Retrieves product information data for all products in this category.\",\n            \"type\": \"str\",\n            \"required\": true\n          }\n        }\n      }\n    ]\n  }'\n","name":"Tools","sdk":"curl"}],"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?","model":"command-a-03-2025","stream":false,"tools":[{"description":"Connects to a database to retrieve overall sales volumes and sales information for a given day.","name":"query_daily_sales_report","parameter_definitions":{"day":{"description":"Retrieves sales data for this day, formatted as YYYY-MM-DD.","required":true,"type":"str"}}},{"description":"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.","name":"query_product_catalog","parameter_definitions":{"category":{"description":"Retrieves product information data for all products in this category.","required":true,"type":"str"}}}]},"response":{"body":{"chat_history":[{"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":"USER"},{"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.","role":"CHATBOT","tool_calls":[{"name":"query_daily_sales_report","parameters":{"day":"2023-09-29"}},{"name":"query_product_catalog","parameters":{"category":"Electronics"}}]}],"finish_reason":"COMPLETE","generation_id":"9e5f00aa-bf1e-481a-abe3-0eceac18c3ec","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":127,"output_tokens":69},"tokens":{"input_tokens":1032,"output_tokens":124}},"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.","tool_calls":[{"name":"query_daily_sales_report","parameters":{"day":"2023-09-29"}},{"name":"query_product_catalog","parameters":{"category":"Electronics"}}]}}}],"x-fern-streaming":{"response":{"properties":{"chat_history":{"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`.\n","items":{"$ref":"#/components/schemas/Message"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"citations":{"description":"Inline citations for the generated reply.","items":{"$ref":"#/components/schemas/ChatCitation"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"documents":{"description":"Documents seen by the model when generating the reply.","items":{"$ref":"#/components/schemas/ChatDocument"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"finish_reason":{"$ref":"#/components/schemas/FinishReason","x-fern-audiences":["public"]},"generation_id":{"description":"Unique identifier for the generated reply. Useful for submitting feedback.","format":"uuid","type":"string","x-fern-audiences":["public"]},"is_search_required":{"description":"Denotes that a search for documents is required during the RAG flow.","type":"boolean","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"response_id":{"description":"Unique identifier for the response.","format":"uuid","type":"string","x-fern-audiences":["public"]},"search_queries":{"description":"Generated search queries, meant to be used as part of the RAG flow.","items":{"$ref":"#/components/schemas/ChatSearchQuery"},"type":"array","x-fern-audiences":["public"]},"search_results":{"description":"Documents retrieved from each of the conducted searches.","items":{"$ref":"#/components/schemas/ChatSearchResult"},"minItems":0,"type":"array","x-fern-audiences":["public"]},"text":{"description":"Contents of the reply generated by the model.","minLength":1,"type":"string","x-fern-audiences":["public"]},"tool_calls":{"items":{"$ref":"#/components/schemas/ToolCall"},"type":"array","x-fern-audiences":["public"]}},"required":["text"],"x-fern-type-name":"NonStreamedChatResponse"},"response-stream":{"description":"StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request).","discriminator":{"mapping":{"citation-generation":"#/components/schemas/ChatCitationGenerationEvent","debug":"#/components/schemas/ChatDebugEvent","search-queries-generation":"#/components/schemas/ChatSearchQueriesGenerationEvent","search-results":"#/components/schemas/ChatSearchResultsEvent","stream-end":"#/components/schemas/ChatStreamEndEvent","stream-start":"#/components/schemas/ChatStreamStartEvent","text-generation":"#/components/schemas/ChatTextGenerationEvent","tool-calls-chunk":"#/components/schemas/ChatToolCallsChunkEvent","tool-calls-generation":"#/components/schemas/ChatToolCallsGenerationEvent"},"propertyName":"event_type"},"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"}],"x-fern-type-name":"StreamedChatResponse"},"stream-condition":"$request.stream","stream-description":"Generates a streamed text response to a user message.\n\nTo learn how to use the Chat API and RAG follow our [Text Generation guides](https://docs.cohere.com/docs/chat-api).\n"}}},"/v1/check-api-key":{"post":{"description":"Checks that the api key in the Authorization header is valid and active\n","operationId":"checkAPIKey","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"organization_id":{"type":"string"},"owner_id":{"type":"string"},"valid":{"type":"boolean"}},"required":["valid"],"type":"object","x-fern-type-name":"CheckApiKeyResponse"}}},"description":"OK"},"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"}},"summary":"Check API key","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/check-api-key\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/check-api-key'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/check-api-key\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/check-api-key\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/check-api-key', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/check-api-key', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/check-api-key\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.cohere.com/v1/check-api-key\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/check-api-key\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"]}},"/v1/classify":{"post":{"deprecated":true,"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.\nNote: [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.","operationId":"classify","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"examples":{"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: \"...\"}`.\nNote: [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.","items":{"$ref":"#/components/schemas/ClassifyExample","x-fern-audiences":["public"]},"maxItems":2500,"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"inputs":{"description":"A list of up to 96 texts to be classified. Each one must be a non-empty string.\nThere 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).\nNote: 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","writeOnly":true,"x-fern-audiences":["public"]},"maxItems":96,"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"model":{"description":"ID of a [Fine-tuned](https://docs.cohere.com/v2/docs/classify-starting-the-training) Classify model","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"preset":{"deprecated":true,"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.","example":"my-preset-a58sbd","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"truncate":{"default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\nPassing `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.\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.","enum":["NONE","START","END"],"type":"string","writeOnly":true,"x-fern-audiences":["public"]}},"required":["inputs"],"type":"object","x-fern-audiences":["public"]}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"classifications":{"items":{"properties":{"classification_type":{"description":"The type of classification performed","enum":["single-label","multi-label"],"type":"string","x-fern-audiences":["public"]},"confidence":{"deprecated":true,"description":"The confidence score for the top predicted class (only filled for single-label classification)","format":"float","type":"number","x-fern-audiences":["public"]},"confidences":{"description":"An array containing the confidence scores of all the predictions in the same order","items":{"format":"float","type":"number","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"id":{"type":"string","x-fern-audiences":["public"]},"input":{"description":"The input text that was classified","type":"string","x-fern-audiences":["public"]},"labels":{"additionalProperties":{"properties":{"confidence":{"format":"float","type":"number","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"]},"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.","type":"object","x-fern-audiences":["public"]},"prediction":{"deprecated":true,"description":"The predicted label for the associated query (only filled for single-label models)","type":"string","x-fern-audiences":["public"]},"predictions":{"description":"An array containing the predicted labels for the associated query (only filled for single-label classification)","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]}},"required":["classification_type","confidences","id","labels","predictions"],"type":"object","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"id":{"type":"string","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]}},"required":["classifications","id"],"type":"object","x-fern-audiences":["public"]}}},"description":"OK","headers":{"X-API-Warning":{"description":"Warning description for incorrect usage of the API","schema":{"type":"string","x-fern-audiences":["public"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/RateLimit"},"498":{"$ref":"#/components/responses/InvalidToken"},"499":{"$ref":"#/components/responses/RequestCancelled"},"500":{"$ref":"#/components/responses/InternalServerError"},"501":{"$ref":"#/components/responses/NotImplemented"},"503":{"$ref":"#/components/responses/ServiceUnavailable"},"504":{"$ref":"#/components/responses/GatewayTimeout"}},"summary":"Classify","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/classify\");\nrequest.Content = new StringContent(\"{\\\"examples\\\":[{\\\"label\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}],\\\"inputs\\\":[\\\"string\\\"],\\\"model\\\":\\\"string\\\",\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"truncate\\\":\\\"END\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/classify' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"examples\":[{\"label\":\"string\",\"text\":\"string\"}],\"inputs\":[\"string\"],\"model\":\"string\",\"preset\":\"my-preset-a58sbd\",\"truncate\":\"END\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"examples\":[{\"label\":\"string\",\"text\":\"string\"}],\"inputs\":[\"string\"],\"model\":\"string\",\"preset\":\"my-preset-a58sbd\",\"truncate\":\"END\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/classify\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/classify\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"examples\\\":[{\\\"label\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}],\\\"inputs\\\":[\\\"string\\\"],\\\"model\\\":\\\"string\\\",\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"truncate\\\":\\\"END\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/classify', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"examples\":[{\"label\":\"string\",\"text\":\"string\"}],\"inputs\":[\"string\"],\"model\":\"string\",\"preset\":\"my-preset-a58sbd\",\"truncate\":\"END\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/classify', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"examples\\\":[{\\\"label\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}],\\\"inputs\\\":[\\\"string\\\"],\\\"model\\\":\\\"string\\\",\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"truncate\\\":\\\"END\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/classify\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"examples\\\":[{\\\"label\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}],\\\"inputs\\\":[\\\"string\\\"],\\\"model\\\":\\\"string\\\",\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"truncate\\\":\\\"END\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/classify\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"examples\":[{\"label\":\"string\",\"text\":\"string\"}],\"inputs\":[\"string\"],\"model\":\"string\",\"preset\":\"my-preset-a58sbd\",\"truncate\":\"END\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/classify\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"examples\\\":[{\\\"label\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}],\\\"inputs\\\":[\\\"string\\\"],\\\"model\\\":\\\"string\\\",\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"truncate\\\":\\\"END\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\tmodel := \"<YOUR-FINE-TUNED-MODEL-ID>\"\n\n\tresp, err := co.Classify(\n\t\tcontext.TODO(),\n\t\t&cohere.ClassifyRequest{\n\t\t\tModel: &model,\n\t\t\tExamples: []*cohere.ClassifyExample{\n\t\t\t\t{\n\t\t\t\t\tText:  cohere.String(\"orange\"),\n\t\t\t\t\tLabel: cohere.String(\"fruit\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tText:  cohere.String(\"pear\"),\n\t\t\t\t\tLabel: cohere.String(\"fruit\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tText:  cohere.String(\"lettuce\"),\n\t\t\t\t\tLabel: cohere.String(\"vegetable\"),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tText:  cohere.String(\"cauliflower\"),\n\t\t\t\t\tLabel: cohere.String(\"vegetable\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tInputs: []string{\"peach\"},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const classify = await cohere.classify({\n    model: '<YOUR-FINE-TUNED-MODEL-ID>',\n    examples: [\n      { text: \"Dermatologists don't like her!\", label: 'Spam' },\n      { text: \"'Hello, open to this?'\", label: 'Spam' },\n      { text: 'I need help please wire me $1000 right now', label: 'Spam' },\n      { text: 'Nice to know you ;)', label: 'Spam' },\n      { text: 'Please help me?', label: 'Spam' },\n      { text: 'Your parcel will be delivered today', label: 'Not spam' },\n      { text: 'Review changes to our Terms and Conditions', label: 'Not spam' },\n      { text: 'Weekly sync notes', label: 'Not spam' },\n      { text: \"'Re: Follow up from today's meeting'\", label: 'Not spam' },\n      { text: 'Pre-read for tomorrow', label: 'Not spam' },\n    ],\n    inputs: ['Confirm your email address', 'hey i need u to send some $'],\n  });\n\n  console.log(classify);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\nfrom cohere import ClassifyExample\n\nco = cohere.Client()\nexamples = [\n    ClassifyExample(text=\"Dermatologists don't like her!\", label=\"Spam\"),\n    ClassifyExample(text=\"'Hello, open to this?'\", label=\"Spam\"),\n    ClassifyExample(text=\"I need help please wire me $1000 right now\", label=\"Spam\"),\n    ClassifyExample(text=\"Nice to know you ;)\", label=\"Spam\"),\n    ClassifyExample(text=\"Please help me?\", label=\"Spam\"),\n    ClassifyExample(text=\"Your parcel will be delivered today\", label=\"Not spam\"),\n    ClassifyExample(\n        text=\"Review changes to our Terms and Conditions\", label=\"Not spam\"\n    ),\n    ClassifyExample(text=\"Weekly sync notes\", label=\"Not spam\"),\n    ClassifyExample(text=\"'Re: Follow up from today's meeting'\", label=\"Not spam\"),\n    ClassifyExample(text=\"Pre-read for tomorrow\", label=\"Not spam\"),\n]\ninputs = [\n    \"Confirm your email address\",\n    \"hey i need u to send some $\",\n]\nresponse = co.classify(\n    model=\"<YOUR-FINE-TUNED-MODEL-ID>\",\n    inputs=inputs,\n    examples=examples,\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\nfrom cohere import ClassifyExample\n\nco = cohere.AsyncClient()\nexamples = [\n    ClassifyExample(text=\"Dermatologists don't like her!\", label=\"Spam\"),\n    ClassifyExample(text=\"'Hello, open to this?'\", label=\"Spam\"),\n    ClassifyExample(text=\"I need help please wire me $1000 right now\", label=\"Spam\"),\n    ClassifyExample(text=\"Nice to know you ;)\", label=\"Spam\"),\n    ClassifyExample(text=\"Please help me?\", label=\"Spam\"),\n    ClassifyExample(text=\"Your parcel will be delivered today\", label=\"Not spam\"),\n    ClassifyExample(\n        text=\"Review changes to our Terms and Conditions\", label=\"Not spam\"\n    ),\n    ClassifyExample(text=\"Weekly sync notes\", label=\"Not spam\"),\n    ClassifyExample(text=\"'Re: Follow up from today's meeting'\", label=\"Not spam\"),\n    ClassifyExample(text=\"Pre-read for tomorrow\", label=\"Not spam\"),\n]\ninputs = [\n    \"Confirm your email address\",\n    \"hey i need u to send some $\",\n]\n\n\nasync def main():\n    response = await co.classify(\n        model=\"<YOUR-FINE-TUNED-MODEL-ID>\",\n        inputs=inputs,\n        examples=examples,\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.ClassifyRequest;\nimport com.cohere.api.types.ClassifyExample;\nimport com.cohere.api.types.ClassifyResponse;\nimport java.util.List;\n\npublic class ClassifyPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ClassifyResponse response =\n        cohere.classify(\n            ClassifyRequest.builder()\n                .addAllInputs(List.of(\"Confirm your email address\", \"hey i need u to send some $\"))\n                .examples(\n                    List.of(\n                        ClassifyExample.builder()\n                            .text(\"Dermatologists don't like her!\")\n                            .label(\"Spam\")\n                            .build(),\n                        ClassifyExample.builder()\n                            .text(\"'Hello, open to this?'\")\n                            .label(\"Spam\")\n                            .build(),\n                        ClassifyExample.builder()\n                            .text(\"I need help please wire me $1000\" + \" right now\")\n                            .label(\"Spam\")\n                            .build(),\n                        ClassifyExample.builder().text(\"Nice to know you ;)\").label(\"Spam\").build(),\n                        ClassifyExample.builder().text(\"Please help me?\").label(\"Spam\").build(),\n                        ClassifyExample.builder()\n                            .text(\"Your parcel will be delivered today\")\n                            .label(\"Not spam\")\n                            .build(),\n                        ClassifyExample.builder()\n                            .text(\"Review changes to our Terms and\" + \" Conditions\")\n                            .label(\"Not spam\")\n                            .build(),\n                        ClassifyExample.builder()\n                            .text(\"Weekly sync notes\")\n                            .label(\"Not spam\")\n                            .build(),\n                        ClassifyExample.builder()\n                            .text(\"'Re: Follow up from today's\" + \" meeting'\")\n                            .label(\"Not spam\")\n                            .build(),\n                        ClassifyExample.builder()\n                            .text(\"Pre-read for tomorrow\")\n                            .label(\"Not spam\")\n                            .build()))\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/classify \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"<YOUR-FINE-TUNED-MODEL-ID>\",\n    \"inputs\": [\"Confirm your email address\", \"hey i need u to send some $\"],\n    \"examples\": [\n      {\"text\": \"Dermatologists don'\\''t like her!\",\"label\": \"Spam\"},\n      {\"text\": \"'\\''Hello, open to this?'\\''\",\"label\": \"Spam\"},\n      {\"text\": \"I need help please wire me $1000 right now\",\"label\": \"Spam\"},\n      {\"text\": \"Nice to know you ;)\",\"label\": \"Spam\"},\n      {\"text\": \"Please help me?\",\"label\": \"Spam\"},\n      {\"text\": \"Your parcel will be delivered today\",\"label\": \"Not spam\"},\n      {\"text\": \"Review changes to our Terms and Conditions\",\"label\": \"Not spam\"},\n      {\"text\": \"Weekly sync notes\",\"label\": \"Not spam\"},\n      {\"text\": \"'\\''Re: Follow up from today'\\''s meeting'\\''\",\"label\": \"Not spam\"},\n      {\"text\": \"Pre-read for tomorrow\",\"label\": \"Not spam\"}\n    ]\n  }'\n","name":"cURL","sdk":"curl"}],"request":{"examples":[{"label":"Spam","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":"Not 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"}],"inputs":["Confirm your email address","hey i need u to send some $"],"model":"YOUR-FINE-TUNED-MODEL-ID"},"response":{"body":{"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"]}],"id":"86886163-b3f3-4e36-8554-60eca7696216","meta":{"api_version":{"version":"1"},"billed_units":{"classifications":2}}}}}]}},"/v1/connectors":{"get":{"deprecated":true,"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.","operationId":"list-connectors","parameters":[{"description":"Maximum number of connectors to return [0, 100].","in":"query","name":"limit","schema":{"default":30,"type":"number","x-fern-audiences":["public"]}},{"description":"Number of connectors to skip before returning results [0, inf].","in":"query","name":"offset","schema":{"default":0,"type":"number","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListConnectorsResponse"}}},"description":"OK"},"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"}},"summary":"List Connectors","tags":["/connectors"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/connectors?limit=30&offset=0\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/connectors?limit=30&offset=0'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/connectors?limit=30&offset=0\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/connectors?limit=30&offset=0\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/connectors?limit=30&offset=0', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/connectors?limit=30&offset=0', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/connectors?limit=30&offset=0\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/connectors?limit=30&offset=0\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/connectors?limit=30&offset=0\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Connectors.List(\n\t\tcontext.TODO(),\n\t\t&cohere.ConnectorsListRequest{})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.connectors.list()\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.connectors.list()\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.types.ListConnectorsResponse;\n\npublic class ConnectorsList {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListConnectorsResponse list = cohere.connectors().list();\n\n    System.out.println(list);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const connectors = await cohere.connectors.list();\n\n  console.log(connectors);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/connectors \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"connectors","x-fern-sdk-method-name":"list"},"post":{"deprecated":true,"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.","operationId":"create-connector","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectorRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateConnectorResponse"}}},"description":"OK"},"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"}},"summary":"Create a Connector","tags":["/connectors"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/connectors\");\nrequest.Content = new StringContent(\"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"description\\\":\\\"string\\\",\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/connectors' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"active\":true,\"continue_on_failure\":false,\"description\":\"string\",\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"active\":true,\"continue_on_failure\":false,\"description\":\"string\",\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/connectors\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/connectors\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"description\\\":\\\"string\\\",\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/connectors', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"active\":true,\"continue_on_failure\":false,\"description\":\"string\",\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/connectors', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"description\\\":\\\"string\\\",\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/connectors\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"description\\\":\\\"string\\\",\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/connectors\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"active\":true,\"continue_on_failure\":false,\"description\":\"string\",\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/connectors\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"description\\\":\\\"string\\\",\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Connectors.Create(\n\t\tcontext.TODO(),\n\t\t&cohere.CreateConnectorRequest{\n\t\t\tName: \"Example connector\",\n\t\t\tUrl:  \"https://you-connector-url\",\n\t\t\tServiceAuth: &cohere.CreateConnectorServiceAuth{\n\t\t\t\tToken: \"dummy-connector-token\",\n\t\t\t\tType:  \"bearer\",\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.connectors.create(\n    name=\"Example connector\",\n    url=\"https://connector-example.com/search\",\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.connectors.create(\n        name=\"Example connector\",\n        url=\"https://connector-example.com/search\",\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.connectors.requests.CreateConnectorRequest;\nimport com.cohere.api.types.CreateConnectorResponse;\n\npublic class ConnectorCreate {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    CreateConnectorResponse response =\n        cohere\n            .connectors()\n            .create(\n                CreateConnectorRequest.builder()\n                    .name(\"Example connector\")\n                    .url(\"https://connector-example.com/search\")\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const connector = await cohere.connectors.create({\n    name: 'test-connector',\n    url: 'https://example.com/search',\n    description: 'A test connector',\n  });\n\n  console.log(connector);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/connectors \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"name\": \"Example connector\",\n    \"url\": \"https://connector-example.com/search\"\n  }'\n","name":"Curl","sdk":"curl"}]}],"x-fern-sdk-group-name":"connectors","x-fern-sdk-method-name":"create"}},"/v1/connectors/{id}":{"delete":{"deprecated":true,"description":"Delete a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information.","operationId":"delete-connector","parameters":[{"description":"The ID of the connector to delete.","in":"path","name":"id","required":true,"schema":{"type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteConnectorResponse"}}},"description":"OK"},"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"}},"summary":"Delete a Connector","tags":["/connectors"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.cohere.com/v1/connectors/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.cohere.com/v1/connectors/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.cohere.com/v1/connectors/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/connectors/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/connectors/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.cohere.com/v1/connectors/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/connectors/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Connectors.Delete(context.TODO(), \"connector_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  await cohere.connectors.delete('connector-id');\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\nco.connectors.delete(\"test-id\")\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    await co.connectors.delete(\"test-id\")\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\n\npublic class ConnectorDelete {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    cohere.connectors().delete(\"test-id\");\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request DELETE \\\n  --url https://api.cohere.com/v1/connectors/id \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"connectors","x-fern-sdk-method-name":"delete"},"get":{"deprecated":true,"description":"Retrieve a connector by ID. See ['Connectors'](https://docs.cohere.com/docs/connectors) for more information.","operationId":"get-connector","parameters":[{"description":"The ID of the connector to retrieve.","in":"path","name":"id","required":true,"schema":{"type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetConnectorResponse"}}},"description":"OK"},"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"}},"summary":"Get a Connector","tags":["/connectors"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/connectors/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/connectors/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/connectors/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/connectors/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/connectors/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/connectors/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/connectors/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Connectors.Get(context.TODO(), \"connector_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.connectors.get(\"test-id\")\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.connectors.get(\"test-id\")\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.types.GetConnectorResponse;\n\npublic class ConnectorGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    GetConnectorResponse response = cohere.connectors().get(\"test-id\");\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const connector = await cohere.connectors.get('connector-id');\n\n  console.log(connector);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/connectors/id \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"connectors","x-fern-sdk-method-name":"get"},"patch":{"deprecated":true,"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.","operationId":"update-connector","parameters":[{"description":"The ID of the connector to update.","in":"path","name":"id","required":true,"schema":{"type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectorRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateConnectorResponse"}}},"description":"OK"},"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"}},"summary":"Update a Connector","tags":["/connectors"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.cohere.com/v1/connectors/string\");\nrequest.Content = new StringContent(\"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.cohere.com/v1/connectors/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"active\":true,\"continue_on_failure\":false,\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"active\":true,\"continue_on_failure\":false,\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.cohere.com/v1/connectors/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/connectors/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"active\":true,\"continue_on_failure\":false,\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/connectors/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.cohere.com/v1/connectors/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"active\":true,\"continue_on_failure\":false,\"excludes\":[\"string\"],\"name\":\"string\",\"oauth\":{\"authorize_url\":\"string\",\"client_id\":\"string\",\"client_secret\":\"[REDACTED]\",\"scope\":\"string\",\"token_url\":\"string\"},\"service_auth\":{\"token\":\"string\",\"type\":\"noscheme\"},\"url\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/connectors/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"active\\\":true,\\\"continue_on_failure\\\":false,\\\"excludes\\\":[\\\"string\\\"],\\\"name\\\":\\\"string\\\",\\\"oauth\\\":{\\\"authorize_url\\\":\\\"string\\\",\\\"client_id\\\":\\\"string\\\",\\\"client_secret\\\":\\\"\\\",\\\"scope\\\":\\\"string\\\",\\\"token_url\\\":\\\"string\\\"},\\\"service_auth\\\":{\\\"token\\\":\\\"string\\\",\\\"type\\\":\\\"noscheme\\\"},\\\"url\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Connectors.Update(\n\t\tcontext.TODO(),\n\t\t\"connector_id\",\n\t\t&cohere.UpdateConnectorRequest{\n\t\t\tName: cohere.String(\"Example connector renamed\"),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.connectors.update(\n    connector_id=\"test-id\", name=\"new name\", url=\"https://example.com/search\"\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.connectors.update(\n        connector_id=\"test-id\", name=\"new name\", url=\"https://example.com/search\"\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.connectors.requests.UpdateConnectorRequest;\n\npublic class ConnectorPatch {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    cohere\n        .connectors()\n        .update(\n            \"test-id\",\n            UpdateConnectorRequest.builder()\n                .name(\"new name\")\n                .url(\"https://connector-example.com/search\")\n                .build());\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const connector = await cohere.connectors.update(connector.id, {\n    name: 'test-connector-renamed',\n    description: 'A test connector renamed',\n  });\n\n  console.log(connector);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request PATCH \\\n  --url https://api.cohere.com/v1/connectors/id \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"name\": \"new name\",\n    \"url\": \"https://example.com/search\"\n  }'\n","name":"Curl","sdk":"curl"}]}],"x-fern-sdk-group-name":"connectors","x-fern-sdk-method-name":"update"}},"/v1/connectors/{id}/oauth/authorize":{"post":{"deprecated":true,"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","parameters":[{"description":"The ID of the connector to authorize.","in":"path","name":"id","required":true,"schema":{"type":"string","x-fern-audiences":["public"]}},{"description":"The URL to redirect to after the connector has been authorized.","in":"query","name":"after_token_redirect","schema":{"type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthAuthorizeResponse"}}},"description":"OK"},"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"}},"summary":"Authorize with oAuth","tags":["/connectors"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/connectors/string/oauth/authorize?after_token_redirect=string\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Connectors.OAuthAuthorize(\n\t\tcontext.TODO(),\n\t\t\"connector_id\",\n\t\t&cohere.ConnectorsOAuthAuthorizeRequest{\n\t\t\tAfterTokenRedirect: cohere.String(\"https://test.com\"),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.connectors.o_auth_authorize(\n    connector_id=\"test-id\", after_token_redirect=\"https://test.com\"\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.connectors.o_auth_authorize(\n        connector_id=\"test-id\", after_token_redirect=\"https://test.com\"\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.connectors.requests.ConnectorsOAuthAuthorizeRequest;\nimport com.cohere.api.types.OAuthAuthorizeResponse;\n\npublic class ConnectorsIdOauthAuthorizePost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    OAuthAuthorizeResponse response =\n        cohere\n            .connectors()\n            .oAuthAuthorize(\n                \"test-id\",\n                ConnectorsOAuthAuthorizeRequest.builder()\n                    .afterTokenRedirect(\"https://connector-example.com/search\")\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const connector = await cohere.connectors.oAuthAuthorize('connector-id', {\n    redirect_uri: 'https://example.com/oauth/callback',\n  });\n\n  console.log(connector);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/connectors/id/oauth/authorize \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"connectors","x-fern-sdk-method-name":"oAuthAuthorize"}},"/v1/datasets":{"get":{"description":"List datasets that have been created.","operationId":"list-datasets","parameters":[{"description":"optional filter by dataset type","in":"query","name":"datasetType","schema":{"type":"string","x-fern-audiences":["public"]}},{"description":"optional filter before a date","in":"query","name":"before","schema":{"format":"date-time","type":"string","x-fern-audiences":["public"]}},{"description":"optional filter after a date","in":"query","name":"after","schema":{"format":"date-time","type":"string","x-fern-audiences":["public"]}},{"description":"optional limit to number of results","in":"query","name":"limit","schema":{"type":"number","x-fern-audiences":["public"]}},{"description":"optional offset to start of results","in":"query","name":"offset","schema":{"type":"number","x-fern-audiences":["public"]}},{"description":"optional filter by validation status","in":"query","name":"validationStatus","schema":{"$ref":"#/components/schemas/DatasetValidationStatus"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"datasets":{"items":{"$ref":"#/components/schemas/Dataset"},"type":"array","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"DatasetsListResponse"}}},"description":"A successful response."},"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"}},"summary":"List Datasets","tags":["/datasets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/datasets?after=2026-06-09T00%3A00%3A00Z&before=2026-06-09T00%3A00%3A00Z&datasetType=string&limit=0&offset=0&validationStatus=failed\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Datasets.List(\n\t\tcontext.TODO(),\n\t\t&cohere.DatasetsListRequest{})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# get list of datasets\nresponse = co.datasets.list()\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.datasets.list()\n\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsListResponse;\n\npublic class DatasetList {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    DatasetsListResponse response = cohere.datasets().list();\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const datasets = await cohere.datasets.list();\n\n  console.log(datasets);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/datasets \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"datasets","x-fern-sdk-method-name":"list"},"post":{"description":"Create a dataset by uploading a file. See ['Dataset Creation'](https://docs.cohere.com/docs/datasets#dataset-creation) for more information.","operationId":"create-dataset","parameters":[{"description":"The name of the uploaded dataset.","in":"query","name":"name","required":true,"schema":{"type":"string","x-fern-audiences":["public"]}},{"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":"type","required":true,"schema":{"$ref":"#/components/schemas/DatasetType"}},{"description":"Indicates if the original file should be stored.","in":"query","name":"keep_original_file","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":"skip_malformed_input","schema":{"type":"boolean","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":"keep_fields","schema":{"items":{"type":"string","x-fern-audiences":["public"]},"type":"array"}},{"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":"optional_fields","schema":{"items":{"type":"string","x-fern-audiences":["public"]},"type":"array"}},{"description":"Raw .txt uploads will be split into entries using the text_separator value.","in":"query","name":"text_separator","schema":{"type":"string","x-fern-audiences":["public"]}},{"description":"The delimiter used for .csv uploads.","in":"query","name":"csv_delimiter","schema":{"type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"data":{"description":"The file to upload","format":"binary","type":"string","x-fern-audiences":["public"]},"eval_data":{"description":"An optional evaluation file to upload","format":"binary","type":"string","x-fern-audiences":["public"]}},"required":["data"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"dataset-dytngn"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"The dataset ID","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"DatasetsCreateResponse"}}},"description":"A successful response."},"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"}},"summary":"Create a Dataset","tags":["/datasets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input\");\nrequest.Content = new StringContent(\"{\\\"data\\\":\\\"binary\\\",\\\"eval_data\\\":\\\"binary\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"data\":\"binary\",\"eval_data\":\"binary\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"data\":\"binary\",\"eval_data\":\"binary\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"data\\\":\\\"binary\\\",\\\"eval_data\\\":\\\"binary\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"data\":\"binary\",\"eval_data\":\"binary\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"data\\\":\\\"binary\\\",\\\"eval_data\\\":\\\"binary\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"data\\\":\\\"binary\\\",\\\"eval_data\\\":\\\"binary\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"data\":\"binary\",\"eval_data\":\"binary\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/datasets?csv_delimiter=string&keep_fields=%5B%22string%22%5D&keep_original_file=true&name=string&optional_fields=%5B%22string%22%5D&skip_malformed_input=true&text_separator=string&type=batch-chat-input\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"data\\\":\\\"binary\\\",\\\"eval_data\\\":\\\"binary\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"strings\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\ntype MyReader struct {\n\tio.Reader\n\tname string\n}\n\nfunc (m *MyReader) Name() string {\n\treturn m.name\n}\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Datasets.Create(\n\t\tcontext.TODO(),\n\t\t&cohere.DatasetsCreateRequest{\n\t\t\tName:     \"embed-dataset\",\n\t\t\tType:     cohere.DatasetTypeEmbedInput,\n\t\t\tData:     &MyReader{Reader: strings.NewReader(`{\"text\": \"The quick brown fox jumps over the lazy dog\"}`), name: \"test.jsonl\"},\n\t\t\tEvalData: &MyReader{Reader: strings.NewReader(\"\"), name: \"a.jsonl\"},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# upload a dataset\nmy_dataset = co.datasets.create(\n    name=\"embed-dataset\",\n    data=open(\"./embed.jsonl\", \"rb\"),\n    type=\"embed-input\",\n)\n\n# wait for validation to complete\nresponse = co.wait(my_dataset)\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    # upload a dataset\n    response = await co.datasets.create(\n        name=\"embed-dataset\",\n        data=open(\"./embed.jsonl\", \"rb\"),\n        type=\"embed-input\",\n    )\n\n    # wait for validation to complete\n    response = await co.wait(response)\n\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.requests.DatasetsCreateRequest;\nimport com.cohere.api.resources.datasets.types.DatasetsCreateResponse;\nimport com.cohere.api.types.DatasetType;\nimport java.util.Optional;\n\npublic class DatasetPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    DatasetsCreateResponse response =\n        cohere\n            .datasets()\n            .create(\n                null,\n                Optional.empty(),\n                DatasetsCreateRequest.builder()\n                    .name(\"embed-dataset\")\n                    .type(DatasetType.EMBED_INPUT)\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst fs = require('fs');\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const file = fs.createReadStream('embed_jobs_sample_data.jsonl'); // {\"text\": \"The quick brown fox jumps over the lazy dog\"}\n\n  const dataset = await cohere.datasets.create({ name: 'my-dataset', type: 'embed-input' }, file);\n\n  console.log(dataset);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request POST \\\n  --url \"https://api.cohere.com/v1/datasets?name=my-dataset&type=embed-input\" \\\n  --header 'Content-Type: multipart/form-data' \\\n  --header \"Authorization: Bearer $CO_API_KEY\" \\\n  --form file=@./path/to/file.jsonl\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"datasets","x-fern-sdk-method-name":"create"}},"/v1/datasets/usage":{"get":{"description":"View the dataset storage usage for your Organization. Each Organization can have up to 10GB of storage across all their users.","operationId":"get-dataset-usage","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"organization_usage":{"description":"The total number of bytes used by the organization.","format":"int64","type":"number","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"DatasetsGetUsageResponse"}}},"description":"A successful response."},"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"}},"summary":"Get Dataset Usage","tags":["/datasets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/datasets/usage\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/datasets/usage'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/datasets/usage\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/datasets/usage\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/datasets/usage', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/datasets/usage', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/datasets/usage\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/datasets/usage\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/datasets/usage\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Datasets.GetUsage(context.TODO())\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# get usage\nresponse = co.datasets.get_usage()\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.datasets.get_usage()\n\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsGetUsageResponse;\n\npublic class DatasetUsageGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    DatasetsGetUsageResponse response = cohere.datasets().getUsage();\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const usage = await cohere.datasets.getUsage('id');\n\n  console.log(usage);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/datasets/usage \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"datasets","x-fern-sdk-method-name":"getUsage"}},"/v1/datasets/{id}":{"delete":{"description":"Delete a dataset by ID. Datasets are automatically deleted after 30 days, but they can also be deleted manually.","operationId":"delete-dataset","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(?!usage$).*$","type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"dataset-id-g4eh6t"}}},"description":"A successful response."},"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"}},"summary":"Delete a Dataset","tags":["/datasets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.cohere.com/v1/datasets/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.cohere.com/v1/datasets/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.cohere.com/v1/datasets/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/datasets/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/datasets/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/datasets/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/datasets/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.cohere.com/v1/datasets/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/datasets/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\t_, err := co.Datasets.Delete(context.TODO(), \"dataset_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# delete dataset\nco.datasets.delete(\"id\")\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    await co.delete_dataset(\"id\")\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\n\npublic class DatasetDelete {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    cohere.datasets().delete(\"id\");\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request DELETE \\\n  --url https://api.cohere.com/v1/datasets/id \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"datasets","x-fern-sdk-method-name":"delete"},"get":{"description":"Retrieve a dataset by ID. See ['Datasets'](https://docs.cohere.com/docs/datasets) for more information.","operationId":"get-dataset","parameters":[{"in":"path","name":"id","required":true,"schema":{"pattern":"^(?!usage$).*$","type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"dataset":{"$ref":"#/components/schemas/Dataset"}},"required":["dataset"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"DatasetsGetResponse"}}},"description":"A successful response."},"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"}},"summary":"Get a Dataset","tags":["/datasets"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/datasets/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/datasets/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/datasets/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/datasets/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/datasets/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/datasets/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/datasets/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/datasets/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/datasets/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Datasets.Get(context.TODO(), \"dataset_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# get dataset\nresponse = co.datasets.get(id=\"<<datasetId>>\")\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.datasets.get(id=\"<<datasetId>>\")\n\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.datasets.types.DatasetsGetResponse;\n\npublic class DatasetGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    DatasetsGetResponse response = cohere.datasets().get(\"dataset_id\");\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const datasets = await cohere.datasets.get('<<datasetId>>');\n\n  console.log(datasets);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/datasets/id \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"datasets","x-fern-sdk-method-name":"get"}},"/v1/detokenize":{"parameters":[],"post":{"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.","operationId":"detokenize","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"model":{"description":"An optional parameter to provide the model name. This will ensure that the detokenization is done by the tokenizer used by that model.","type":"string","x-fern-audiences":["public"]},"tokens":{"description":"The list of tokens to be detokenized.","items":{"type":"integer","x-fern-audiences":["public"]},"maxItems":65536,"minItems":1,"type":"array","writeOnly":true,"x-fern-audiences":["public"]}},"required":["model","tokens"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"DetokenizeRequest"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"text":{"description":"A string representing the list of tokens.","type":"string","x-fern-audiences":["public"]}},"required":["text"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"DetokenizeResponse"}}},"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"}},"summary":"Detokenize","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/detokenize\");\nrequest.Content = new StringContent(\"{\\\"model\\\":\\\"string\\\",\\\"tokens\\\":[0]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/detokenize' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"model\":\"string\",\"tokens\":[0]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"model\":\"string\",\"tokens\":[0]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/detokenize\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/detokenize\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"model\\\":\\\"string\\\",\\\"tokens\\\":[0]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/detokenize', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"model\":\"string\",\"tokens\":[0]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/detokenize', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"model\\\":\\\"string\\\",\\\"tokens\\\":[0]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/detokenize\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"model\\\":\\\"string\\\",\\\"tokens\\\":[0]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/detokenize\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"model\":\"string\",\"tokens\":[0]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/detokenize\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"model\\\":\\\"string\\\",\\\"tokens\\\":[0]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Detokenize(\n\t\tcontext.TODO(),\n\t\t&cohere.DetokenizeRequest{\n\t\t\tTokens: []int{10002, 1706, 1722, 5169, 4328},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const detokenize = await cohere.detokenize({\n    tokens: [10002, 2261, 2012, 8, 2792, 43],\n    model: 'command',\n  });\n\n  console.log(detokenize);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\n\nresponse = co.detokenize(\n    tokens=[8466, 5169, 2594, 8, 2792, 43], model=\"command-a-03-2025\"  # optional\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.detokenize(\n        tokens=[8466, 5169, 2594, 8, 2792, 43],\n        model=\"command-a-03-2025\",  # optional\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.DetokenizeRequest;\nimport com.cohere.api.types.DetokenizeResponse;\nimport java.util.List;\n\npublic class DetokenizePost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    DetokenizeResponse response =\n        cohere.detokenize(\n            DetokenizeRequest.builder()\n                .model(\"command-a-03-2025\")\n                .tokens(List.of(8466, 5169, 2594, 8, 2792, 43))\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/detokenize \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-03-2025\",\n    \"tokens\": [8466, 5169, 2594, 8, 2792, 43]\n  }'\n","name":"cURL","sdk":"curl"}],"request":{"model":"command","tokens":[10002,2261,2012,8,2792,43]},"response":{"body":{"meta":{"api_version":{"version":"1"}},"text":"tokenize me! :D"}}}]}},"/v1/embed":{"post":{"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.\n\nEmbeddings can be used to create classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.\n\nIf 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).","operationId":"embed","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"embedding_types":{"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.\n\n* `\"float\"`: Use this when you want to get back the default float embeddings. Supported with all Embed models.\n* `\"int8\"`: Use this when you want to get back signed int8 embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"uint8\"`: Use this when you want to get back unsigned int8 embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"binary\"`: Use this when you want to get back signed binary embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"ubinary\"`: Use this when you want to get back unsigned binary embeddings. Supported with Embed v3.0 and newer Embed models.","items":{"$ref":"#/components/schemas/EmbeddingType"},"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"images":{"description":"An array of image data URIs for the model to embed.\n\nThe 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.\n\nImage embeddings are supported with Embed v3.0 and newer models.\n\nFor **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.\n\nFor **Embed v4.0 and newer** models, there is no limit on the number of images per call. The combined size of all images in the request must be at most `20MB`.","items":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"minItems":1,"type":"array","x-fern-audiences":["public"]},"input_type":{"$ref":"#/components/schemas/EmbedInputType","x-fern-audiences":["public"]},"model":{"description":"ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"texts":{"description":"An array of strings for the model to embed. Maximum number of texts per call is `96`.","items":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"maxItems":96,"minItems":1,"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"truncate":{"default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `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.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.","enum":["NONE","START","END"],"type":"string","writeOnly":true,"x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"EmbedRequest"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"discriminator":{"mapping":{"embeddings_by_type":"#/components/schemas/EmbedByTypeResponse","embeddings_floats":"#/components/schemas/EmbedFloatsResponse"},"propertyName":"response_type"},"oneOf":[{"$ref":"#/components/schemas/EmbedFloatsResponse"},{"$ref":"#/components/schemas/EmbedByTypeResponse"}]}}},"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"}},"summary":"Embed API (v1)","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/embed\");\nrequest.Content = new StringContent(\"{\\\"embedding_types\\\":[\\\"base64\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/embed' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"embedding_types\":[\"base64\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"model\":\"string\",\"texts\":[\"string\"],\"truncate\":\"END\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"embedding_types\":[\"base64\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"model\":\"string\",\"texts\":[\"string\"],\"truncate\":\"END\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/embed\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/embed\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"embedding_types\\\":[\\\"base64\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/embed', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"embedding_types\":[\"base64\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"model\":\"string\",\"texts\":[\"string\"],\"truncate\":\"END\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/embed', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"embedding_types\\\":[\\\"base64\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/embed\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"embedding_types\\\":[\\\"base64\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/embed\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"embedding_types\":[\"base64\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"model\":\"string\",\"texts\":[\"string\"],\"truncate\":\"END\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/embed\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"embedding_types\\\":[\\\"base64\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Embed(\n\t\tcontext.TODO(),\n\t\t&cohere.EmbedRequest{\n\t\t\tTexts:     []string{\"hello\", \"goodbye\"},\n\t\t\tModel:     cohere.String(\"embed-v4.0\"),\n\t\t\tInputType: cohere.EmbedInputTypeSearchDocument.Ptr(),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Texts","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const embed = await cohere.embed({\n    texts: ['hello', 'goodbye'],\n    model: 'embed-v4.0',\n    inputType: 'classification',\n    embeddingTypes: ['float'],\n  });\n  console.log(embed);\n})();\n","name":"Texts","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\n\nresponse = co.embed(\n    texts=[\"hello\", \"goodbye\"], model=\"embed-v4.0\", input_type=\"classification\"\n)\nprint(response)\n","name":"Texts","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.embed(\n        texts=[\"hello\", \"goodbye\"],\n        model=\"embed-v4.0\",\n        input_type=\"classification\",\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Texts (async)","sdk":"python"},{"code":"package embedpost; /* (C)2024 */\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.EmbedRequest;\nimport com.cohere.api.types.EmbedInputType;\nimport com.cohere.api.types.EmbedResponse;\nimport java.util.List;\n\npublic class EmbedPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    EmbedResponse response =\n        cohere.embed(\n            EmbedRequest.builder()\n                .texts(List.of(\"hello\", \"goodbye\"))\n                .model(\"embed-v4.0\")\n                .inputType(EmbedInputType.CLASSIFICATION)\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Texts","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/embed \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"embed-v4.0\",\n    \"texts\": [\"hello\", \"goodbye\"],\n    \"input_type\": \"classification\"\n  }'\n","name":"Texts","sdk":"curl"}],"request":{"input_type":"classification","model":"embed-v4.0","texts":["hello","goodbye"]},"response":{"body":{"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]],"id":"1c62213a-1f15-46f1-ac62-36f6bbaf3972","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":2}},"response_type":"embeddings_floats","texts":["hello","goodbye"]}}},{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\t// Fetch the image\n\tresp, err := http.Get(\"https://cohere.com/favicon-32x32.png\")\n\tif err != nil {\n\t\tlog.Println(\"Error fetching the image:\", err)\n\t\treturn\n\t}\n\tdefer resp.Body.Close()\n\n\t// Read the image content\n\tbuffer, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\tlog.Println(\"Error reading the image content:\", err)\n\t\treturn\n\t}\n\n\tstringifiedBuffer := base64.StdEncoding.EncodeToString(buffer)\n\tcontentType := resp.Header.Get(\"Content-Type\")\n\timageBase64 := fmt.Sprintf(\"data:%s;base64,%s\", contentType, stringifiedBuffer)\n\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tembed, err := co.Embed(\n\t\tcontext.TODO(),\n\t\t&cohere.EmbedRequest{\n\t\t\tImages:         []string{imageBase64},\n\t\t\tModel:          cohere.String(\"embed-v4.0\"),\n\t\t\tInputType:      cohere.EmbedInputTypeImage.Ptr(),\n\t\t\tEmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", embed)\n}\n","name":"Images","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const image = await fetch('https://cohere.com/favicon-32x32.png');\n  const buffer = await image.arrayBuffer();\n  const stringifiedBuffer = Buffer.from(buffer).toString('base64');\n  const contentType = image.headers.get('content-type');\n  const imageBase64 = `data:${contentType};base64,${stringifiedBuffer}`;\n\n  const embed = await cohere.embed({\n    model: 'embed-v4.0',\n    inputType: 'image',\n    embeddingTypes: ['float'],\n    images: [imageBase64],\n  });\n  console.log(embed);\n})();\n","name":"Images","sdk":"typescript"},{"code":"import cohere\nimport requests\nimport base64\n\nco = cohere.Client()\n\nimage = requests.get(\"https://cohere.com/favicon-32x32.png\")\nstringified_buffer = base64.b64encode(image.content).decode(\"utf-8\")\ncontent_type = image.headers[\"Content-Type\"]\nimage_base64 = f\"data:{content_type};base64,{stringified_buffer}\"\n\nresponse = co.embed(\n    model=\"embed-v4.0\",\n    input_type=\"image\",\n    embedding_types=[\"float\"],\n    images=[image_base64],\n)\n\nprint(response)\n","name":"Images","sdk":"python"},{"code":"package embedpost; /* (C)2024 */\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.EmbedRequest;\nimport com.cohere.api.types.EmbedInputType;\nimport com.cohere.api.types.EmbedResponse;\nimport com.cohere.api.types.EmbeddingType;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.net.HttpURLConnection;\nimport java.net.MalformedURLException;\nimport java.net.URI;\nimport java.net.URL;\nimport java.util.Base64;\nimport java.util.List;\n\npublic class EmbedImagePost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    try {\n      URI uri = URI.create(\"https://cohere.com/favicon-32x32.png\");\n      URL url = uri.toURL();\n      HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n      connection.connect();\n\n      InputStream inputStream = connection.getInputStream();\n      byte[] buffer = inputStream.readAllBytes();\n      inputStream.close();\n\n      String imageBase64 =\n          String.format(\n              \"data:%s;base64,%s\",\n              connection.getHeaderField(\"Content-Type\"),\n              Base64.getEncoder().encodeToString(buffer));\n\n      EmbedResponse response =\n          cohere.embed(\n              EmbedRequest.builder()\n                  .images(List.of(imageBase64))\n                  .model(\"embed-v4.0\")\n                  .inputType(EmbedInputType.IMAGE)\n                  .embeddingTypes(List.of(EmbeddingType.FLOAT))\n                  .build());\n\n      System.out.println(response);\n    } catch (MalformedURLException e) {\n      System.err.println(\"Invalid URL: \" + e.getMessage());\n    } catch (IOException e) {\n      System.err.println(\"I/O error: \" + e.getMessage());\n    }\n  }\n}\n","name":"Images","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/embed \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"embed-v4.0\",\n    \"input_type\": \"image\",\n    \"embedding_types\": [\"float\"],\n    \"images\": [\"data:image/jpeg;base64,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\"]\n  }'\n","name":"Images","sdk":"curl"}],"request":{"embedding_types":["float"],"images":["data:image/jpeg;base64,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"],"input_type":"image","model":"embed-v4.0"},"response":{"body":{"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,0.000050604343,-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,-0.00009846687,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,-0.00008481741,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,0.000072181225,-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,0.00004631281,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,0.000075519085,-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]]},"id":"5807ee2e-0cda-445a-9ec8-864c60a06606","images":[{"bit_depth":24,"format":"jpeg","height":400,"width":400}],"meta":{"api_version":{"version":"2"},"billed_units":{"images":1}},"response_type":"embeddings_by_type","texts":[]}}}]}},"/v1/embed-jobs":{"get":{"description":"The list embed job endpoint allows users to view all embed jobs history for that specific user.","operationId":"list-embed-jobs","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEmbedJobResponse"}}},"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"}},"summary":"List Embed Jobs","tags":["/embed-jobs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/embed-jobs\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/embed-jobs'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/embed-jobs\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/embed-jobs\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/embed-jobs\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/embed-jobs\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/embed-jobs\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.EmbedJobs.Get(context.TODO(), \"embed_job_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# list embed jobs\nresponse = co.embed_jobs.list()\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.embed_jobs.list()\n\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.types.ListEmbedJobResponse;\n\npublic class EmbedJobsGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListEmbedJobResponse response = cohere.embedJobs().list();\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const embedJobs = await cohere.embedJobs.list();\n\n  console.log(embedJobs);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/embed-jobs \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"embed-jobs","x-fern-sdk-method-name":"list"},"post":{"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.","operationId":"create-embed-job","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbedJobRequest"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEmbedJobResponse"}}},"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"}},"summary":"Create an Embed Job","tags":["/embed-jobs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/embed-jobs\");\nrequest.Content = new StringContent(\"{\\\"dataset_id\\\":\\\"string\\\",\\\"embedding_types\\\":[\\\"base64\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"truncate\\\":\\\"END\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/embed-jobs' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"dataset_id\":\"string\",\"embedding_types\":[\"base64\"],\"input_type\":\"classification\",\"model\":\"string\",\"name\":\"string\",\"truncate\":\"END\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"dataset_id\":\"string\",\"embedding_types\":[\"base64\"],\"input_type\":\"classification\",\"model\":\"string\",\"name\":\"string\",\"truncate\":\"END\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/embed-jobs\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/embed-jobs\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"dataset_id\\\":\\\"string\\\",\\\"embedding_types\\\":[\\\"base64\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"truncate\\\":\\\"END\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"dataset_id\":\"string\",\"embedding_types\":[\"base64\"],\"input_type\":\"classification\",\"model\":\"string\",\"name\":\"string\",\"truncate\":\"END\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"dataset_id\\\":\\\"string\\\",\\\"embedding_types\\\":[\\\"base64\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"truncate\\\":\\\"END\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/embed-jobs\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"dataset_id\\\":\\\"string\\\",\\\"embedding_types\\\":[\\\"base64\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"truncate\\\":\\\"END\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/embed-jobs\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"dataset_id\":\"string\",\"embedding_types\":[\"base64\"],\"input_type\":\"classification\",\"model\":\"string\",\"name\":\"string\",\"truncate\":\"END\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/embed-jobs\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"dataset_id\\\":\\\"string\\\",\\\"embedding_types\\\":[\\\"base64\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"truncate\\\":\\\"END\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.EmbedJobs.Create(\n\t\tcontext.TODO(),\n\t\t&cohere.CreateEmbedJobRequest{\n\t\t\tDatasetId: \"dataset_id\",\n\t\t\tModel:     \"embed-english-v3.0\",\n\t\t\tInputType: cohere.EmbedInputTypeSearchDocument,\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# start an embed job\njob = co.embed_jobs.create(\n    dataset_id=\"my-dataset-id\", input_type=\"search_document\", model=\"embed-english-v3.0\"\n)\n\n# poll the server until the job is complete\nresponse = co.wait(job)\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    # start an embed job\n    job = await co.embed_jobs.create(\n        dataset_id=\"my-dataset-id\",\n        input_type=\"search_document\",\n        model=\"embed-english-v3.0\",\n    )\n\n    # poll the server until the job is complete\n    response = await co.wait(job)\n\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.embedjobs.requests.CreateEmbedJobRequest;\nimport com.cohere.api.types.CreateEmbedJobResponse;\nimport com.cohere.api.types.EmbedInputType;\n\npublic class EmbedJobsPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    CreateEmbedJobResponse response =\n        cohere\n            .embedJobs()\n            .create(\n                CreateEmbedJobRequest.builder()\n                    .model(\"embed-v4.0\")\n                    .datasetId(\"ds.id\")\n                    .inputType(EmbedInputType.SEARCH_DOCUMENT)\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const embedJob = await cohere.embedJobs.create({\n    datasetId: 'my-dataset',\n    inputType: 'search_document',\n    model: 'embed-v4.0',\n  });\n\n  console.log(embedJob);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/embed-jobs \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"embed-v4.0\",\n    \"dataset_id\": \"my-dataset\"\n  }'\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"embed-jobs","x-fern-sdk-method-name":"create"}},"/v1/embed-jobs/{id}":{"get":{"description":"This API retrieves the details about an embed job started by the same user.","operationId":"get-embed-job","parameters":[{"description":"The ID of the embed job to retrieve.","in":"path","name":"id","required":true,"schema":{"type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedJob"}}},"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"}},"summary":"Fetch an Embed Job","tags":["/embed-jobs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/embed-jobs/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/embed-jobs/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/embed-jobs/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/embed-jobs/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/embed-jobs/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/embed-jobs/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/embed-jobs/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.EmbedJobs.List(context.TODO())\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# get embed job\nresponse = co.embed_jobs.get(\"job_id\")\n\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.embed_jobs.get(\"job_id\")\n\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.types.ListEmbedJobResponse;\n\npublic class EmbedJobsGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListEmbedJobResponse response = cohere.embedJobs().list();\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const embedJob = await cohere.embedJobs.get('job_id');\n\n  console.log(embedJob);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/embed-jobs/id \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"embed-jobs","x-fern-sdk-method-name":"get"}},"/v1/embed-jobs/{id}/cancel":{"post":{"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.","operationId":"cancel-embed-job","parameters":[{"description":"The ID of the embed job to cancel.","in":"path","name":"id","required":true,"schema":{"type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"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"}},"summary":"Cancel an Embed Job","tags":["/embed-jobs"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/embed-jobs/string/cancel\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/embed-jobs/string/cancel'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/embed-jobs/string/cancel\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/embed-jobs/string/cancel\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs/string/cancel', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/embed-jobs/string/cancel', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/embed-jobs/string/cancel\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.cohere.com/v1/embed-jobs/string/cancel\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/embed-jobs/string/cancel\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\terr := co.EmbedJobs.Cancel(context.TODO(), \"embed_job_id\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.Client()\n\n# cancel an embed job\nco.embed_jobs.cancel(\"job_id\")\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    await co.embed_jobs.cancel(\"job_id\")\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\n\npublic class EmbedJobsCancel {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    cohere.embedJobs().cancel(\"job_id\");\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const embedJob = await cohere.embedJobs.cancel('job_id');\n\n  console.log(embedJob);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/embed-jobs/id/cancel \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"embed-jobs","x-fern-sdk-method-name":"cancel"}},"/v1/finetuning/finetuned-models":{"get":{"deprecated":true,"description":"Returns a list of fine-tuned models that the user has access to.","operationId":"ListFinetunedModels","parameters":[{"description":"Maximum number of results to be returned by the server. If 0, defaults to\n50.","in":"query","name":"page_size","required":false,"schema":{"format":"int32","type":"integer"}},{"description":"Request a specific page of the list results.","in":"query","name":"page_token","required":false,"schema":{"type":"string"}},{"description":"Comma separated list of fields. For example: \"created_at,name\". The default\nsorting order is ascending. To specify descending order for a field, append\n\" desc\" to the field name. For example: \"created_at desc,name\".\n\nSupported sorting fields:\n  - created_at (default)","in":"query","name":"order_by","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"example":{"finetuned_models":[{"completed_at":"2024-01-17T20:31:05.047066Z","created_at":"2024-01-17T20:11:42.907112Z","creator_id":"7a317d97-4d05-427d-9396-f31b9fb92c55","id":"fee37446-7fc7-42f9-a026-c6ba2fcc422d","name":"chat-ft","organization_id":"6bdca3d5-3eae-4de0-ac34-786d8063b7ee","settings":{"base_model":{"base_type":"BASE_TYPE_CHAT","name":"medium","strategy":"STRATEGY_TFEW","version":"14.2.0"},"dataset_id":"my-dataset-d701tr","hyperparameters":{"early_stopping_patience":6,"early_stopping_threshold":0.01,"learning_rate":0.01,"train_batch_size":16,"train_epochs":1}},"status":"STATUS_READY","updated_at":"2024-01-17T20:31:06.464015Z"},{"completed_at":"2024-01-17T20:42:55.821051Z","created_at":"2024-01-17T20:17:16.997608Z","creator_id":"7a317d97-4d05-427d-9396-f31b9fb92c55","id":"9d927c5e-7598-4772-98b7-cdf2014e8874","name":"rerank-ft","organization_id":"6bdca3d5-3eae-4de0-ac34-786d8063b7ee","settings":{"base_model":{"base_type":"BASE_TYPE_RERANK","name":"english","strategy":"STRATEGY_VANILLA","version":"2.0.0"},"dataset_id":"rerank-dataset-d820xf"},"status":"STATUS_READY","updated_at":"2024-01-17T20:50:11.148769Z"}]},"schema":{"$ref":"#/components/schemas/ListFinetunedModelsResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Status Service Unavailable"}},"summary":"Lists fine-tuned models.","tags":["/finetuning"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/finetuning/finetuned-models?order_by=string&page_size=0&page_token=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"/* (C)2024 */\npackage finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.ListFinetunedModelsResponse;\n\npublic class ListFinetunedModels {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListFinetunedModelsResponse response = cohere.finetuning().listFinetunedModels();\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Finetuning.ListFinetunedModels(context.TODO(), nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModels)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.finetuning.list_finetuned_models()\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.finetuning.list_finetuned_models()\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/finetuning/finetuned-models \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-request-name":"FinetuningListFinetunedModelsRequest","x-fern-sdk-group-name":"finetuning"},"post":{"deprecated":true,"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","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinetunedModel"}}},"description":"Information about the fine-tuned model. Must contain name and settings.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFinetunedModelResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Status Service Unavailable"}},"summary":"Trains and deploys a fine-tuned model.","tags":["/finetuning"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/finetuning/finetuned-models\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/finetuning/finetuned-models' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/finetuning/finetuned-models\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/finetuning/finetuned-models\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/finetuning/finetuned-models\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/finetuning/finetuned-models\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/finetuning/finetuned-models\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"/* (C)2024 */\npackage finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.*;\n\npublic class CreateFinetunedModel {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    CreateFinetunedModelResponse response =\n        cohere\n            .finetuning()\n            .createFinetunedModel(\n                FinetunedModel.builder()\n                    .name(\"test-finetuned-model\")\n                    .settings(\n                        Settings.builder()\n                            .baseModel(\n                                BaseModel.builder().baseType(BaseType.BASE_TYPE_CHAT).build())\n                            .datasetId(\"my-dataset-id\")\n                            .build())\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n\t\"github.com/cohere-ai/cohere-go/v2/finetuning\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Finetuning.CreateFinetunedModel(\n\t\tcontext.TODO(),\n\t\t&finetuning.FinetunedModel{\n\t\t\tName: \"test-finetuned-model\",\n\t\t\tSettings: &finetuning.Settings{\n\t\t\t\tDatasetId: \"my-dataset-id\",\n\t\t\t\tBaseModel: &finetuning.BaseModel{\n\t\t\t\t\tBaseType: finetuning.BaseTypeBaseTypeChat,\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModel)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"from cohere.finetuning import (\n    BaseModel,\n    FinetunedModel,\n    Hyperparameters,\n    Settings,\n    WandbConfig,\n)\nimport cohere\n\nco = cohere.Client()\nhp = Hyperparameters(\n    early_stopping_patience=10,\n    early_stopping_threshold=0.001,\n    train_batch_size=16,\n    train_epochs=1,\n    learning_rate=0.01,\n)\nwnb_config = WandbConfig(\n    project=\"test-project\",\n    api_key=\"<<wandbApiKey>>\",\n    entity=\"test-entity\",\n)\nfinetuned_model = co.finetuning.create_finetuned_model(\n    request=FinetunedModel(\n        name=\"test-finetuned-model\",\n        settings=Settings(\n            base_model=BaseModel(\n                base_type=\"BASE_TYPE_CHAT\",\n            ),\n            dataset_id=\"my-dataset-id\",\n            hyperparameters=hp,\n            wandb=wnb_config,\n        ),\n    )\n)\nprint(finetuned_model)\n","name":"Sync","sdk":"python"},{"code":"from cohere.finetuning import (\n    BaseModel,\n    FinetunedModel,\n    Settings,\n)\nimport cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.finetuning.create_finetuned_model(\n        request=FinetunedModel(\n            name=\"test-finetuned-model\",\n            settings=Settings(\n                base_model=BaseModel(\n                    base_type=\"BASE_TYPE_CHAT\",\n                ),\n                dataset_id=\"my-dataset-id\",\n            ),\n        )\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/finetuning/finetuned-models \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n      \"name\": \"test-finetuned-model\",\n      \"settings\": {\n        \"base_model\": {\n          \"base_type\": \"BASE_TYPE_CHAT\",\n        },\n        \"dataset_id\": \"test-dataset-id\"\n      }\n  }'\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"finetuning"}},"/v1/finetuning/finetuned-models/{finetuned_model_id}/events":{"get":{"deprecated":true,"description":"Returns a list of events that occurred during the life-cycle of the fine-tuned model.\nThe events are ordered by creation time, with the most recent event first.\nThe list can be paginated using `page_size` and `page_token` parameters.","operationId":"ListEvents","parameters":[{"description":"The parent fine-tuned model ID.","in":"path","name":"finetuned_model_id","required":true,"schema":{"type":"string"}},{"description":"Maximum number of results to be returned by the server. If 0, defaults to\n50.","in":"query","name":"page_size","required":false,"schema":{"format":"int32","type":"integer"}},{"description":"Request a specific page of the list results.","in":"query","name":"page_token","required":false,"schema":{"type":"string"}},{"description":"Comma separated list of fields. For example: \"created_at,name\". The default\nsorting order is ascending. To specify descending order for a field, append\n\" desc\" to the field name. For example: \"created_at desc,name\".\n\nSupported sorting fields:\n  - created_at (default)","in":"query","name":"order_by","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"example":{"events":[{"created_at":"2024-01-17T20:11:45.267960Z","status":"STATUS_QUEUED","user_id":"7a317d97-4d05-427d-9396-f31b9fb92c55"},{"created_at":"2024-01-17T20:11:46.000862Z","status":"STATUS_FINETUNING","user_id":"7a317d97-4d05-427d-9396-f31b9fb92c55"},{"created_at":"2024-01-17T20:31:05.047066Z","status":"STATUS_DEPLOYING_API","user_id":"7a317d97-4d05-427d-9396-f31b9fb92c55"},{"created_at":"2024-01-17T20:31:06.988655Z","status":"STATUS_READY"}],"total_size":5},"schema":{"$ref":"#/components/schemas/ListEventsResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Status Service Unavailable"}},"summary":"Fetch history of statuses for a fine-tuned model.","tags":["/finetuning"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/finetuning/finetuned-models/string/events?order_by=string&page_size=0&page_token=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"/* (C)2024 */\npackage finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.ListEventsResponse;\n\npublic class ListEvents {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListEventsResponse response = cohere.finetuning().listEvents(\"test-id\");\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Finetuning.ListEvents(\n\t\tcontext.TODO(),\n\t\t\"test-finetuned-model-id\",\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.Events)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.finetuning.list_events(finetuned_model_id=\"test-id\")\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.finetuning.list_events(finetuned_model_id=\"test-id\")\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id/events \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-request-name":"FinetuningListEventsRequest","x-fern-sdk-group-name":"finetuning"}},"/v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics":{"get":{"deprecated":true,"description":"Returns a list of metrics measured during the training of a fine-tuned model.\nThe metrics are ordered by step number, with the most recent step first.\nThe list can be paginated using `page_size` and `page_token` parameters.","operationId":"ListTrainingStepMetrics","parameters":[{"description":"The parent fine-tuned model ID.","in":"path","name":"finetuned_model_id","required":true,"schema":{"type":"string"}},{"description":"Maximum number of results to be returned by the server. If 0, defaults to\n50.","in":"query","name":"page_size","required":false,"schema":{"format":"int32","type":"integer"}},{"description":"Request a specific page of the list results.","in":"query","name":"page_token","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"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","metrics":{"accuracy":0.7393720149993896,"cross_entropy":0.7702581286430359,"generation_accuracy":0.7393720149993896,"generation_cross_entropy":0.7702581286430359,"step":9},"step_number":9}]},"schema":{"$ref":"#/components/schemas/ListTrainingStepMetricsResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Status Service Unavailable"}},"summary":"Retrieve training metrics for fine-tuned models.","tags":["/finetuning"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/finetuning/finetuned-models/string/training-step-metrics?page_size=0&page_token=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"/* (C)2024 */\npackage finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.ListTrainingStepMetricsResponse;\n\npublic class ListTrainingStepMetrics {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListTrainingStepMetricsResponse response =\n        cohere.finetuning().listTrainingStepMetrics(\"test-id\");\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Finetuning.ListTrainingStepMetrics(\n\t\tcontext.TODO(),\n\t\t\"test-finetuned-model-id\",\n\t\tnil,\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.StepMetrics)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\ntrain_step_metrics = co.finetuning.list_training_step_metrics(\n    finetuned_model_id=\"test-id\"\n)\nprint(train_step_metrics)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.finetuning.list_train_step_metrics(finetuned_model_id=\"test-id\")\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id/training-step-metrics \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-request-name":"FinetuningListTrainingStepMetricsRequest","x-fern-sdk-group-name":"finetuning"}},"/v1/finetuning/finetuned-models/{id}":{"delete":{"deprecated":true,"description":"Deletes a fine-tuned model. The model will be removed from the system and will no longer be available for use.\nThis operation is irreversible.","operationId":"DeleteFinetunedModel","parameters":[{"description":"The fine-tuned model ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFinetunedModelResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Status Service Unavailable"}},"summary":"Deletes a fine-tuned model.","tags":["/finetuning"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Delete, \"https://api.cohere.com/v1/finetuning/finetuned-models/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X DELETE 'https://api.cohere.com/v1/finetuning/finetuned-models/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"DELETE\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\"))\n    .method(\"DELETE\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string', { method: 'DELETE' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string', { method: 'DELETE' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"DELETE\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\")\nrequest = Net::HTTPGenericRequest.new(\"DELETE\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"/* (C)2024 */\npackage finetuning;\n\nimport com.cohere.api.Cohere;\n\npublic class DeleteFinetunedModel {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    cohere.finetuning().deleteFinetunedModel(\"test-id\");\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\t_, err := co.Finetuning.DeleteFinetunedModel(context.TODO(), \"test-id\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n","name":"Cohere Go SDK","sdk":"go"},{"name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\nco.finetuning.delete_finetuned_model(\"test-id\")\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    await co.finetuning.delete_finetuned_model(\"test-id\")\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request DELETE \\\n  --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":"finetuning"},"get":{"deprecated":true,"description":"Retrieve a fine-tuned model by its ID.","operationId":"GetFinetunedModel","parameters":[{"description":"The fine-tuned model ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"example":{"finetuned_model":{"completed_at":"2024-01-17T20:31:05.047066Z","created_at":"2024-01-17T20:11:42.907112Z","creator_id":"7a317d97-4d05-427d-9396-f31b9fb92c55","id":"fee37446-7fc7-42f9-a026-c6ba2fcc422d","name":"chat-ft","organization_id":"6bdca3d5-3eae-4de0-ac34-786d8063b7ee","settings":{"base_model":{"base_type":"BASE_TYPE_CHAT","name":"medium","strategy":"STRATEGY_TFEW","version":"14.2.0"},"dataset_id":"my-dataset-d701tr","hyperparameters":{"early_stopping_patience":6,"early_stopping_threshold":0.01,"learning_rate":0.01,"train_batch_size":16,"train_epochs":1}},"status":"STATUS_READY","updated_at":"2024-01-17T20:31:06.464015Z"}},"schema":{"$ref":"#/components/schemas/GetFinetunedModelResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Status Service Unavailable"}},"summary":"Returns a fine-tuned model by ID.","tags":["/finetuning"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/finetuning/finetuned-models/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/finetuning/finetuned-models/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"/* (C)2024 */\npackage finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.GetFinetunedModelResponse;\n\npublic class GetFinetunedModel {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    GetFinetunedModelResponse response = cohere.finetuning().getFinetunedModel(\"test-id\");\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Finetuning.GetFinetunedModel(context.TODO(), \"test-id\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModel)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.finetuning.get_finetuned_model(\"test-id\")\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.finetuning.get_finetuned_model(\"test-id\")\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"}]}],"x-fern-request-name":"FinetuningGetFinetunedModelRequest","x-fern-sdk-group-name":"finetuning"},"patch":{"deprecated":true,"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","parameters":[{"description":"FinetunedModel ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"completed_at":{"description":"Timestamp for the completed fine-tuning.","format":"date-time","readOnly":true,"type":"string"},"created_at":{"description":"Creation timestamp.","format":"date-time","readOnly":true,"type":"string"},"creator_id":{"description":"User ID of the creator.","readOnly":true,"type":"string"},"last_used":{"description":"Deprecated: Timestamp for the latest request to this fine-tuned model.","format":"date-time","readOnly":true,"type":"string"},"name":{"description":"FinetunedModel name (e.g. `foobar`).","type":"string"},"organization_id":{"description":"Organization ID.","readOnly":true,"type":"string"},"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},"updated_at":{"description":"Latest update timestamp.","format":"date-time","readOnly":true,"type":"string"}},"required":["name","settings"],"title":"Information about the fine-tuned model. Must contain name and settings.","type":"object"}}},"description":"Information about the fine-tuned model. Must contain name and settings.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFinetunedModelResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Status Service Unavailable"}},"summary":"Updates a fine-tuned model.","tags":["/finetuning"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Patch, \"https://api.cohere.com/v1/finetuning/finetuned-models/string\");\nrequest.Content = new StringContent(\"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X PATCH 'https://api.cohere.com/v1/finetuning/finetuned-models/string' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}`)\n\treq, err := http.NewRequestWithContext(ctx, \"PATCH\", \"https://api.cohere.com/v1/finetuning/finetuned-models/string\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\"))\n    .method(\"PATCH\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"PATCH\", HttpRequest.BodyPublishers.ofString(\"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string', {\n  method: 'PATCH',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/finetuning/finetuned-models/string', { method: 'PATCH', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"PATCH\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"PATCH\",\n    \"https://api.cohere.com/v1/finetuning/finetuned-models/string\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"name\":\"string\",\"settings\":{\"base_model\":{\"base_type\":\"BASE_TYPE_UNSPECIFIED\",\"name\":\"string\",\"strategy\":\"STRATEGY_UNSPECIFIED\"},\"dataset_id\":\"string\",\"hyperparameters\":{\"early_stopping_patience\":0,\"early_stopping_threshold\":0,\"learning_rate\":0,\"lora_alpha\":0,\"lora_rank\":0,\"lora_target_modules\":\"LORA_TARGET_MODULES_UNSPECIFIED\",\"train_batch_size\":0,\"train_epochs\":0},\"wandb\":{\"api_key\":\"[REDACTED]\",\"entity\":\"string\",\"project\":\"string\"}}}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/finetuning/finetuned-models/string\")\nrequest = Net::HTTPGenericRequest.new(\"PATCH\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"name\\\":\\\"string\\\",\\\"settings\\\":{\\\"base_model\\\":{\\\"base_type\\\":\\\"BASE_TYPE_UNSPECIFIED\\\",\\\"name\\\":\\\"string\\\",\\\"strategy\\\":\\\"STRATEGY_UNSPECIFIED\\\"},\\\"dataset_id\\\":\\\"string\\\",\\\"hyperparameters\\\":{\\\"early_stopping_patience\\\":0,\\\"early_stopping_threshold\\\":0,\\\"learning_rate\\\":0,\\\"lora_alpha\\\":0,\\\"lora_rank\\\":0,\\\"lora_target_modules\\\":\\\"LORA_TARGET_MODULES_UNSPECIFIED\\\",\\\"train_batch_size\\\":0,\\\"train_epochs\\\":0},\\\"wandb\\\":{\\\"api_key\\\":\\\"\\\",\\\"entity\\\":\\\"string\\\",\\\"project\\\":\\\"string\\\"}}}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"/* (C)2024 */\npackage finetuning;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.finetuning.finetuning.types.BaseModel;\nimport com.cohere.api.resources.finetuning.finetuning.types.BaseType;\nimport com.cohere.api.resources.finetuning.finetuning.types.Settings;\nimport com.cohere.api.resources.finetuning.finetuning.types.UpdateFinetunedModelResponse;\nimport com.cohere.api.resources.finetuning.requests.FinetuningUpdateFinetunedModelRequest;\n\npublic class UpdateFinetunedModel {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    UpdateFinetunedModelResponse response =\n        cohere\n            .finetuning()\n            .updateFinetunedModel(\n                \"test-id\",\n                FinetuningUpdateFinetunedModelRequest.builder()\n                    .name(\"new name\")\n                    .settings(\n                        Settings.builder()\n                            .baseModel(\n                                BaseModel.builder().baseType(BaseType.BASE_TYPE_CHAT).build())\n                            .datasetId(\"my-dataset-id\")\n                            .build())\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Finetuning.UpdateFinetunedModel(\n\t\tcontext.TODO(),\n\t\t\"test-id\",\n\t\t&cohere.FinetuningUpdateFinetunedModelRequest{\n\t\t\tName: \"new-name\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp.FinetunedModel)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"from cohere.finetuning import (\n    BaseModel,\n    Settings,\n)\nimport cohere\n\nco = cohere.Client()\nfinetuned_model = co.finetuning.update_finetuned_model(\n    id=\"test-id\",\n    name=\"new name\",\n    settings=Settings(\n        base_model=BaseModel(\n            base_type=\"BASE_TYPE_CHAT\",\n        ),\n        dataset_id=\"my-dataset-id\",\n    ),\n)\n\nprint(finetuned_model)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.finetuning.update_finetuned_model(id=\"test-id\", name=\"new name\")\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"curl --request PATCH \\\n  --url https://api.cohere.com/v1/finetuning/finetuned-models/test-id \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{ \"name\": \"new name\" }'\n","name":"cURL","sdk":"curl"}]}],"x-fern-request-name":"FinetuningUpdateFinetunedModelRequest","x-fern-sdk-group-name":"finetuning"}},"/v1/generate":{"post":{"deprecated":true,"description":"<Warning>\nThis 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.\n</Warning>\nGenerates realistic text conditioned on a given input.\n","operationId":"generate","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"end_sequences":{"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"]},"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"frequency_penalty":{"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.\n\nUsing `frequency_penalty` in combination with `presence_penalty` is not supported on newer models.\n","type":"number","writeOnly":true,"x-fern-audiences":["public"]},"k":{"description":"Ensures only the top `k` most likely tokens are considered for generation at each step.\nDefaults to `0`, min value of `0`, max value of `500`.\n","type":"integer","writeOnly":true,"x-fern-audiences":["public"]},"max_tokens":{"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.\n\nThis 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.\n\nCan only be set to `0` if `return_likelihoods` is set to `ALL` to get the likelihood of the prompt.\n","type":"integer","writeOnly":true,"x-fern-audiences":["public"]},"model":{"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).\nSmaller, \"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.","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"num_generations":{"description":"The maximum number of generations that will be returned. Defaults to `1`, min value of `1`, max value of `5`.\n","type":"integer","writeOnly":true,"x-fern-audiences":["public"]},"p":{"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`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n","type":"number","writeOnly":true,"x-fern-audiences":["public"]},"presence_penalty":{"description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\n\nCan 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.\n\nUsing `frequency_penalty` in combination with `presence_penalty` is not supported on newer models.\n","type":"number","writeOnly":true,"x-fern-audiences":["public"]},"preset":{"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).\nWhen a preset is specified, the `prompt` parameter becomes optional, and any included parameters will override the preset's parameters.\n","example":"my-preset-a58sbd","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"prompt":{"description":"The input text that serves as the starting point for generating the response.\nNote: The prompt will be pre-processed and modified before reaching the model.\n","example":"Please explain to me how LLMs work","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"raw_prompting":{"description":"When enabled, the user's prompt will be sent to the model without any pre-processing.","type":"boolean","x-fern-audiences":["public"]},"return_likelihoods":{"default":"NONE","description":"One of `GENERATION|NONE` to specify how and if the token likelihoods are returned with the response. Defaults to `NONE`.\n\nIf `GENERATION` is selected, the token likelihoods will only be provided for generated text.\n\nWARNING: `ALL` is deprecated, and will be removed in a future release.","enum":["GENERATION","ALL","NONE"],"type":"string","x-fern-audiences":["public"]},"seed":{"description":"If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\nCompatible Deployments: Cohere Platform, Azure, AWS Sagemaker/Bedrock, Private Deployments\n","maximum":{"$doctorine.bigint":"18446744073709552000"},"minimum":0,"type":"integer","x-fern-audiences":["public"]},"stop_sequences":{"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"]},"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"stream":{"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.\n\nThe 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:\n- `COMPLETE` - the model sent back a finished reply\n- `MAX_TOKENS` - the reply was cut off because the model reached the maximum number of tokens for its context length\n- `ERROR` - something went wrong when generating the reply\n- `ERROR_TOXIC` - the model generated a reply that was deemed toxic\n","type":"boolean","x-fern-audiences":["public"]},"temperature":{"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.\nDefaults to `0.75`, min value of `0.0`, max value of `5.0`.\n","type":"number","writeOnly":true,"x-fern-audiences":["public"]},"truncate":{"default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `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.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.","enum":["NONE","START","END"],"type":"string","writeOnly":true,"x-fern-audiences":["public"]}},"required":["prompt"],"type":"object","writeOnly":true,"x-fern-audiences":["public"]}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Generation"}},"application/stream+json":{"schema":{"$ref":"#/components/schemas/GenerateStreamedResponse"}}},"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"}},"summary":"Generate","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/generate\");\nrequest.Content = new StringContent(\"{\\\"end_sequences\\\":[\\\"string\\\"],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"num_generations\\\":0,\\\"p\\\":0,\\\"presence_penalty\\\":0,\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"prompt\\\":\\\"Please explain to me how LLMs work\\\",\\\"raw_prompting\\\":true,\\\"return_likelihoods\\\":\\\"NONE\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"truncate\\\":\\\"END\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/generate' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"end_sequences\":[\"string\"],\"frequency_penalty\":0,\"k\":0,\"max_tokens\":0,\"model\":\"string\",\"num_generations\":0,\"p\":0,\"presence_penalty\":0,\"preset\":\"my-preset-a58sbd\",\"prompt\":\"Please explain to me how LLMs work\",\"raw_prompting\":true,\"return_likelihoods\":\"NONE\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"truncate\":\"END\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"end_sequences\":[\"string\"],\"frequency_penalty\":0,\"k\":0,\"max_tokens\":0,\"model\":\"string\",\"num_generations\":0,\"p\":0,\"presence_penalty\":0,\"preset\":\"my-preset-a58sbd\",\"prompt\":\"Please explain to me how LLMs work\",\"raw_prompting\":true,\"return_likelihoods\":\"NONE\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"truncate\":\"END\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/generate\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/generate\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"end_sequences\\\":[\\\"string\\\"],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"num_generations\\\":0,\\\"p\\\":0,\\\"presence_penalty\\\":0,\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"prompt\\\":\\\"Please explain to me how LLMs work\\\",\\\"raw_prompting\\\":true,\\\"return_likelihoods\\\":\\\"NONE\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"truncate\\\":\\\"END\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/generate', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"end_sequences\":[\"string\"],\"frequency_penalty\":0,\"k\":0,\"max_tokens\":0,\"model\":\"string\",\"num_generations\":0,\"p\":0,\"presence_penalty\":0,\"preset\":\"my-preset-a58sbd\",\"prompt\":\"Please explain to me how LLMs work\",\"raw_prompting\":true,\"return_likelihoods\":\"NONE\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"truncate\":\"END\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/generate', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"end_sequences\\\":[\\\"string\\\"],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"num_generations\\\":0,\\\"p\\\":0,\\\"presence_penalty\\\":0,\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"prompt\\\":\\\"Please explain to me how LLMs work\\\",\\\"raw_prompting\\\":true,\\\"return_likelihoods\\\":\\\"NONE\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"truncate\\\":\\\"END\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/generate\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"end_sequences\\\":[\\\"string\\\"],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"num_generations\\\":0,\\\"p\\\":0,\\\"presence_penalty\\\":0,\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"prompt\\\":\\\"Please explain to me how LLMs work\\\",\\\"raw_prompting\\\":true,\\\"return_likelihoods\\\":\\\"NONE\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"truncate\\\":\\\"END\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/generate\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"end_sequences\":[\"string\"],\"frequency_penalty\":0,\"k\":0,\"max_tokens\":0,\"model\":\"string\",\"num_generations\":0,\"p\":0,\"presence_penalty\":0,\"preset\":\"my-preset-a58sbd\",\"prompt\":\"Please explain to me how LLMs work\",\"raw_prompting\":true,\"return_likelihoods\":\"NONE\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"temperature\":0,\"truncate\":\"END\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/generate\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"end_sequences\\\":[\\\"string\\\"],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"num_generations\\\":0,\\\"p\\\":0,\\\"presence_penalty\\\":0,\\\"preset\\\":\\\"my-preset-a58sbd\\\",\\\"prompt\\\":\\\"Please explain to me how LLMs work\\\",\\\"raw_prompting\\\":true,\\\"return_likelihoods\\\":\\\"NONE\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"temperature\\\":0,\\\"truncate\\\":\\\"END\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.GenerateStream(\n\t\tcontext.TODO(),\n\t\t&cohere.GenerateStreamRequest{\n\t\t\tPrompt: \"Please explain to me how LLMs work\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.TextGeneration != nil {\n\t\t\tlog.Printf(\"%+v\", resp)\n\t\t}\n\t}\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const generate = await cohere.generate({\n    prompt: 'Please explain to me how LLMs work',\n  });\n\n  console.log(generate);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\n\nresponse = co.generate(\n    prompt=\"Please explain to me how LLMs work\",\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.generate(\n        prompt=\"Please explain to me how LLMs work\",\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.GenerateRequest;\nimport com.cohere.api.types.Generation;\n\npublic class GeneratePost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    Generation response =\n        cohere.generate(\n            GenerateRequest.builder().prompt(\"Please explain to me how LLMs work\").build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/generate \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"prompt\": \"Please explain to me how LLMs work\"\n  }'\n","name":"cURL","sdk":"curl"}],"request":{"prompt":"Please explain to me how LLMs work","stream":false},"response":{"body":{"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.\nThese 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.\n\nThe 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.\n\nWhen 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.\n\nOne 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.\n\nHowever, 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.\n\nWhile 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.\n\nIn 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."}],"id":"6afae9c2-3375-4d0e-8d18-2e9eb7f2c3ec","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":8,"output_tokens":442}},"prompt":"Please explain to me how LLMs work"}}}],"x-fern-streaming":{"response":{"properties":{"generations":{"description":"List of generated results","items":{"$ref":"#/components/schemas/SingleGeneration","type":"object","x-fern-audiences":["public"],"x-fern-type-name":"Generation-9h264n"},"type":"array","x-fern-audiences":["public"]},"id":{"type":"string","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"prompt":{"description":"Prompt used for generations.","type":"string","x-fern-audiences":["public"]}},"required":["id","generations"],"type":"object","x-fern-type-name":"Generation"},"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.","discriminator":{"mapping":{"stream-end":"#/components/schemas/GenerateStreamEnd","stream-error":"#/components/schemas/GenerateStreamError","text-generation":"#/components/schemas/GenerateStreamText"},"propertyName":"event_type"},"oneOf":[{"$ref":"#/components/schemas/GenerateStreamText"},{"$ref":"#/components/schemas/GenerateStreamEnd"},{"$ref":"#/components/schemas/GenerateStreamError"}],"x-fern-type-name":"GenerateStreamedResponse"},"stream-condition":"$request.stream","stream-description":"<Warning>\nThis 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.\n</Warning>\nGenerates realistic text conditioned on a given input.\n"}}},"/v1/models":{"get":{"description":"Returns a list of models available for use.","operationId":"list-models","parameters":[{"description":"Maximum number of models to include in a page\nDefaults to `20`, min value of `1`, max value of `1000`.","in":"query","name":"page_size","schema":{"type":"number","x-fern-audiences":["public"]}},{"description":"Page token provided in the `next_page_token` field of a previous response.","in":"query","name":"page_token","schema":{"type":"string","x-fern-audiences":["public"]}},{"description":"When provided, filters the list of models to only those that are compatible with the specified endpoint.","in":"query","name":"endpoint","schema":{"$ref":"#/components/schemas/CompatibleEndpoint","x-fern-audiences":["public"]}},{"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.","in":"query","name":"default_only","schema":{"type":"boolean","x-fern-audiences":["public"]}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListModelsResponse"}}},"description":"OK"},"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"}},"summary":"List Models","tags":["/models"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/models?default_only=true&endpoint=chat&page_size=0&page_token=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"import cohere\n\nco = cohere.Client()\nresponse = co.models.list()\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.models.list()\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.types.ListModelsResponse;\n\npublic class ModelsListGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListModelsResponse response = cohere.models().list();\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/models \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const models = await cohere.models.list();\n\n  console.log(models);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Models.List(context.TODO(), &cohere.ModelsListRequest{})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"}]}],"x-fern-sdk-group-name":"models","x-fern-sdk-method-name":"list"}},"/v1/models/{model}":{"get":{"description":"Returns the details of a model, provided its name.","operationId":"get-model","parameters":[{"in":"path","name":"model","required":true,"schema":{"example":"command-a-03-2025","type":"string","x-fern-audiences":["public"]}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetModelResponse"}}},"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"}},"summary":"Get a Model","tags":["/models"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v1/models/command-a-03-2025\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v1/models/command-a-03-2025'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v1/models/command-a-03-2025\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/models/command-a-03-2025\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/models/command-a-03-2025', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/models/command-a-03-2025', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/models/command-a-03-2025\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v1/models/command-a-03-2025\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/models/command-a-03-2025\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"from cohere import Client\n\nclient = Client()\n\nresponse = client.models.get(\n    model=\"command-a-03-2025\",\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.models.get(\n    model=\"command-a-03-2025\",\n)\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.types.GetModelResponse;\n\npublic class ModelsGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    GetModelResponse response = cohere.models().get(\"command-a-03-2025\");\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v1/models/command-a-03-2025 \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\"\n","name":"cURL","sdk":"curl"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const model = await cohere.models.get('command-a-03-2025');\n\n  console.log(model);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(\"<<apiKey>>\"))\n\n\tresp, err := co.Models.Get(context.TODO(), \"command-a-03-2025\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"}]}],"x-fern-sdk-group-name":"models","x-fern-sdk-method-name":"get"}},"/v1/rerank":{"post":{"description":"This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score.","operationId":"rerank","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"documents":{"description":"A list of document objects or strings to rerank.\nIf a document is provided the text fields is required and all other fields will be preserved in the response.\n\nThe total max chunks (length of documents * max_chunks_per_doc) must be less than 10000.\n\nWe recommend a maximum of 1,000 documents for optimal endpoint performance.","items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/RerankDocument"}]},"type":"array","x-fern-audiences":["public"]},"max_chunks_per_doc":{"default":10,"description":"The maximum number of chunks to produce internally from a document","type":"integer","x-fern-audiences":["public"]},"model":{"description":"The identifier of the model to use, eg `rerank-v3.5`.","type":"string","x-fern-audiences":["public"]},"query":{"description":"The search query","type":"string","x-fern-audiences":["public"]},"rank_fields":{"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.","items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"return_documents":{"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.\n- 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.","type":"boolean","x-fern-audiences":["public"]},"top_n":{"description":"The number of most relevant documents or indices to return, defaults to the length of the documents","minimum":1,"type":"integer","x-fern-audiences":["public"]}},"required":["documents","query"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"RerankRequest"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"results":{"description":"An ordered list of ranked documents","items":{"properties":{"document":{"description":"If `return_documents` is set as `false` this will return none, if `true` it will return the documents passed in","properties":{"text":{"description":"The text of the document to rerank","type":"string","x-fern-audiences":["public"]}},"required":["text"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"RerankResponseResultsItemDocument"},"index":{"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)","type":"integer","x-fern-audiences":["public"]},"relevance_score":{"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","format":"float","type":"number","x-fern-audiences":["public"]}},"required":["index","relevance_score"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"RerankResponseResultsItem"},"type":"array","x-fern-audiences":["public"]}},"required":["results"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"RerankResponse"}}},"description":"OK"},"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"}},"summary":"Rerank API (v1)","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/rerank\");\nrequest.Content = new StringContent(\"{\\\"documents\\\":[{\\\"text\\\":\\\"string\\\"}],\\\"max_chunks_per_doc\\\":10,\\\"model\\\":\\\"string\\\",\\\"query\\\":\\\"string\\\",\\\"rank_fields\\\":[\\\"string\\\"],\\\"return_documents\\\":false,\\\"top_n\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/rerank' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"documents\":[{\"text\":\"string\"}],\"max_chunks_per_doc\":10,\"model\":\"string\",\"query\":\"string\",\"rank_fields\":[\"string\"],\"return_documents\":false,\"top_n\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"documents\":[{\"text\":\"string\"}],\"max_chunks_per_doc\":10,\"model\":\"string\",\"query\":\"string\",\"rank_fields\":[\"string\"],\"return_documents\":false,\"top_n\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/rerank\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/rerank\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"documents\\\":[{\\\"text\\\":\\\"string\\\"}],\\\"max_chunks_per_doc\\\":10,\\\"model\\\":\\\"string\\\",\\\"query\\\":\\\"string\\\",\\\"rank_fields\\\":[\\\"string\\\"],\\\"return_documents\\\":false,\\\"top_n\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/rerank', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"documents\":[{\"text\":\"string\"}],\"max_chunks_per_doc\":10,\"model\":\"string\",\"query\":\"string\",\"rank_fields\":[\"string\"],\"return_documents\":false,\"top_n\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/rerank', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"documents\\\":[{\\\"text\\\":\\\"string\\\"}],\\\"max_chunks_per_doc\\\":10,\\\"model\\\":\\\"string\\\",\\\"query\\\":\\\"string\\\",\\\"rank_fields\\\":[\\\"string\\\"],\\\"return_documents\\\":false,\\\"top_n\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/rerank\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"documents\\\":[{\\\"text\\\":\\\"string\\\"}],\\\"max_chunks_per_doc\\\":10,\\\"model\\\":\\\"string\\\",\\\"query\\\":\\\"string\\\",\\\"rank_fields\\\":[\\\"string\\\"],\\\"return_documents\\\":false,\\\"top_n\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/rerank\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"documents\":[{\"text\":\"string\"}],\"max_chunks_per_doc\":10,\"model\":\"string\",\"query\":\"string\",\"rank_fields\":[\"string\"],\"return_documents\":false,\"top_n\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/rerank\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"documents\\\":[{\\\"text\\\":\\\"string\\\"}],\\\"max_chunks_per_doc\\\":10,\\\"model\\\":\\\"string\\\",\\\"query\\\":\\\"string\\\",\\\"rank_fields\\\":[\\\"string\\\"],\\\"return_documents\\\":false,\\\"top_n\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Rerank(\n\t\tcontext.TODO(),\n\t\t&cohere.RerankRequest{\n\t\t\tQuery: \"What is the capital of the United States?\",\n\t\t\tDocuments: []*cohere.RerankRequestDocumentsItem{\n\t\t\t\t{String: \"Carson City is the capital city of the American state of Nevada.\"},\n\t\t\t\t{String: \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\"},\n\t\t\t\t{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.\"},\n\t\t\t\t{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.\"},\n\t\t\t},\n\t\t\tModel: cohere.String(\"rerank-v4.0-pro\"),\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const rerank = await cohere.rerank({\n    documents: [\n      { text: 'Carson City is the capital city of the American state of Nevada.' },\n      {\n        text: 'The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.',\n      },\n      {\n        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.',\n      },\n      {\n        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.',\n      },\n      {\n        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.',\n      },\n    ],\n    query: 'What is the capital of the United States?',\n    topN: 3,\n    model: 'rerank-v4.0-pro',\n  });\n\n  console.log(rerank);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\n\ndocs = [\n    \"Carson City is the capital city of the American state of Nevada.\",\n    \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n    \"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.\",\n    \"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.\",\n    \"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.\",\n]\n\nresponse = co.rerank(\n    model=\"rerank-v4.0-pro\",\n    query=\"What is the capital of the United States?\",\n    documents=docs,\n    top_n=3,\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\nasync def main():\n    response = await co.rerank(\n        model=\"rerank-v4.0-pro\",\n        query=\"What is the capital of the United States?\",\n        documents=[\n            \"Carson City is the capital city of the American state of Nevada.\",\n            \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n            \"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.\",\n            \"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.\",\n            \"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.\",\n        ],\n        top_n=3,\n    )\n    print(response)\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.RerankRequest;\nimport com.cohere.api.types.RerankRequestDocumentsItem;\nimport com.cohere.api.types.RerankResponse;\nimport java.util.List;\n\npublic class RerankPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    RerankResponse response =\n        cohere.rerank(\n            RerankRequest.builder()\n                .query(\"What is the capital of the United States?\")\n                .documents(\n                    List.of(\n                        RerankRequestDocumentsItem.of(\n                            \"Carson City is the capital city of the\"\n                                + \" American state of Nevada.\"),\n                        RerankRequestDocumentsItem.of(\n                            \"The Commonwealth of the Northern Mariana\"\n                                + \" Islands is a group of islands in\"\n                                + \" the Pacific Ocean. Its capital is\"\n                                + \" Saipan.\"),\n                        RerankRequestDocumentsItem.of(\n                            \"Capitalization or capitalisation in\"\n                                + \" English grammar is the use of a\"\n                                + \" capital letter at the start of a\"\n                                + \" word. English usage varies from\"\n                                + \" capitalization in other\"\n                                + \" languages.\"),\n                        RerankRequestDocumentsItem.of(\n                            \"Washington, D.C. (also known as simply\"\n                                + \" Washington or D.C., and officially\"\n                                + \" as the District of Columbia) is the\"\n                                + \" capital of the United States. It is\"\n                                + \" a federal district.\"),\n                        RerankRequestDocumentsItem.of(\n                            \"Capital punishment has\"\n                                + \" existed in the United States since\"\n                                + \" beforethe United States was a\"\n                                + \" country. As of 2017, capital\"\n                                + \" punishment is legal in 30 of the 50\"\n                                + \" states.\")))\n                .model(\"rerank-english-v3.5\")\n                .topN(3)\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/rerank \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"rerank-v4.0-pro\",\n    \"query\": \"What is the capital of the United States?\",\n    \"top_n\": 3,\n    \"documents\": [\"Carson City is the capital city of the American state of Nevada.\",\n                  \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n                  \"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.\",\n                  \"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.\",\n                  \"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.\"]\n  }'\n","name":"cURL","sdk":"curl"}],"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."}],"model":"rerank-v4.0-pro","query":"What is the capital of the United States?","top_n":3},"response":{"body":{"id":"8bc745a3-7871-4597-822e-18c95d5df48c","meta":{"api_version":{"version":"1"},"billed_units":{"search_units":1}},"results":[{"index":3,"relevance_score":0.999071},{"index":4,"relevance_score":0.7867867},{"index":0,"relevance_score":0.32713068}]}}}]}},"/v1/summarize":{"post":{"deprecated":true,"description":"<Warning>\nThis 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.\n</Warning>\nGenerates a summary in English for a given text.\n","operationId":"summarize","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"additional_command":{"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\"","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"extractiveness":{"default":"low","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.","enum":["low","medium","high"],"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"format":{"default":"paragraph","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.","enum":["paragraph","bullets"],"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"length":{"default":"medium","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.","enum":["short","medium","long"],"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"model":{"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.","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"temperature":{"default":0.3,"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.","maximum":5,"minimum":0,"type":"number","writeOnly":true,"x-fern-audiences":["public"]},"text":{"description":"The text to generate a summary for. Can be up to 100,000 characters long. Currently the only supported language is English.","maxLength":50000,"minLength":250,"type":"string","writeOnly":true,"x-fern-audiences":["public"]}},"required":["text"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"SummarizeRequest"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"description":"Generated ID for the summary","type":"string","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"summary":{"description":"Generated summary for the text","type":"string","x-fern-audiences":["public"]}},"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"SummarizeResponse"}}},"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"}},"summary":"Summarize","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/summarize\");\nrequest.Content = new StringContent(\"{\\\"additional_command\\\":\\\"string\\\",\\\"extractiveness\\\":\\\"low\\\",\\\"format\\\":\\\"paragraph\\\",\\\"length\\\":\\\"medium\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0.3,\\\"text\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/summarize' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"additional_command\":\"string\",\"extractiveness\":\"low\",\"format\":\"paragraph\",\"length\":\"medium\",\"model\":\"string\",\"temperature\":0.3,\"text\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"additional_command\":\"string\",\"extractiveness\":\"low\",\"format\":\"paragraph\",\"length\":\"medium\",\"model\":\"string\",\"temperature\":0.3,\"text\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/summarize\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/summarize\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"additional_command\\\":\\\"string\\\",\\\"extractiveness\\\":\\\"low\\\",\\\"format\\\":\\\"paragraph\\\",\\\"length\\\":\\\"medium\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0.3,\\\"text\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/summarize', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"additional_command\":\"string\",\"extractiveness\":\"low\",\"format\":\"paragraph\",\"length\":\"medium\",\"model\":\"string\",\"temperature\":0.3,\"text\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/summarize', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"additional_command\\\":\\\"string\\\",\\\"extractiveness\\\":\\\"low\\\",\\\"format\\\":\\\"paragraph\\\",\\\"length\\\":\\\"medium\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0.3,\\\"text\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/summarize\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"additional_command\\\":\\\"string\\\",\\\"extractiveness\\\":\\\"low\\\",\\\"format\\\":\\\"paragraph\\\",\\\"length\\\":\\\"medium\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0.3,\\\"text\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/summarize\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"additional_command\":\"string\",\"extractiveness\":\"low\",\"format\":\"paragraph\",\"length\":\"medium\",\"model\":\"string\",\"temperature\":0.3,\"text\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/summarize\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"additional_command\\\":\\\"string\\\",\\\"extractiveness\\\":\\\"low\\\",\\\"format\\\":\\\"paragraph\\\",\\\"length\\\":\\\"medium\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0.3,\\\"text\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Summarize(\n\t\tcontext.TODO(),\n\t\t&cohere.SummarizeRequest{\n\t\t\tText: \"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\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const summarize = await cohere.summarize({\n    text:\n      'Ice cream is a sweetened frozen food typically eaten as a snack or dessert. ' +\n      'It may be made from milk or cream and is flavoured with a sweetener, ' +\n      'either sugar or an alternative, and a spice, such as cocoa or vanilla, ' +\n      'or with fruit such as strawberries or peaches. ' +\n      'It can also be made by whisking a flavored cream base and liquid nitrogen together. ' +\n      'Food coloring is sometimes added, in addition to stabilizers. ' +\n      'The mixture is cooled below the freezing point of water and stirred to incorporate air spaces ' +\n      'and to prevent detectable ice crystals from forming. The result is a smooth, ' +\n      'semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). ' +\n      'It becomes more malleable as its temperature increases.\\n\\n' +\n      'The meaning of the name \"ice cream\" varies from one country to another. ' +\n      'In some countries, such as the United States, \"ice cream\" applies only to a specific variety, ' +\n      'and most governments regulate the commercial use of the various terms according to the ' +\n      'relative quantities of the main ingredients, notably the amount of cream. ' +\n      'Products that do not meet the criteria to be called ice cream are sometimes labelled ' +\n      '\"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, ' +\n      'one word is used fo\\r all variants. Analogues made from dairy alternatives, ' +\n      \"such as goat's or sheep's milk, or milk substitutes \" +\n      '(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are ' +\n      'lactose intolerant, allergic to dairy protein or vegan.',\n  });\n\n  console.log(summarize);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\n\ntext = (\n    \"Ice cream is a sweetened frozen food typically eaten as a snack or dessert. \"\n    \"It may be made from milk or cream and is flavoured with a sweetener, \"\n    \"either sugar or an alternative, and a spice, such as cocoa or vanilla, \"\n    \"or with fruit such as strawberries or peaches. \"\n    \"It can also be made by whisking a flavored cream base and liquid nitrogen together. \"\n    \"Food coloring is sometimes added, in addition to stabilizers. \"\n    \"The mixture is cooled below the freezing point of water and stirred to incorporate air spaces \"\n    \"and to prevent detectable ice crystals from forming. The result is a smooth, \"\n    \"semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). \"\n    \"It becomes more malleable as its temperature increases.\\n\\n\"\n    'The meaning of the name \"ice cream\" varies from one country to another. '\n    'In some countries, such as the United States, \"ice cream\" applies only to a specific variety, '\n    \"and most governments regulate the commercial use of the various terms according to the \"\n    \"relative quantities of the main ingredients, notably the amount of cream. \"\n    \"Products that do not meet the criteria to be called ice cream are sometimes labelled \"\n    '\"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, '\n    \"one word is used fo\\r all variants. Analogues made from dairy alternatives, \"\n    \"such as goat's or sheep's milk, or milk substitutes \"\n    \"(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are \"\n    \"lactose intolerant, allergic to dairy protein or vegan.\"\n)\n\nresponse = co.summarize(\n    text=text,\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\ntext = (\n    \"Ice cream is a sweetened frozen food typically eaten as a snack or dessert. \"\n    \"It may be made from milk or cream and is flavoured with a sweetener, \"\n    \"either sugar or an alternative, and a spice, such as cocoa or vanilla, \"\n    \"or with fruit such as strawberries or peaches. \"\n    \"It can also be made by whisking a flavored cream base and liquid nitrogen together. \"\n    \"Food coloring is sometimes added, in addition to stabilizers. \"\n    \"The mixture is cooled below the freezing point of water and stirred to incorporate air spaces \"\n    \"and to prevent detectable ice crystals from forming. The result is a smooth, \"\n    \"semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F). \"\n    \"It becomes more malleable as its temperature increases.\\n\\n\"\n    'The meaning of the name \"ice cream\" varies from one country to another. '\n    'In some countries, such as the United States, \"ice cream\" applies only to a specific variety, '\n    \"and most governments regulate the commercial use of the various terms according to the \"\n    \"relative quantities of the main ingredients, notably the amount of cream. \"\n    \"Products that do not meet the criteria to be called ice cream are sometimes labelled \"\n    '\"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina, '\n    \"one word is used fo\\r all variants. Analogues made from dairy alternatives, \"\n    \"such as goat's or sheep's milk, or milk substitutes \"\n    \"(e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are \"\n    \"lactose intolerant, allergic to dairy protein or vegan.\"\n)\n\n\nasync def main():\n    response = await co.summarize(\n        text=text,\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.SummarizeRequest;\nimport com.cohere.api.types.SummarizeResponse;\n\npublic class SummarizePost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    SummarizeResponse response =\n        cohere.summarize(\n            SummarizeRequest.builder()\n                .text(\n                    \"\"\"\n                              Ice cream is a sweetened frozen food typically eaten as a snack or dessert.\\s\n                              It may be made from milk or cream and is flavoured with a sweetener,\\s\n                              either sugar or an alternative, and a spice, such as cocoa or vanilla,\\s\n                              or with fruit such as strawberries or peaches.\\s\n                              It can also be made by whisking a flavored cream base and liquid nitrogen together.\\s\n                              Food coloring is sometimes added, in addition to stabilizers.\\s\n                              The mixture is cooled below the freezing point of water and stirred to incorporate air spaces\\s\n                              and to prevent detectable ice crystals from forming. The result is a smooth,\\s\n                              semi-solid foam that is solid at very low temperatures (below 2 °C or 35 °F).\\s\n                              It becomes more malleable as its temperature increases.\\\\n\\\\n\n                              The meaning of the name \"ice cream\" varies from one country to another.\\s\n                              In some countries, such as the United States, \"ice cream\" applies only to a specific variety,\\s\n                              and most governments regulate the commercial use of the various terms according to the\\s\n                              relative quantities of the main ingredients, notably the amount of cream.\\s\n                              Products that do not meet the criteria to be called ice cream are sometimes labelled\\s\n                              \"frozen dairy dessert\" instead. In other countries, such as Italy and Argentina,\\s\n                              one word is used fo\\\\r all variants. Analogues made from dairy alternatives,\\s\n                              such as goat's or sheep's milk, or milk substitutes\\s\n                              (e.g., soy, cashew, coconut, almond milk or tofu), are available for those who are\\s\n                              lactose intolerant, allergic to dairy protein or vegan.\n                        \"\"\")\n                .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/summarize \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"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.\"\n  }'\n","name":"cURL","sdk":"curl"}],"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.\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 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","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":321,"output_tokens":55}},"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."}}}]}},"/v1/tokenize":{"post":{"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.","operationId":"tokenize","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"examples":{"Example":{"value":{"model":"command","text":"tokenize me! :D"}}},"schema":{"properties":{"model":{"description":"The input will be tokenized by the tokenizer that is used by this model.","type":"string","x-fern-audiences":["public"]},"text":{"description":"The string to be tokenized, the minimum text length is 1 character, and the maximum text length is 65536 characters.","maxLength":65536,"minLength":1,"type":"string","x-fern-audiences":["public"]}},"required":["model","text"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"TokenizeRequest"}}},"description":""},"responses":{"200":{"content":{"application/json":{"examples":{"Example":{"value":{"meta":{"api_version":{"version":"1"}},"token_strings":["token","ize'"," me","!"," :","D"],"tokens":[34160,974,514,34,1420,69]}}},"schema":{"properties":{"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"token_strings":{"items":{"type":"string","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]},"tokens":{"description":"An array of tokens, where each token is an integer.","items":{"type":"integer","x-fern-audiences":["public"]},"type":"array","x-fern-audiences":["public"]}},"required":["token_strings","tokens"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"TokenizeResponse"}}},"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"}},"summary":"Tokenize","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v1/tokenize\");\nrequest.Content = new StringContent(\"{\\\"model\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v1/tokenize' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"model\":\"string\",\"text\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"model\":\"string\",\"text\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v1/tokenize\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v1/tokenize\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"model\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v1/tokenize', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"model\":\"string\",\"text\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v1/tokenize', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"model\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v1/tokenize\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"model\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v1/tokenize\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"model\":\"string\",\"text\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v1/tokenize\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"model\\\":\\\"string\\\",\\\"text\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Tokenize(\n\t\tcontext.TODO(),\n\t\t&cohere.TokenizeRequest{\n\t\t\tText:  \"cohere <3\",\n\t\t\tModel: \"base\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const tokenize = await cohere.tokenize({\n    text: 'tokenize me! :D',\n    model: 'command', // optional\n  });\n\n  console.log(tokenize);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.Client()\n\nresponse = co.tokenize(\n    text=\"tokenize me! :D\", model=\"command-a-03-2025\"\n)  # optional\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.tokenize(text=\"tokenize me! :D\", model=\"command-a-03-2025\")\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.requests.TokenizeRequest;\nimport com.cohere.api.types.TokenizeResponse;\n\npublic class TokenizePost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    TokenizeResponse response =\n        cohere.tokenize(\n            TokenizeRequest.builder().text(\"tokenize me\").model(\"command-a-03-2025\").build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const tokenize = await cohere.tokenize({\n    text: 'tokenize me! :D',\n    model: 'command', // optional\n  });\n\n  console.log(tokenize);\n})();\n","name":"Cohere Node.js SDK","sdk":"typescript"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v1/tokenize \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-03-2025\",\n    \"text\": \"tokenize me! :D\"\n  }'\n","name":"cURL","sdk":"curl"}],"request":{"model":"command","text":"tokenize me! :D"},"response":{"body":{"meta":{"api_version":{"version":"1"}},"token_strings":["token","ize"," me","!"," :","D"],"tokens":[10002,2261,2012,8,2792,43]}}}]}},"/v2/audio/transcriptions":{"post":{"description":"Transcribe an audio file.","operationId":"create-transcription","requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"The audio file object to transcribe. Supported file extensions are flac, mp3, mpeg, mpga, ogg, and wav.","format":"binary","type":"string","x-fern-audiences":["public"]},"language":{"description":"The language of the input audio, supplied in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) format.","type":"string","x-fern-audiences":["public"]},"model":{"description":"ID of the model to use.","type":"string","x-fern-audiences":["public"]},"temperature":{"description":"The sampling temperature, between 0 and 1. Higher values like 0.8 make the output more random, while lower values like 0.2 make it more focused and deterministic.","type":"number","x-fern-audiences":["public"]}},"required":["file","language","model"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"AudioTranscriptionsCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"text":{"description":"The transcribed text.","type":"string","x-fern-audiences":["public"]}},"required":["text"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"AudioTranscriptionsCreateResponse"}}},"description":"A successful response."},"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"}},"summary":"Create a transcription","tags":["/audio/transcriptions"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v2/audio/transcriptions\");\nrequest.Content = new StringContent(\"{\\\"file\\\":\\\"binary\\\",\\\"language\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v2/audio/transcriptions' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"file\":\"binary\",\"language\":\"string\",\"model\":\"string\",\"temperature\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"file\":\"binary\",\"language\":\"string\",\"model\":\"string\",\"temperature\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v2/audio/transcriptions\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/audio/transcriptions\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"file\\\":\\\"binary\\\",\\\"language\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/audio/transcriptions', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"file\":\"binary\",\"language\":\"string\",\"model\":\"string\",\"temperature\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/audio/transcriptions', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"file\\\":\\\"binary\\\",\\\"language\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/audio/transcriptions\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"file\\\":\\\"binary\\\",\\\"language\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v2/audio/transcriptions\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"file\":\"binary\",\"language\":\"string\",\"model\":\"string\",\"temperature\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/audio/transcriptions\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"file\\\":\\\"binary\\\",\\\"language\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"temperature\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"//go:build ignore\n// +build ignore\n\npackage main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\taudio \"github.com/cohere-ai/cohere-go/v2/audio\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tfile, err := os.Open(\"./sample.wav\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer file.Close()\n\n\ttranscription, err := co.Audio.Transcriptions.Create(\n\t\tcontext.TODO(),\n\t\t&audio.CreateTranscriptionsRequest{\n\t\t\tFile:     file,\n\t\t\tModel:    \"cohere-transcribe-03-2026\",\n\t\t\tLanguage: \"en\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", transcription)\n}\n","name":"Cohere Go SDK","sdk":"go"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\ntranscription = co.audio.transcriptions.create(\n    model=\"cohere-transcribe-03-2026\",\n    language=\"en\",\n    file=open(\"./sample.wav\", \"rb\"),\n)\n\nprint(transcription)\n","name":"Sync","sdk":"python"},{"code":"import asyncio\nimport cohere\n\nco = cohere.AsyncClientV2()\n\n\nasync def main():\n    transcription = await co.audio.transcriptions.create(\n        model=\"cohere-transcribe-03-2026\",\n        language=\"en\",\n        file=open(\"./sample.wav\", \"rb\"),\n    )\n\n    print(transcription)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.audio.transcriptions.requests.TranscriptionsCreateRequest;\nimport com.cohere.api.resources.audio.transcriptions.types.AudioTranscriptionsCreateResponse;\nimport java.io.File;\n\npublic class TranscriptionsPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    AudioTranscriptionsCreateResponse response =\n        cohere\n            .audio()\n            .transcriptions()\n            .create(\n                new File(\"./sample.wav\"),\n                TranscriptionsCreateRequest.builder()\n                    .model(\"cohere-transcribe-03-2026\")\n                    .language(\"en\")\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"import { CohereClientV2 } from 'cohere-ai';\nimport fs from 'fs';\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const fileBuffer = fs.readFileSync('./sample.wav');\n  const file = new File([fileBuffer], 'sample.wav');\n\n  const response = await cohere.audio.transcriptions.create(file, {\n    model: 'cohere-transcribe-03-2026',\n    language: 'en',\n  });\n\n  console.log(response.text);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/audio/transcriptions \\\n  --header \"Authorization: Bearer $CO_API_KEY\" \\\n  --form model=cohere-transcribe-03-2026 \\\n  --form language=en \\\n  --form file=@./sample.wav\n","name":"cURL","sdk":"curl"}]}],"x-fern-sdk-group-name":["audio","transcriptions"],"x-fern-sdk-method-name":"create"}},"/v2/batches":{"get":{"description":"List the batches for the current user","operationId":"ListBatches","parameters":[{"description":"The maximum number of batches to return. The service may return fewer than\nthis value.\nIf unspecified, at most 50 batches will be returned.\nThe maximum value is 1000; values above 1000 will be coerced to 1000.","in":"query","name":"page_size","required":false,"schema":{"format":"int32","type":"integer"}},{"description":"A page token, received from a previous `ListBatches` call.\nProvide this to retrieve the subsequent page.","in":"query","name":"page_token","required":false,"schema":{"type":"string"}},{"description":"Batches can be ordered by creation time or last updated time.\nUse `created_at` for creation time or `updated_at` for last updated time.","in":"query","name":"order_by","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"example":{"batches":[{"creator_id":"b5e1ffb9-49a1-4653-9927-94083316309d","id":"9439e0e3-49a4-4336-93e3-485fc420bc18","input_dataset_id":"my-requests-dataset","model":"command","name":"my-batch","num_records":5000,"org_id":"62603116-1750-4c04-b1b6-9d5046764bc4","status":"BATCH_STATUS_IN_PROGRESS"}]},"schema":{"$ref":"#/components/schemas/ListBatchesResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Status Service Unavailable"}},"summary":"List batches","tags":["/batches"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/batches?order_by=string&page_size=0&page_token=string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"import cohere\n\nco = cohere.ClientV2()\n\nbatches = co.batches.list()","name":"Default","sdk":"python"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const batches = await cohere.batches.list();\n  console.log(batches);\n})();\n","name":"Default","sdk":"typescript"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Batches.List(\n\t\tcontext.TODO(),\n\t\t&cohere.BatchesListBatchesRequest{})\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Default","sdk":"go"},{"code":"import com.cohere.api.Cohere;\nimport com.cohere.api.resources.batches.types.ListBatchesResponse;\n\npublic class BatchGet {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ListBatchesResponse response = cohere.batches().list();\n\n    System.out.println(response);\n  }\n}","name":"Default","sdk":"java"},{"code":"curl --request GET \\\n  --url https://api.cohere.com/v2/batches \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: Bearer $CO_API_KEY\"\n","name":"Default","sdk":"curl"}]}],"x-fern-request-name":"batchesListBatchesRequest","x-fern-sdk-group-name":"batches","x-fern-sdk-method-name":"list"},"post":{"description":"Creates and executes a batch from an uploaded dataset of requests","operationId":"CreateBatch","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Batch"}}},"description":"Information about the batch. Must contain name, input_dataset_id, and\nmodel. Output-only fields are ignored.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBatchResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Status Service Unavailable"}},"summary":"Create a batch","tags":["/batches"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v2/batches\");\nrequest.Content = new StringContent(\"{\\\"input_dataset_id\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v2/batches' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"input_dataset_id\":\"string\",\"model\":\"string\",\"name\":\"string\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"input_dataset_id\":\"string\",\"model\":\"string\",\"name\":\"string\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v2/batches\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/batches\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"input_dataset_id\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/batches', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"input_dataset_id\":\"string\",\"model\":\"string\",\"name\":\"string\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/batches', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"input_dataset_id\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/batches\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"input_dataset_id\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v2/batches\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"input_dataset_id\":\"string\",\"model\":\"string\",\"name\":\"string\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/batches\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"input_dataset_id\\\":\\\"string\\\",\\\"model\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"import cohere\n\nco = cohere.ClientV2()\n\nbatch_job = co.batches.create(\n    name=\"<batch_job_name>\",\n    input_dataset_id=\"<input_dataset_id>\",\n    model=\"<model_name>\",\n)\n","name":"Default","sdk":"python"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const batchJob = await cohere.batches.create({\n    name: '<my_job_name>',\n    inputDatasetId: '<input_dataset_id>',\n    model: '<model_name>',\n  });\n\n  console.log(batchJob);\n})();\n","name":"Default","sdk":"typescript"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Batches.Create(\n\t\tcontext.TODO(),\n\t\t&cohere.Batch{\n\t\t\tName:           \"<batch_job_name>\",\n\t\t\tInputDatasetId: \"<input_dataset_id>\",\n\t\t\tModel:          \"<model_name>\",\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Default","sdk":"go"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.batches.types.CreateBatchResponse;\nimport com.cohere.api.resources.batches.types.Batch;\n\npublic class BatchPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    CreateBatchResponse response =\n        cohere\n            .batches()\n            .create(\n                Batch.builder()\n                    .name(\"<batch_job_name>\")\n                    .inputDatasetId(\"<input_dataset_id>\")\n                    .model(\"<model_name>\")\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Default","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/batches/v2/batches \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: Bearer $CO_API_KEY\" \\\n  --data '{\n          \"name\": \"<batch_job_name>\",\n          \"input_dataset_id\": \"<dataset_id>\",\n          \"model\": \"<model_name>\"\n  }'\n","name":"Default","sdk":"curl"}]}],"x-fern-sdk-group-name":"batches","x-fern-sdk-method-name":"create"}},"/v2/batches/{id}":{"get":{"description":"Retrieves a batch","operationId":"GetBatch","parameters":[{"description":"The batch ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"example":{"batch":{"created_at":"2025-03-05T14:59:25.438936Z","creator_id":"b5e1ffb9-49a1-4653-9927-94083316309d","id":"9439e0e3-49a4-4336-93e3-485fc420bc18","input_dataset_id":"my-requests-dataset","input_tokens":"0","model":"batch-command","name":"my-batch","num_failed_records":0,"num_records":5000,"num_successful_records":8,"org_id":"62603116-1750-4c04-b1b6-9d5046764bc4","output_dataset_id":"my-batch-output-c2waz1","output_tokens":"0","status":"BATCH_STATUS_IN_PROGRESS","updated_at":"2025-03-05T15:00:26.126572Z"}},"schema":{"$ref":"#/components/schemas/GetBatchResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Status Service Unavailable"}},"summary":"Retrieve a batch","tags":["/batches"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Get, \"https://api.cohere.com/v2/batches/string\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X GET 'https://api.cohere.com/v2/batches/string'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"GET\", \"https://api.cohere.com/v2/batches/string\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/batches/string\"))\n    .method(\"GET\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/batches/string', { method: 'GET' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/batches/string', { method: 'GET' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/batches/string\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"GET\", \"https://api.cohere.com/v2/batches/string\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/batches/string\")\nrequest = Net::HTTPGenericRequest.new(\"GET\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"import cohere\n\nco = cohere.ClientV2()\n\nbatch_job = co.batches.retrieve(\"<batch_job_id>\")","name":"Default","sdk":"python"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const batchJob = await cohere.batches.retrieve('<batch_job_id>');\n  console.log(batchJob);\n})();\n","name":"Default","sdk":"typescript"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.Batches.Retrieve(context.TODO(), \"<batch_job_id>\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Default","sdk":"go"},{"code":"import com.cohere.api.Cohere;\nimport com.cohere.api.resources.batches.types.GetBatchResponse;\n\npublic class BatchGetId {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    GetBatchResponse response = cohere.batches().retrieve(\"<batch_job_id>\");\n\n    System.out.println(response);\n  }\n}","name":"Default","sdk":"java"},{"code":"curl --request GET \\\n  --url 'https://api.cohere.com/v2/batches/<batch_job_id>' \\\n  --header 'accept: application/json' \\\n  --header \"Authorization: Bearer $CO_API_KEY\"\n","name":"Default","sdk":"curl"}]}],"x-fern-sdk-group-name":"batches","x-fern-sdk-method-name":"retrieve"}},"/v2/batches/{id}:cancel":{"post":{"description":"Cancels an in-progress batch","operationId":"CancelBatch","parameters":[{"description":"The batch ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestSource"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelBatchResponse"}}},"description":"A successful response."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Internal Server Error"},"503":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchError"}}},"description":"Status Service Unavailable"}},"summary":"Cancel a batch","tags":["/batches"],"x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v2/batches/string:cancel\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v2/batches/string:cancel'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v2/batches/string:cancel\", nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/batches/string:cancel\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/batches/string:cancel', { method: 'POST' });\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/batches/string:cancel', { method: 'POST' });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/batches/string:cancel\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\"POST\", \"https://api.cohere.com/v2/batches/string:cancel\")\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/batches/string:cancel\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", false, true, uri)\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["public"],"x-fern-examples":[{"code-samples":[{"code":"import cohere\n\nco = cohere.ClientV2()\n\nbatch_job = co.batches.cancel(\"<batch_job_id>\")","name":"Default","sdk":"python"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const batchJob = await cohere.batches.cancel('<batch_job_id>');\n  console.log(batchJob);\n})();\n","name":"Default","sdk":"typescript"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\t_, err := co.Batches.Cancel(context.TODO(), \"<batch_job_id>\")\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n","name":"Default","sdk":"go"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\n\npublic class BatchPostCancel {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    cohere.batches().cancel(\"<batch_job_id>\");\n  }\n}","name":"Default","sdk":"java"},{"code":"curl --request POST \\\n  --url 'https://api.cohere.com/v2/batches/<batch_job_id>:cancel' \\\n  --header \"Authorization: Bearer $CO_API_KEY\"\n","name":"Default","sdk":"curl"}]}],"x-fern-sdk-group-name":"batches","x-fern-sdk-method-name":"cancel"}},"/v2/chat":{"post":{"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).\n\nFollow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.\n","operationId":"chatv2","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"citation_options":{"$ref":"#/components/schemas/CitationOptions","x-fern-audiences":["public"]},"documents":{"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.\n","items":{"oneOf":[{"type":"string"},{"$ref":"#/components/schemas/Document"}]},"type":"array","x-fern-audiences":["public"]},"frequency_penalty":{"description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\nUsed 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.\n","format":"float","type":"number","x-fern-audiences":["public"]},"k":{"default":0,"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.\nDefaults to `0`, min value of `0`, max value of `500`.\n","maximum":500,"minimum":0,"type":"integer","x-fern-audiences":["public"]},"logprobs":{"description":"Defaults to `false`. When set to `true`, the log probabilities of the generated tokens will be included in the response.\n","type":"boolean","x-fern-audiences":["public"]},"max_tokens":{"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).\n\n**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\"`.\n\n**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.\n","type":"integer","x-fern-audiences":["public"]},"messages":{"$ref":"#/components/schemas/ChatMessages","x-fern-audiences":["public"]},"model":{"description":"The name of a compatible [Cohere model](https://docs.cohere.com/v2/docs/models).","type":"string","x-fern-audiences":["public"]},"p":{"default":0.75,"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`.\nDefaults to `0.75`. min value of `0.01`, max value of `0.99`.\n","format":"float","maximum":0.99,"minimum":0.01,"type":"number","x-fern-audiences":["public"]},"presence_penalty":{"description":"Defaults to `0.0`, min value of `0.0`, max value of `1.0`.\nUsed 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.\n","format":"float","type":"number","x-fern-audiences":["public"]},"priority":{"default":0,"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.","maximum":999,"minimum":0,"type":"integer","x-fern-audiences":["public"]},"response_format":{"$ref":"#/components/schemas/ResponseFormatV2","x-fern-audiences":["public"]},"safety_mode":{"description":"Used to select the [safety instruction](https://docs.cohere.com/v2/docs/safety-modes) inserted into the prompt. Defaults to `CONTEXTUAL`.\nWhen `OFF` is specified, the safety instruction will be omitted.\n\nSafety modes are not yet configurable in combination with `tools` and `documents` parameters.\n\n**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).\n\n**Note**: `command-r7b-12-2024` and newer models only support `\"CONTEXTUAL\"` and `\"STRICT\"` modes.\n","enum":["CONTEXTUAL","STRICT","OFF"],"x-fern-audiences":["public"]},"seed":{"description":"If specified, the backend will make a best effort to sample tokens\ndeterministically, such that repeated requests with the same\nseed and parameters should return the same result. However,\ndeterminism cannot be totally guaranteed.\n","maximum":{"$doctorine.bigint":"18446744073709552000"},"minimum":0,"type":"integer","x-fern-audiences":["public"]},"stop_sequences":{"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.\n","items":{"type":"string"},"type":"array","x-fern-audiences":["public"]},"stream":{"description":"Defaults to `false`.\n\nWhen `true`, the response will be a SSE stream of events.\n\nStreaming is beneficial for user interfaces that render the contents of the response piece by piece, as it gets generated.\n","type":"boolean","x-fern-audiences":["public"]},"strict_tools":{"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).\n\n**Note**: The first few requests with a new set of tools will take longer to process.\n","type":"boolean","x-fern-audiences":["public"],"x-fern-availability":"beta"},"temperature":{"description":"Defaults to `0.3`.\n\nA non-negative float that tunes the degree of randomness in generation. Lower temperatures mean less random generations, and higher temperatures mean more random generations.\n\nRandomness can be further maximized by increasing the  value of the `p` parameter.\n","format":"float","maximum":1,"minimum":0,"type":"number","x-fern-audiences":["public"]},"thinking":{"$ref":"#/components/schemas/Thinking","x-fern-audiences":["public"]},"tool_choice":{"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.\nWhen `NONE` is specified, the model will be forced **not** to use one of the specified tools, and give a direct response.\nIf tool_choice isn't specified, then the model is free to choose whether to use the specified tools or not.\n\n**Note**: This parameter is only compatible with models [Command-r7b](https://docs.cohere.com/v2/docs/command-r7b) and newer.\n","enum":["REQUIRED","NONE"],"x-fern-audiences":["public"]},"tools":{"description":"A list of tools (functions) available to the model. The model response may contain 'tool_calls' to the specified tools.\n\nLearn more in the [Tool Use guide](https://docs.cohere.com/docs/tools).\n","items":{"$ref":"#/components/schemas/ToolV2"},"type":"array","x-fern-audiences":["public"]}},"required":["messages","model"],"type":"object"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ChatResponseV2"},{"$ref":"#/components/schemas/StreamedChatResponseV2"}]}}},"description":"OK"},"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"}},"summary":"Chat API (v2)","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v2/chat\");\nrequest.Content = new StringContent(\"{\\\"citation_options\\\":{\\\"mode\\\":\\\"ACCURATE\\\"},\\\"documents\\\":[{\\\"data\\\":{},\\\"id\\\":\\\"string\\\"}],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"logprobs\\\":true,\\\"max_tokens\\\":0,\\\"messages\\\":[{\\\"content\\\":\\\"string\\\",\\\"role\\\":\\\"system\\\"}],\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"presence_penalty\\\":0,\\\"priority\\\":0,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"strict_tools\\\":true,\\\"temperature\\\":0,\\\"thinking\\\":{\\\"token_budget\\\":0,\\\"type\\\":\\\"disabled\\\"},\\\"tool_choice\\\":\\\"NONE\\\",\\\"tools\\\":[{\\\"function\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{}},\\\"type\\\":\\\"function\\\"}]}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v2/chat' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"citation_options\":{\"mode\":\"ACCURATE\"},\"documents\":[{\"data\":{},\"id\":\"string\"}],\"frequency_penalty\":0,\"k\":0,\"logprobs\":true,\"max_tokens\":0,\"messages\":[{\"content\":\"string\",\"role\":\"system\"}],\"model\":\"string\",\"p\":0.75,\"presence_penalty\":0,\"priority\":0,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"strict_tools\":true,\"temperature\":0,\"thinking\":{\"token_budget\":0,\"type\":\"disabled\"},\"tool_choice\":\"NONE\",\"tools\":[{\"function\":{\"description\":\"string\",\"name\":\"string\",\"parameters\":{}},\"type\":\"function\"}]}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"citation_options\":{\"mode\":\"ACCURATE\"},\"documents\":[{\"data\":{},\"id\":\"string\"}],\"frequency_penalty\":0,\"k\":0,\"logprobs\":true,\"max_tokens\":0,\"messages\":[{\"content\":\"string\",\"role\":\"system\"}],\"model\":\"string\",\"p\":0.75,\"presence_penalty\":0,\"priority\":0,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"strict_tools\":true,\"temperature\":0,\"thinking\":{\"token_budget\":0,\"type\":\"disabled\"},\"tool_choice\":\"NONE\",\"tools\":[{\"function\":{\"description\":\"string\",\"name\":\"string\",\"parameters\":{}},\"type\":\"function\"}]}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v2/chat\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/chat\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"citation_options\\\":{\\\"mode\\\":\\\"ACCURATE\\\"},\\\"documents\\\":[{\\\"data\\\":{},\\\"id\\\":\\\"string\\\"}],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"logprobs\\\":true,\\\"max_tokens\\\":0,\\\"messages\\\":[{\\\"content\\\":\\\"string\\\",\\\"role\\\":\\\"system\\\"}],\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"presence_penalty\\\":0,\\\"priority\\\":0,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"strict_tools\\\":true,\\\"temperature\\\":0,\\\"thinking\\\":{\\\"token_budget\\\":0,\\\"type\\\":\\\"disabled\\\"},\\\"tool_choice\\\":\\\"NONE\\\",\\\"tools\\\":[{\\\"function\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{}},\\\"type\\\":\\\"function\\\"}]}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/chat', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"citation_options\":{\"mode\":\"ACCURATE\"},\"documents\":[{\"data\":{},\"id\":\"string\"}],\"frequency_penalty\":0,\"k\":0,\"logprobs\":true,\"max_tokens\":0,\"messages\":[{\"content\":\"string\",\"role\":\"system\"}],\"model\":\"string\",\"p\":0.75,\"presence_penalty\":0,\"priority\":0,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"strict_tools\":true,\"temperature\":0,\"thinking\":{\"token_budget\":0,\"type\":\"disabled\"},\"tool_choice\":\"NONE\",\"tools\":[{\"function\":{\"description\":\"string\",\"name\":\"string\",\"parameters\":{}},\"type\":\"function\"}]}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/chat', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"citation_options\\\":{\\\"mode\\\":\\\"ACCURATE\\\"},\\\"documents\\\":[{\\\"data\\\":{},\\\"id\\\":\\\"string\\\"}],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"logprobs\\\":true,\\\"max_tokens\\\":0,\\\"messages\\\":[{\\\"content\\\":\\\"string\\\",\\\"role\\\":\\\"system\\\"}],\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"presence_penalty\\\":0,\\\"priority\\\":0,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"strict_tools\\\":true,\\\"temperature\\\":0,\\\"thinking\\\":{\\\"token_budget\\\":0,\\\"type\\\":\\\"disabled\\\"},\\\"tool_choice\\\":\\\"NONE\\\",\\\"tools\\\":[{\\\"function\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{}},\\\"type\\\":\\\"function\\\"}]}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/chat\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"citation_options\\\":{\\\"mode\\\":\\\"ACCURATE\\\"},\\\"documents\\\":[{\\\"data\\\":{},\\\"id\\\":\\\"string\\\"}],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"logprobs\\\":true,\\\"max_tokens\\\":0,\\\"messages\\\":[{\\\"content\\\":\\\"string\\\",\\\"role\\\":\\\"system\\\"}],\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"presence_penalty\\\":0,\\\"priority\\\":0,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"strict_tools\\\":true,\\\"temperature\\\":0,\\\"thinking\\\":{\\\"token_budget\\\":0,\\\"type\\\":\\\"disabled\\\"},\\\"tool_choice\\\":\\\"NONE\\\",\\\"tools\\\":[{\\\"function\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{}},\\\"type\\\":\\\"function\\\"}]}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v2/chat\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"citation_options\":{\"mode\":\"ACCURATE\"},\"documents\":[{\"data\":{},\"id\":\"string\"}],\"frequency_penalty\":0,\"k\":0,\"logprobs\":true,\"max_tokens\":0,\"messages\":[{\"content\":\"string\",\"role\":\"system\"}],\"model\":\"string\",\"p\":0.75,\"presence_penalty\":0,\"priority\":0,\"response_format\":{\"type\":\"text\"},\"safety_mode\":\"CONTEXTUAL\",\"seed\":0,\"stop_sequences\":[\"string\"],\"stream\":true,\"strict_tools\":true,\"temperature\":0,\"thinking\":{\"token_budget\":0,\"type\":\"disabled\"},\"tool_choice\":\"NONE\",\"tools\":[{\"function\":{\"description\":\"string\",\"name\":\"string\",\"parameters\":{}},\"type\":\"function\"}]}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/chat\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"citation_options\\\":{\\\"mode\\\":\\\"ACCURATE\\\"},\\\"documents\\\":[{\\\"data\\\":{},\\\"id\\\":\\\"string\\\"}],\\\"frequency_penalty\\\":0,\\\"k\\\":0,\\\"logprobs\\\":true,\\\"max_tokens\\\":0,\\\"messages\\\":[{\\\"content\\\":\\\"string\\\",\\\"role\\\":\\\"system\\\"}],\\\"model\\\":\\\"string\\\",\\\"p\\\":0.75,\\\"presence_penalty\\\":0,\\\"priority\\\":0,\\\"response_format\\\":{\\\"type\\\":\\\"text\\\"},\\\"safety_mode\\\":\\\"CONTEXTUAL\\\",\\\"seed\\\":0,\\\"stop_sequences\\\":[\\\"string\\\"],\\\"stream\\\":true,\\\"strict_tools\\\":true,\\\"temperature\\\":0,\\\"thinking\\\":{\\\"token_budget\\\":0,\\\"type\\\":\\\"disabled\\\"},\\\"tool_choice\\\":\\\"NONE\\\",\\\"tools\\\":[{\\\"function\\\":{\\\"description\\\":\\\"string\\\",\\\"name\\\":\\\"string\\\",\\\"parameters\\\":{}},\\\"type\\\":\\\"function\\\"}]}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["v2-beta"],"x-fern-examples":[{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const response = await cohere.chat({\n    model: 'command-a-plus-05-2026',\n    messages: [\n      {\n        role: 'user',\n        content: 'Tell me about LLMs',\n      },\n    ],\n  });\n\n  console.log(response);\n})();\n","name":"Default","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat(\n    model=\"command-a-plus-05-2026\",\n    messages=[{\"role\": \"user\", \"content\": \"Tell me about LLMs\"}],\n)\n\nprint(response)\n","name":"Default","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClientV2()\n\nasync def main():\n    response = await co.chat(\n        model=\"command-a-plus-05-2026\",\n        messages=[{\"role\": \"user\", \"content\": \"Tell me about LLMs\"}],\n    )\n    print(response)\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatRequest{\n\t\t\tModel: \"command-a-plus-05-2026\",\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tString: \"Tell me about LLMs\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Default","sdk":"go"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatRequest;\nimport com.cohere.api.types.*;\nimport java.util.List;\n\npublic class Default {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ChatResponse response =\n        cohere\n            .v2()\n            .chat(\n                V2ChatRequest.builder()\n                    .model(\"command-a-plus-05-2026\")\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(UserMessageContent.of(\"Tell me about LLMs\"))\n                                    .build())))\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Default","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-plus-05-2026\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"Tell me about LLMs\"\n      }\n    ]\n  }'\n","name":"Default","sdk":"curl"}],"request":{"messages":[{"content":"Tell me about LLMs","role":"user"}],"model":"command-a-plus-05-2026","stream":false},"response":{"body":{"finish_reason":"COMPLETE","id":"c14c80c3-18eb-4519-9460-6c92edd8cfb4","message":{"content":[{"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.\n\nLLMs 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.\n\nSome well-known examples of LLMs include:\n\n1. 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.\n\n2. 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.\n\n3. 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.\n\n4. RoBERTa (Robustly Optimized BERT Approach) — A variant of BERT that uses additional training techniques to improve performance.\n\n5. DeBERTa (Decoding-enhanced BERT with disentangled attention) — Another variant of BERT that introduces a new attention mechanism.\n\nLLMs 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.\nThe 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.","type":"text"}],"role":"assistant"},"usage":{"billed_units":{"input_tokens":5,"output_tokens":418},"tokens":{"input_tokens":71,"output_tokens":418}}}}},{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const response = await cohere.chat({\n    model: 'command-a-plus-05-2026',\n    messages: [\n      {\n        role: 'user',\n        content: 'Who is more popular: Nsync or Backstreet Boys?',\n      },\n    ],\n    documents: [\n      {\n        data: {\n          title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n          snippet:\n            '↓ 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.',\n        },\n      },\n      {\n        data: {\n          title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n          snippet:\n            \"↓ 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.\",\n        },\n      },\n      {\n        data: {\n          title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n          snippet:\n            \" 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.\",\n        },\n      },\n      {\n        data: {\n          title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n          snippet:\n            \" 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.\",\n        },\n      },\n    ],\n  });\n\n  console.log(response);\n})();\n","name":"Documents","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat(\n    model=\"command-a-plus-05-2026\",\n    messages=[{\n        \"role\": \"user\", \n        \"content\": \"Who is more popular: Nsync or Backstreet Boys?\"\n    }],\n    documents=[\n        {\n            \"data\":  {\n                \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        },\n        {\n            \"data\":  {\n                \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        },\n        {\n            \"data\":  {\n                \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        },\n        {\n            \"data\":  {\n                \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        }\n    ],\n)\n\nprint(response)\n","name":"Documents","sdk":"python"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatRequest;\nimport com.cohere.api.resources.v2.types.V2ChatRequestDocumentsItem;\nimport com.cohere.api.types.*;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Documents {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ChatResponse response =\n        cohere\n            .v2()\n            .chat(\n                V2ChatRequest.builder()\n                    .model(\"command-a-plus-05-2026\")\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(\n                                        UserMessageContent.of(\n                                            \"Who is more popular: Nsync or Backstreet Boys?\"))\n                                    .build())))\n                    .documents(\n                        List.of(\n                            V2ChatRequestDocumentsItem.of(\n                                Document.builder()\n                                    .data(\n                                        Map.of(\n                                            \"title\",\n                                            \"CSPC: Backstreet Boys Popularity Analysis -\"\n                                                + \" ChartMasters\",\n                                            \"snippet\",\n                                            \"↓ Skip to Main Content\\n\\n\"\n                                                + \"Music industry – One step closer to being\"\n                                                + \" accurate\\n\\n\"\n                                                + \"CSPC: Backstreet Boys Popularity Analysis\\n\\n\"\n                                                + \"Hernán Lopez Posted on February 9, 2017 Posted\"\n                                                + \" in CSPC 72 Comments Tagged with Backstreet\"\n                                                + \" Boys, Boy band\\n\\n\"\n                                                + \"At one point, Backstreet Boys defined success:\"\n                                                + \" massive albums sales across the globe, great\"\n                                                + \" singles sales, plenty of chart topping\"\n                                                + \" releases, hugely hyped tours and tremendous\"\n                                                + \" media coverage.\\n\\n\"\n                                                + \"It is true that they benefited from\"\n                                                + \" extraordinarily good market conditions in all\"\n                                                + \" markets. After all, the all-time record year\"\n                                                + \" for the music business, as far as revenues in\"\n                                                + \" billion dollars are concerned, was actually\"\n                                                + \" 1999. That is, back when this five men group\"\n                                                + \" was at its peak.\"))\n                                    .build()),\n                            V2ChatRequestDocumentsItem.of(\n                                Document.builder()\n                                    .data(\n                                        Map.of(\n                                            \"title\",\n                                            \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n                                            \"snippet\",\n                                            \"↓ Skip to Main Content\\n\\n\"\n                                                + \"Music industry – One step closer to being\"\n                                                + \" accurate\\n\\n\"\n                                                + \"CSPC: NSYNC Popularity Analysis\\n\\n\"\n                                                + \"MJD Posted on February 9, 2018 Posted in CSPC\"\n                                                + \" 27 Comments Tagged with Boy band, N'Sync\\n\\n\"\n                                                + \"At the turn of the millennium three teen acts\"\n                                                + \" were huge in the US, the Backstreet Boys,\"\n                                                + \" Britney Spears and NSYNC. The latter is the\"\n                                                + \" only one we haven't study so far. It took 15\"\n                                                + \" years and Adele to break their record of 2,4\"\n                                                + \" million units sold of No Strings Attached in\"\n                                                + \" its first week alone.\\n\\n\"\n                                                + \"It wasn't a fluke, as the second fastest\"\n                                                + \" selling album of the Soundscan era prior 2015,\"\n                                                + \" was also theirs since Celebrity debuted with\"\n                                                + \" 1,88 million units sold.\"))\n                                    .build()),\n                            V2ChatRequestDocumentsItem.of(\n                                Document.builder()\n                                    .data(\n                                        Map.of(\n                                            \"title\",\n                                            \"CSPC: Backstreet Boys Popularity Analysis -\"\n                                                + \" ChartMasters\",\n                                            \"snippet\",\n                                            \" 1997, 1998, 2000 and 2001 also rank amongst some\"\n                                                + \" of the very best years.\\n\\n\"\n                                                + \"Yet the way many music consumers – especially\"\n                                                + \" teenagers and young women's – embraced their\"\n                                                + \" output deserves its own chapter. If Jonas\"\n                                                + \" Brothers and more recently One Direction\"\n                                                + \" reached a great level of popularity during the\"\n                                                + \" past decade, the type of success achieved by\"\n                                                + \" Backstreet Boys is in a completely different\"\n                                                + \" level as they really dominated the business\"\n                                                + \" for a few years all over the world, including\"\n                                                + \" in some countries that were traditionally hard\"\n                                                + \" to penetrate for Western artists.\\n\\n\"\n                                                + \"We will try to analyze the extent of that\"\n                                                + \" hegemony with this new article with final\"\n                                                + \" results which will more than surprise many\"\n                                                + \" readers.\"))\n                                    .build()),\n                            V2ChatRequestDocumentsItem.of(\n                                Document.builder()\n                                    .data(\n                                        Map.of(\n                                            \"title\",\n                                            \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n                                            \"snippet\",\n                                            \" Was the teen group led by Justin Timberlake\"\n                                                + \" really that big? Was it only in the US where\"\n                                                + \" they found success? Or were they a global\"\n                                                + \" phenomenon?\\n\\n\"\n                                                + \"As usual, I'll be using the Commensurate Sales\"\n                                                + \" to Popularity Concept in order to relevantly\"\n                                                + \" gauge their results. This concept will not\"\n                                                + \" only bring you sales information for all\"\n                                                + \" NSYNC's albums, physical and download singles,\"\n                                                + \" as well as audio and video streaming, but it\"\n                                                + \" will also determine their true popularity. If\"\n                                                + \" you are not yet familiar with the CSPC method,\"\n                                                + \" the next page explains it with a short video.\"\n                                                + \" I fully recommend watching the video before\"\n                                                + \" getting into the sales figures.\"))\n                                    .build())))\n                    .build());\n    System.out.println(response);\n  }\n}\n","name":"Documents","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatRequest{\n\t\t\tModel: \"command-a-plus-05-2026\",\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tString: \"Who is more popular: Nsync or Backstreet Boys?\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tDocuments: []*cohere.V2ChatRequestDocumentsItem{\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Documents","sdk":"go"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-plus-05-2026\",\n    \"documents\": [\n      {\n        \"data\": {\n          \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n          \"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.\"\n        }\n      },\n      {\n        \"data\": {\n          \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n          \"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.\"\n        }\n      },\n      {\n        \"data\": {\n          \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n          \"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.\"\n        }\n      },\n      {\n        \"data\": {\n          \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n          \"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.\"\n        }\n      }\n    ],\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"Who is more popular: Nsync or Backstreet Boys?\"\n      }\n    ]\n  }'\n","name":"Documents","sdk":"curl"}],"request":{"documents":[{"data":{"content":"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":{"content":"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":{"content":"CSPC: Backstreet Boys Popularity Analysis - ChartMasters","snippet":"1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\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":{"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?\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":[{"content":"Who is more popular: Nsync or Backstreet Boys?","role":"user"}],"model":"command-a-plus-05-2026","stream":false},"response":{"body":{"finish_reason":"COMPLETE","id":"c14c80c3-18eb-4519-9460-6c92edd8cfb4","message":{"citations":[{"end":84,"sources":[{"document":{"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: NSYNC Popularity Analysis - ChartMasters"},"id":"doc:1","type":"document"}],"start":36,"text":"extremely popular at the turn of the millennium."},{"end":141,"sources":[{"document":{"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: Backstreet Boys Popularity Analysis - ChartMasters"},"id":"doc:0","type":"document"}],"start":105,"text":"massive album sales across the globe"},{"end":162,"sources":[{"document":{"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: Backstreet Boys Popularity Analysis - ChartMasters"},"id":"doc:0","type":"document"}],"start":143,"text":"great singles sales"},{"end":196,"sources":[{"document":{"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: Backstreet Boys Popularity Analysis - ChartMasters"},"id":"doc:0","type":"document"}],"start":164,"text":"plenty of chart-topping releases"},{"end":209,"sources":[{"document":{"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: Backstreet Boys Popularity Analysis - ChartMasters"},"id":"doc:0","type":"document"}],"start":198,"text":"hyped tours"},{"end":241,"sources":[{"document":{"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: Backstreet Boys Popularity Analysis - ChartMasters"},"id":"doc:0","type":"document"}],"start":215,"text":"tremendous media coverage."},{"end":350,"sources":[{"document":{"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: NSYNC Popularity Analysis - ChartMasters"},"id":"doc:1","type":"document"}],"start":280,"text":"album No Strings Attached selling 2.4 million units in its first week."},{"end":430,"sources":[{"document":{"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: NSYNC Popularity Analysis - ChartMasters"},"id":"doc:1","type":"document"}],"start":369,"text":"second fastest-selling album of the Soundscan era before 2015"},{"end":483,"sources":[{"document":{"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: NSYNC Popularity Analysis - ChartMasters"},"id":"doc:1","type":"document"}],"start":437,"text":"Celebrity debuting at 1.88 million units sold."},{"end":677,"sources":[{"document":{"snippet":"1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\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: Backstreet Boys Popularity Analysis - ChartMasters"},"id":"doc:2","type":"document"}],"start":589,"text":"success in some countries that were traditionally hard to penetrate for Western artists."}],"content":[{"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.\n\nWhile 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.","type":"text"}],"role":"assistant"},"usage":{"billed_units":{"input_tokens":682,"output_tokens":143},"tokens":{"input_tokens":1380,"output_tokens":434}}}}},{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const stream = await cohere.chatStream({\n    model: 'command-a-plus-05-2026',\n    messages: [\n      {\n        role: 'user',\n        content: 'Tell me about LLMs',\n      },\n    ],\n  });\n\n  for await (const chatEvent of stream) {\n    if (chatEvent.type === 'content-delta') {\n      console.log(chatEvent.delta?.message);\n    }\n  }\n})();\n","name":"Default","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat_stream(\n    model=\"command-a-plus-05-2026\",\n    messages=[{\"role\": \"user\", \"content\": \"Tell me about LLMs\"}],\n)\n\nfor event in response:\n    if event.type == \"content-delta\":\n        print(event.delta.message.content.text, end=\"\")\n","name":"Default","sdk":"python"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatStreamRequest;\nimport com.cohere.api.types.*;\nimport java.util.List;\n\npublic class Stream {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    Iterable<StreamedChatResponseV2> response =\n        cohere\n            .v2()\n            .chatStream(\n                V2ChatStreamRequest.builder()\n                    .model(\"command-a-plus-05-2026\")\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(UserMessageContent.of(\"Tell me about LLMs\"))\n                                    .build())))\n                    .build());\n\n    for (StreamedChatResponseV2 chatResponse : response) {\n      if (chatResponse.isContentDelta()) {\n        System.out.println(\n            chatResponse\n                .getContentDelta()\n                .flatMap(ChatContentDeltaEvent::getDelta)\n                .flatMap(ChatContentDeltaEventDelta::getMessage)\n                .flatMap(ChatContentDeltaEventDeltaMessage::getContent)\n                .flatMap(ChatContentDeltaEventDeltaMessageContent::getText)\n                .orElse(\"\"));\n      }\n    }\n\n    System.out.println(response);\n  }\n}\n","name":"Default","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatStreamRequest{\n\t\t\tModel: \"command-a-plus-05-2026\",\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tString: \"Tell me about LLMs\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.ContentDelta != nil {\n\t\t\tlog.Printf(\"%+v\", message)\n\t\t}\n\t}\n}\n","name":"Default","sdk":"go"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"stream\": true,\n    \"model\": \"command-a-plus-05-2026\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": \"Tell me about LLMs\"\n      }\n    ]\n  }'\n","name":"Default","sdk":"curl"}],"request":{"messages":[{"content":"Tell me about LLMs","role":"user"}],"model":"command-a-plus-05-2026","stream":true},"response":{"stream":[{"data":{"delta":{"message":{"role":"assistant"}},"id":"29f14a5a-11de-4cae-9800-25e4747408ea","type":"message-start"},"event":"message-start"},{"data":{"delta":{"message":{"content":{"text":"","type":"text"}}},"index":0,"type":"content-start"},"event":"content-start"},{"data":{"delta":{"message":{"content":{"text":"LL"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"Ms"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" stand"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" for"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" Large"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" Language"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" Models"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" which"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" are"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" type"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" of"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" neural"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" network"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" model"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" specialized"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" in"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" processing"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" and"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" generating"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" human"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" language"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"."}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"index":0,"type":"content-end"},"event":"content-end"},{"data":{"delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":5,"output_tokens":26},"tokens":{"input_tokens":71,"output_tokens":26}}},"type":"message-end"},"event":"message-end"}]}},{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const response = await cohere.chat({\n    model: 'command-a-plus-05-2026',\n    messages: [\n      {\n        role: 'user',\n        content:\n          \"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?\",\n      },\n    ],\n    tools: [\n      {\n        type: 'function',\n        function: {\n          name: 'query_daily_sales_report',\n          description:\n            'Connects to a database to retrieve overall sales volumes and sales information for a given day.',\n          parameters: {\n            type: 'object',\n            properties: {\n              day: {\n                description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.',\n                type: 'string',\n              },\n            },\n            required: ['day'],\n          },\n        },\n      },\n      {\n        type: 'function',\n        function: {\n          name: 'query_product_catalog',\n          description:\n            'Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels.',\n          parameters: {\n            type: 'object',\n            properties: {\n              category: {\n                description:\n                  'Retrieves product information data for all products in this category.',\n                type: 'string',\n              },\n            },\n            required: ['category'],\n          },\n        },\n      },\n    ],\n  });\n\n  console.log(response);\n})();\n","name":"Tools","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat(\n    model=\"command-a-reasoning-08-2025\",\n    messages=[\n        {\n            \"role\": \"user\",\n            \"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?\",\n        }\n    ],\n    tools=[\n        cohere.ToolV2(\n            type=\"function\",\n            function={\n                \"name\": \"query_daily_sales_report\",\n                \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"day\": {\n                            \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n                            \"type\": \"string\",\n                        }\n                    },\n                    \"required\": [\"day\"],\n                },\n            },\n        ),\n        cohere.ToolV2(\n            type=\"function\",\n            function={\n                \"name\": \"query_product_catalog\",\n                \"description\": \"Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"category\": {\n                            \"description\": \"Retrieves product information data for all products in this category.\",\n                            \"type\": \"string\",\n                        }\n                    },\n                    \"required\": [\"category\"],\n                },\n            },\n        ),\n    ],\n)\n\nprint(response)\n","name":"Tools","sdk":"python"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatRequest;\nimport com.cohere.api.types.*;\nimport java.util.List;\nimport java.util.Map;\n\npublic class Tools {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ChatResponse response =\n        cohere\n            .v2()\n            .chat(\n                V2ChatRequest.builder()\n                    .model(\"command-a-reasoning-08-2025\")\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(\n                                        UserMessageContent.of(\n                                            \"Can you provide a sales summary for 29th September\"\n                                                + \" 2023, and also give me some details about the\"\n                                                + \" products in the 'Electronics' category, for\"\n                                                + \" example their prices and stock levels?\"))\n                                    .build())))\n                    .tools(\n                        List.of(\n                            ToolV2.builder()\n                                .type(\"function\")\n                                .function(\n                                    ToolV2Function.builder()\n                                        .name(\"query_daily_sales_report\")\n                                        .description(\n                                            \"Connects to a database to retrieve overall sales\"\n                                                + \" volumes and sales information for a given\"\n                                                + \" day.\")\n                                        .parameters(\n                                            Map.of(\n                                                \"type\",\n                                                \"object\",\n                                                \"properties\",\n                                                Map.of(\n                                                    \"day\",\n                                                    Map.of(\n                                                        \"description\",\n                                                        \"Retrieves sales data for this day,\"\n                                                            + \" formatted as YYYY-MM-DD.\",\n                                                        \"type\",\n                                                        \"string\")),\n                                                \"required\",\n                                                List.of(\"day\")))\n                                        .build())\n                                .build(),\n                            ToolV2.builder()\n                                .type(\"function\")\n                                .function(\n                                    ToolV2Function.builder()\n                                        .name(\"query_product_catalog\")\n                                        .description(\n                                            \"Connects to a product catalog with information\"\n                                                + \" about all the products being sold, including\"\n                                                + \" categories, prices, and stock levels.\")\n                                        .parameters(\n                                            Map.of(\n                                                \"type\",\n                                                \"object\",\n                                                \"properties\",\n                                                Map.of(\n                                                    \"category\",\n                                                    Map.of(\n                                                        \"description\",\n                                                        \"Retrieves product information data for all\"\n                                                            + \" products in this category.\",\n                                                        \"type\",\n                                                        \"string\")),\n                                                \"required\",\n                                                List.of(\"category\")))\n                                        .build())\n                                .build()))\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Tools","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatRequest{\n\t\t\tModel: \"command-a-plus-05-2026\",\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tString: \"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?\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTools: []*cohere.ToolV2{\n\t\t\t\t{\n\t\t\t\t\tFunction: &cohere.ToolV2Function{\n\t\t\t\t\t\tName:        \"query_daily_sales_report\",\n\t\t\t\t\t\tDescription: cohere.String(\"Connects to a database to retrieve overall sales volumes and sales information for a given day.\"),\n\t\t\t\t\t\tParameters: map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"day\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\":        \"string\",\n\t\t\t\t\t\t\t\t\t\"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"required\": []string{\"day\"},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tFunction: &cohere.ToolV2Function{\n\t\t\t\t\t\tName:        \"query_product_catalog\",\n\t\t\t\t\t\tDescription: cohere.String(\"Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels.\"),\n\t\t\t\t\t\tParameters: map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"category\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\":        \"string\",\n\t\t\t\t\t\t\t\t\t\"description\": \"Retrieves product information data for all products in this category.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"required\": []string{\"category\"},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Tools","sdk":"go"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n        \"model\": \"command-a-plus-05-2026\",\n        \"tools\": [\n            {\n                \"type\": \"function\",\n                \"function\": {\n                    \"name\": \"query_daily_sales_report\",\n                    \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n                    \"parameters\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                            \"day\": {\n                                \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n                                \"type\": \"string\"\n                            }\n                        }\n                    }\n                }\n            },\n            {\n                \"type\": \"function\",\n                \"function\": {\n                    \"name\": \"query_product_catalog\",\n                    \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n                    \"parameters\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                            \"category\": {\n                                \"description\": \"Retrieves product information data for all products in this category.\",\n                                \"type\": \"string\"\n                            }\n                        }\n                    }\n                }\n            }\n        ],\n        \"messages\": [\n            {\n                \"role\": \"user\",\n                \"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?\"\n            }\n        ]\n    }'\n","name":"Tools","sdk":"curl"}],"request":{"messages":[{"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?","role":"user"}],"model":"command-r","stream":false,"tools":[{"function":{"description":"Connects to a database to retrieve overall sales volumes and sales information for a given day.","name":"query_daily_sales_report","parameters":{"properties":{"day":{"description":"Retrieves sales data for this day, formatted as YYYY-MM-DD.","type":"str"}},"required":["day"],"type":"object","x-fern-type-name":"tools-by6k68"}},"type":"function"},{"function":{"description":"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.","name":"query_product_catalog","parameters":{"properties":{"category":{"description":"Retrieves product information data for all products in this category.","type":"str"}},"required":["category"],"type":"object","x-fern-type-name":"tools-o09qd6"}},"type":"function"}]},"response":{"body":{"finish_reason":"TOOL_CALL","id":"9e5f00aa-bf1e-481a-abe3-0eceac18c3ec","message":{"content":[{"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.","type":"thinking"}],"role":"assistant","tool_calls":[{"function":{"arguments":"{\"day\": \"2023-09-29\"}","name":"query_daily_sales_report"},"id":"query_daily_sales_report_hgxxmkby3wta","type":"function"},{"function":{"arguments":"{\"category\": \"Electronics\"}","name":"query_product_catalog"},"id":"query_product_catalog_rpg0z5h8yyz2","type":"function"}]},"usage":{"billed_units":{"input_tokens":127,"output_tokens":69},"tokens":{"input_tokens":1032,"output_tokens":124}}}}},{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const response = await cohere.chat({\n    model: 'command-a-vision-07-2025',\n    messages: [\n      {\n        role: 'user',\n        content: [\n          { type: 'text', text: 'Describe this image' },\n          {\n            type: 'image_url',\n            imageUrl: {\n              // Can be either a base64 data URI or a web URL.\n              url: 'https://cohere.com/favicon-32x32.png',\n              detail: 'auto',\n            },\n          },\n        ],\n      },\n    ],\n  });\n  console.log(response.message.content[0].text);\n})();\n","name":"Images","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat(\n    model=\"command-a-vision-07-2025\",\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"text\",\n                    \"text\": \"Describe this image\"\n                },\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        # Can be either a base64 data URI or a web URL.\n                        \"url\": \"https://cohere.com/favicon-32x32.png\",\n                        \"detail\": \"auto\"\n                    }\n                }\n            ]\n        }\n    ]\n)\n\nprint(response)","name":"Images","sdk":"python"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport java.util.List;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatRequest;\nimport com.cohere.api.types.ChatMessageV2;\nimport com.cohere.api.types.ChatResponse;\nimport com.cohere.api.types.Content;\nimport com.cohere.api.types.ImageContent;\nimport com.cohere.api.types.ImageUrl;\nimport com.cohere.api.types.TextContent;\nimport com.cohere.api.types.UserMessage;\nimport com.cohere.api.types.UserMessageContent;\n\npublic class Image {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ChatResponse response =\n        cohere\n            .v2()\n            .chat(\n                V2ChatRequest.builder()\n                    .model(\"command-a-vision-07-2025\")\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(\n                                        UserMessageContent.of(\n                                            List.of(\n                                                Content.text(\n                                                    TextContent.builder()\n                                                        .text(\"Describe this image\")\n                                                        .build()),\n                                                Content.imageUrl(\n                                                    ImageContent.builder()\n                                                        .imageUrl(\n                                                            ImageUrl.builder()\n                                                                // Can be either a base64 data URI or a web URL.\n                                                                .url(\n                                                                    \"https://cohere.com/favicon-32x32.png\")\n                                                                .build())\n                                                        .build()))))\n                                    .build())))\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Images","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.Chat(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatRequest{\n\t\t\tModel: \"command-a-vision-07-2025\",\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tContentList: []*cohere.Content{\n\t\t\t\t\t\t\t\t{Type: \"text\", Text: &cohere.ChatTextContent{Text: \"Describe this image\"}},\n\t\t\t\t\t\t\t\t{Type: \"image_url\", ImageUrl: &cohere.ImageContent{\n\t\t\t\t\t\t\t\t\tImageUrl: &cohere.ImageUrl{\n\t\t\t\t\t\t\t\t\t\t// Can be either a base64 data URI or a web URL.\n\t\t\t\t\t\t\t\t\t\tUrl:    \"https://cohere.com/favicon-32x32.png\",\n\t\t\t\t\t\t\t\t\t\tDetail: cohere.ImageUrlDetailAuto.Ptr(),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Images","sdk":"go"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"command-a-vision-07-2025\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"Describe the logo in this image\"\n          },\n          {\n            \"type\": \"image_url\",\n            \"image_url\": {\n              \"url\": \"https://cohere.com/favicon-32x32.png\",\n              \"detail\": \"auto\"\n            }\n          }\n        ]\n      }\n    ]\n  }'\n","name":"Images","sdk":"curl"}],"request":{"messages":[{"content":[{"text":"Describe this image","type":"text"},{"image_url":{"detail":"auto","url":"https://cohere.com/favicon-32x32.png"},"type":"image_url"}],"role":"user"}],"model":"command-a-vision-07-2025","stream":false},"response":{"body":{"finish_reason":"COMPLETE","id":"c14c80c3-18eb-4519-9460-6c92edd8cfb4","message":{"content":[{"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:\n\n1. **Shapes and Colors:**\n  - There are three main shapes in the image.\n  - The largest shape at the top is a dark green, irregular oval.\n  - Below it, on the left, there's a smaller, bright orange circle.\n  - To the right of the orange circle, there's another oval shape, this one in a light purple color.\n\n2. **Arrangement:**\n  - The green oval is positioned at the top center of the image.\n  - The orange circle is directly below the green oval, slightly to the left.\n  - The purple oval is to the right of the orange circle, forming a rough triangular arrangement with the other two shapes.\n\n3. **Blurriness:**\n  - 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.\n\nGiven 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!\n","type":"text"}],"role":"assistant"},"usage":{"billed_units":{"input_tokens":5,"output_tokens":418},"tokens":{"input_tokens":71,"output_tokens":418}}}}},{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const stream = await cohere.chatStream({\n    model: 'command-a-plus-05-2026',\n    documents: [\n      {\n        data: {\n          title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n          snippet:\n            '↓ 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.',\n        },\n      },\n      {\n        data: {\n          title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n          snippet:\n            \"↓ 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.\",\n        },\n      },\n      {\n        data: {\n          title: 'CSPC: Backstreet Boys Popularity Analysis - ChartMasters',\n          snippet:\n            \" 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.\",\n        },\n      },\n      {\n        data: {\n          title: 'CSPC: NSYNC Popularity Analysis - ChartMasters',\n          snippet:\n            \" 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.\",\n        },\n      },\n    ],\n    messages: [\n      {\n        role: 'user',\n        content: 'Who is more popular: Nsync or Backstreet Boys?',\n      },\n    ],\n  });\n\n  for await (const chatEvent of stream) {\n    console.log(chatEvent);\n  }\n})();\n","name":"Documents","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat_stream(\n    model=\"command-a-plus-05-2026\",\n    messages=[{\"role\": \"user\", \"content\": \"Who is more popular: Nsync or Backstreet Boys?\"}],\n    documents=[\n        {\n            \"data\":  {\n                \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        },\n        {\n            \"data\":  {\n                \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        },\n        {\n            \"data\":  {\n                \"title\": \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        },\n        {\n            \"data\":  {\n                \"title\": \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n                \"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.\",\n            }\n        }\n    ],\n)\n\nfor event in response:\n    if event.type == \"message-start\":\n        print(\"\\nMessage started.\")\n    elif event.type == \"message-end\":\n        print(\"\\nMessage ended.\")\n    elif event.type == \"content-delta\":\n        print(event.delta.message.content.text, end=\"\")\n\n","name":"Documents","sdk":"python"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatStreamRequest;\nimport com.cohere.api.resources.v2.types.V2ChatStreamRequestDocumentsItem;\nimport com.cohere.api.types.*;\nimport java.util.List;\n\npublic class StreamDocuments {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    Iterable<StreamedChatResponseV2> response =\n        cohere\n            .v2()\n            .chatStream(\n                V2ChatStreamRequest.builder()\n                    .model(\"command-a-plus-05-2026\")\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(UserMessageContent.of(\"Who is the most popular?\"))\n                                    .build())))\n                    .documents(\n                        List.of(\n                            V2ChatStreamRequestDocumentsItem.of(\n                                \"↓ Skip to Main Content\\n\\n\"\n                                    + \"Music industry – One step closer to being accurate\\n\\n\"\n                                    + \"CSPC: Backstreet Boys Popularity Analysis\\n\\n\"\n                                    + \"At one point, Backstreet Boys defined success: massive album\"\n                                    + \" sales...\"),\n                            V2ChatStreamRequestDocumentsItem.of(\n                                \"↓ Skip to Main Content\\n\\n\"\n                                    + \"CSPC: NSYNC Popularity Analysis\\n\\n\"\n                                    + \"At the turn of the millennium, three teen acts were huge:\"\n                                    + \" Backstreet Boys, Britney Spears, and NSYNC...\"),\n                            V2ChatStreamRequestDocumentsItem.of(\n                                \"Yet the way many music consumers embraced Backstreet Boys deserves\"\n                                    + \" its own chapter...\"),\n                            V2ChatStreamRequestDocumentsItem.of(\n                                \"Was NSYNC only successful in the US, or were they a global\"\n                                    + \" phenomenon?...\")))\n                    .build());\n\n    for (StreamedChatResponseV2 chatResponse : response) {\n      if (chatResponse.isContentDelta()) {\n        String text =\n            chatResponse\n                .getContentDelta()\n                .flatMap(ChatContentDeltaEvent::getDelta)\n                .flatMap(ChatContentDeltaEventDelta::getMessage)\n                .flatMap(ChatContentDeltaEventDeltaMessage::getContent)\n                .flatMap(ChatContentDeltaEventDeltaMessageContent::getText)\n                .orElse(\"\");\n        System.out.println(text);\n      }\n    }\n  }\n}\n","name":"Documents","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatStreamRequest{\n\t\t\tModel: \"command-a-plus-05-2026\",\n\t\t\tDocuments: []*cohere.V2ChatStreamRequestDocumentsItem{\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tDocument: &cohere.Document{\n\t\t\t\t\t\tData: map[string]interface{}{\n\t\t\t\t\t\t\t\"title\":   \"CSPC: NSYNC Popularity Analysis - ChartMasters\",\n\t\t\t\t\t\t\t\"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.\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tString: \"Who is more popular: Nsync or Backstreet Boys?\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\t// Log the received message\n\t\tif message.ContentDelta != nil {\n\t\t\tlog.Printf(\"%+v\", message)\n\t\t}\n\t}\n}\n","name":"Documents","sdk":"go"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data \"{\n    \\\"stream\\\": true,\n    \\\"model\\\": \\\"command-a-plus-05-2026\\\",\n    \\\"documents\\\": [\n      {\n        \\\"data\\\": {\n          \\\"title\\\": \\\"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\\\",\n          \\\"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.\\\"\n        }\n      },\n      {\n        \\\"data\\\": {\n          \\\"title\\\": \\\"CSPC: NSYNC Popularity Analysis - ChartMasters\\\",\n          \\\"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.\\\"\n        }\n      },\n      {\n        \\\"data\\\": {\n          \\\"title\\\": \\\"CSPC: Backstreet Boys Popularity Analysis - ChartMasters\\\",\n          \\\"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.\\\"\n        }\n      },\n      {\n        \\\"data\\\": {\n          \\\"title\\\": \\\"CSPC: NSYNC Popularity Analysis - ChartMasters\\\",\n          \\\"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.\\\"\n        }\n      }\n    ],\n    \\\"messages\\\": [\n      {\n        \\\"role\\\": \\\"user\\\",\n        \\\"content\\\": \\\"Who is more popular: Nsync or Backstreet Boys?\\\"\n      }\n    ]\n  }\"\n","name":"Documents","sdk":"curl"}],"request":{"documents":[{"data":{"content":"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":{"content":"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":{"content":"CSPC: Backstreet Boys Popularity Analysis - ChartMasters","snippet":"1997, 1998, 2000 and 2001 also rank amongst some of the very best years.\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":{"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?\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":[{"content":"Who is more popular: Nsync or Backstreet Boys?","role":"user"}],"model":"command-a-plus-05-2026","stream":true},"response":{"stream":[{"data":{"delta":{"message":{"role":"assistant"}},"id":"8268c123-8264-4046-afd9-ae3d328f85f3","type":"message-start"},"event":"message-start"},{"data":{"delta":{"message":{"content":{"text":"","type":"text"}}},"index":0,"type":"content-start"},"event":"content-start"},{"data":{"delta":{"message":{"content":{"text":"Both"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" Nsync"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"citations":{"end":10,"sources":[{"document":{"id":"1","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: NSYNC Popularity Analysis - ChartMasters"},"id":"1","type":"document"}],"start":5,"text":"Nsync","type":"TEXT_CONTENT"}}},"index":0,"type":"citation-start"},"event":"citation-start"},{"data":{"index":0,"type":"citation-end"},"event":"citation-end"},{"data":{"delta":{"message":{"content":{"text":" and"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" Backstreet"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" Boys"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" were"}}},"index":0,"type":"content-delta"},"event":"content-delta"},{"data":{"index":0,"type":"content-end"},"event":"content-end"},{"data":{"delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":18,"output_tokens":6},"tokens":{"input_tokens":1661,"output_tokens":19}}},"type":"message-end"},"event":"message-end"}]}},{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const stream = await cohere.chatStream({\n    model: 'command-a-plus-05-2026',\n    messages: [\n      {\n        role: 'user',\n        content:\n          \"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?\",\n      },\n    ],\n    tools: [\n      {\n        type: 'function',\n        function: {\n          name: 'query_daily_sales_report',\n          description:\n            'Connects to a database to retrieve overall sales volumes and sales information for a given day.',\n          parameters: {\n            type: 'object',\n            properties: {\n              day: {\n                description: 'Retrieves sales data for this day, formatted as YYYY-MM-DD.',\n                type: 'string',\n              },\n            },\n            required: ['day'],\n          },\n        },\n      },\n      {\n        type: 'function',\n        function: {\n          name: 'query_product_catalog',\n          description:\n            'Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels.',\n          parameters: {\n            type: 'object',\n            properties: {\n              category: {\n                description:\n                  'Retrieves product information data for all products in this category.',\n                type: 'string',\n              },\n            },\n            required: ['category'],\n          },\n        },\n      },\n    ],\n  });\n\n  for await (const chatEvent of stream) {\n    if (chatEvent.type === 'tool-call-delta') {\n      console.log(chatEvent.delta?.message);\n    }\n  }\n})();\n","name":"Tools","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat_stream(\n    model=\"command-a-plus-05-2026\",\n    messages=[\n        {\n            \"role\": \"user\",\n            \"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?\",\n        }\n    ],\n    tools=[\n        cohere.ToolV2(\n            type=\"function\",\n            function={\n                \"name\": \"query_daily_sales_report\",\n                \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"day\": {\n                            \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n                            \"type\": \"string\",\n                        }\n                    },\n                    \"required\": [\"day\"],\n                },\n            },\n        ),\n        cohere.ToolV2(\n            type=\"function\",\n            function={\n                \"name\": \"query_product_catalog\",\n                \"description\": \"Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n                \"parameters\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                        \"category\": {\n                            \"description\": \"Retrieves product information data for all products in this category.\",\n                            \"type\": \"string\",\n                        }\n                    },\n                    \"required\": [\"category\"],\n                },\n            },\n        ),\n    ],\n)\n\nfor event in response:\n    if event.type in [\"tool-call-start\", \"tool-call-delta\"]:\n        for tool_call in event.delta.message.tool_calls:\n            print(tool_call)\n","name":"Tools","sdk":"python"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatStreamRequest;\nimport com.cohere.api.types.*;\nimport java.util.List;\nimport java.util.Map;\n\npublic class StreamTools {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    Iterable<StreamedChatResponseV2> response =\n        cohere\n            .v2()\n            .chatStream(\n                V2ChatStreamRequest.builder()\n                    .model(\"command-a-plus-05-2026\")\n                    .tools(\n                        List.of(\n                            ToolV2.builder()\n                                .function(\n                                    ToolV2Function.builder()\n                                        .name(\"query_daily_sales_report\")\n                                        .description(\n                                            \"Connects to a database to retrieve overall sales\"\n                                                + \" volumes and sales information for a given day.\")\n                                        .parameters(\n                                            Map.of(\n                                                \"day\",\n                                                ToolParameterDefinitionsValue.builder()\n                                                    .type(\"str\")\n                                                    .description(\n                                                        \"Retrieves sales data for this day,\"\n                                                            + \" formatted as YYYY-MM-DD.\")\n                                                    .required(true)\n                                                    .build()))\n                                        .build())\n                                .build(),\n                            ToolV2.builder()\n                                .function(\n                                    ToolV2Function.builder()\n                                        .name(\"query_product_catalog\")\n                                        .description(\n                                            \"Connects to a product catalog with information about\"\n                                                + \" all the products being sold, including\"\n                                                + \" categories, prices, and stock levels.\")\n                                        .parameters(\n                                            Map.of(\n                                                \"category\",\n                                                ToolParameterDefinitionsValue.builder()\n                                                    .type(\"str\")\n                                                    .description(\n                                                        \"Retrieves product information data for all\"\n                                                            + \" products in this category.\")\n                                                    .required(true)\n                                                    .build()))\n                                        .build())\n                                .build()))\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(\n                                        UserMessageContent.of(\n                                            \"Can you provide a sales summary for 29th September\"\n                                                + \" 2023, and also give me some details about the\"\n                                                + \" products in the 'Electronics' category?\"))\n                                    .build())))\n                    .build());\n\n    for (StreamedChatResponseV2 chatResponse : response) {\n      if (chatResponse.isContentDelta()) {\n        String text =\n            chatResponse\n                .getContentDelta()\n                .flatMap(ChatContentDeltaEvent::getDelta)\n                .flatMap(ChatContentDeltaEventDelta::getMessage)\n                .flatMap(ChatContentDeltaEventDeltaMessage::getContent)\n                .flatMap(ChatContentDeltaEventDeltaMessageContent::getText)\n                .orElse(\"\");\n        System.out.println(text);\n      }\n    }\n  }\n}\n","name":"Tools","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatStreamRequest{\n\t\t\tModel: \"command-a-plus-05-2026\",\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tString: \"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?\",\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\tTools: []*cohere.ToolV2{\n\t\t\t\t{\n\t\t\t\t\tFunction: &cohere.ToolV2Function{\n\t\t\t\t\t\tName:        \"query_daily_sales_report\",\n\t\t\t\t\t\tDescription: cohere.String(\"Connects to a database to retrieve overall sales volumes and sales information for a given day.\"),\n\t\t\t\t\t\tParameters: map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"day\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\":        \"string\",\n\t\t\t\t\t\t\t\t\t\"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"required\": []string{\"day\"},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tFunction: &cohere.ToolV2Function{\n\t\t\t\t\t\tName:        \"query_product_catalog\",\n\t\t\t\t\t\tDescription: cohere.String(\"Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels.\"),\n\t\t\t\t\t\tParameters: map[string]interface{}{\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\"category\": map[string]interface{}{\n\t\t\t\t\t\t\t\t\t\"type\":        \"string\",\n\t\t\t\t\t\t\t\t\t\"description\": \"Retrieves product information data for all products in this category.\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"required\": []string{\"category\"},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\t// Log the received message\n\t\tif message.ToolCallDelta != nil {\n\t\t\tlog.Printf(\"%+v\", message)\n\t\t}\n\t}\n}\n","name":"Tools","sdk":"go"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n        \"stream\": true,\n        \"model\": \"command-a-plus-05-2026\",\n        \"tools\": [\n            {\n                \"type\": \"function\",\n                \"function\": {\n                    \"name\": \"query_daily_sales_report\",\n                    \"description\": \"Connects to a database to retrieve overall sales volumes and sales information for a given day.\",\n                    \"parameters\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                            \"day\": {\n                                \"description\": \"Retrieves sales data for this day, formatted as YYYY-MM-DD.\",\n                                \"type\": \"string\"\n                            }\n                        }\n                    }\n                }\n            },\n            {\n                \"type\": \"function\",\n                \"function\": {\n                    \"name\": \"query_product_catalog\",\n                    \"description\": \"Connects to a a product catalog with information about all the products being sold, including categories, prices, and stock levels.\",\n                    \"parameters\": {\n                        \"type\": \"object\",\n                        \"properties\": {\n                            \"category\": {\n                                \"description\": \"Retrieves product information data for all products in this category.\",\n                                \"type\": \"string\"\n                            }\n                        }\n                    }\n                }\n            }\n        ],\n        \"messages\": [\n            {\n                \"role\": \"user\",\n                \"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?\"\n            }\n        ]\n    }'\n","name":"Tools","sdk":"curl"}],"request":{"messages":[{"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?","role":"user"}],"model":"command-a-plus-05-2026","stream":true,"tools":[{"function":{"description":"Connects to a database to retrieve overall sales volumes and sales information for a given day.","name":"query_daily_sales_report","parameters":{"properties":{"day":{"description":"Retrieves sales data for this day, formatted as YYYY-MM-DD.","type":"string"}},"type":"object"}},"type":"function"},{"function":{"description":"Connects to a product catalog with information about all the products being sold, including categories, prices, and stock levels.","name":"query_product_catalog","parameters":{"properties":{"category":{"description":"Retrieves product information data for all products in this category.","type":"string"}},"type":"object"}},"type":"function"}]},"response":{"stream":[{"data":{"delta":{"message":{"role":"assistant"}},"id":"2edfdf70-019c-4f7a-be20-3cdbfaa3dca6","type":"message-start"},"event":"message-start"},{"data":{"delta":{"message":{"tool_plan":"I"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" will"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" use"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" the"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" query"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"_"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"daily"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"_"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"sales"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"_"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"report"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" tool"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" to"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" find"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" the"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" sales"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" summary"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" for"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" 2"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"9"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"th"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" September"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" 2"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"0"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"2"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"3"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"."}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" I"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" will"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" also"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" use"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" the"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" query"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"_"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"product"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"_"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"catalog"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" tool"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" to"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" find"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" the"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" details"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" of"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" the"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" products"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" in"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" the"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" Electronics"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":" category"}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_plan":"."}},"type":"tool-plan-delta"},"event":"tool-plan-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"","name":"query_daily_sales_report"},"id":"query_daily_sales_report_j3f0adww9pmr","type":"function"}}},"index":0,"type":"tool-call-start"},"event":"tool-call-start"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"{\""}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"day"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"\": "}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"\""}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"2"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"0"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"2"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"3"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"-"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"0"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"9"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"-"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"2"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"9"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"\"}"}}}},"index":0,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"index":0,"type":"tool-call-end"},"event":"tool-call-end"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"","name":"query_product_catalog"},"id":"query_product_catalog_c66nf11r6s8g","type":"function"}}},"index":1,"type":"tool-call-start"},"event":"tool-call-start"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"{\""}}}},"index":1,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"category"}}}},"index":1,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"\": "}}}},"index":1,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"\""}}}},"index":1,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"Electron"}}}},"index":1,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"ics"}}}},"index":1,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"delta":{"message":{"tool_calls":{"function":{"arguments":"\"}"}}}},"index":1,"type":"tool-call-delta"},"event":"tool-call-delta"},{"data":{"index":1,"type":"tool-call-end"},"event":"tool-call-end"},{"data":{"delta":{"finish_reason":"TOOL_CALL","usage":{"billed_units":{"input_tokens":126,"output_tokens":84},"tokens":{"input_tokens":1589,"output_tokens":135}}},"type":"message-end"},"event":"message-end"}]}},{"code-samples":[{"code":"const { CohereClientV2 } = require('cohere-ai');\n\nconst cohere = new CohereClientV2({});\n\n(async () => {\n  const stream = await cohere.chatStream({\n    model: 'command-a-vision-07-2025',\n    messages: [\n      {\n        role: 'user',\n        content: [\n          { type: 'text', text: 'Describe this image' },\n          {\n            type: 'image_url',\n            imageUrl: {\n              // Can be either a base64 data URI or a web URL.\n              url: 'https://cohere.com/favicon-32x32.png',\n              detail: 'auto',\n            },\n          },\n        ],\n      },\n    ],\n  });\n\n  for await (const chatEvent of stream) {\n    if (chatEvent.type === 'content-delta') {\n      console.log(chatEvent.delta?.message);\n    }\n  }\n})();\n","name":"Images","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.chat_stream(\n    model=\"command-a-vision-07-2025\",\n    messages=[\n        {\n            \"role\": \"user\",\n            \"content\": [\n                {\n                    \"type\": \"text\",\n                    \"text\": \"Describe this image\"\n                },\n                {\n                    \"type\": \"image_url\",\n                    \"image_url\": {\n                        # Can be either a base64 data URI or a web URL.\n                        \"url\": \"https://cohere.com/favicon-32x32.png\",\n                        \"detail\": \"auto\"\n                    }\n                }\n            ]\n        }\n    ]\n)\n\nfor event in response:\n    if event.type == \"content-delta\":\n        print(event.delta.message.content.text, end=\"\")","name":"Images","sdk":"python"},{"code":"/* (C)2024 */\npackage chatv2post;\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2ChatStreamRequest;\nimport com.cohere.api.types.*;\nimport java.util.List;\n\npublic class Stream {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    Iterable<StreamedChatResponseV2> response =\n        cohere\n            .v2()\n            .chatStream(\n                V2ChatStreamRequest.builder()\n                    .model(\"command-a-vision-07-2025\")\n                    .messages(\n                        List.of(\n                            ChatMessageV2.user(\n                                UserMessage.builder()\n                                    .content(\n                                        UserMessageContent.of(\n                                            List.of(\n                                                Content.text(\n                                                    TextContent.builder()\n                                                        .text(\"Describe this image\")\n                                                        .build()),\n                                                Content.imageUrl(\n                                                    ImageContent.builder()\n                                                        .imageUrl(\n                                                            ImageUrl.builder()\n                                                                // Can be either a base64 data URI or a web URL.\n                                                                .url(\n                                                                    \"https://cohere.com/favicon-32x32.png\")\n                                                                .build())\n                                                        .build()))))\n                                    .build())))\n                    .build());\n\n    for (StreamedChatResponseV2 chatResponse : response) {\n      if (chatResponse.isContentDelta()) {\n        System.out.println(\n            chatResponse\n                .getContentDelta()\n                .flatMap(ChatContentDeltaEvent::getDelta)\n                .flatMap(ChatContentDeltaEventDelta::getMessage)\n                .flatMap(ChatContentDeltaEventDeltaMessage::getContent)\n                .flatMap(ChatContentDeltaEventDeltaMessageContent::getText)\n                .orElse(\"\"));\n      }\n    }\n\n    System.out.println(response);\n  }\n}\n","name":"Images","sdk":"java"},{"code":"package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\tclient \"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.ChatStream(\n\t\tcontext.TODO(),\n\t\t&cohere.V2ChatStreamRequest{\n\t\t\tModel: \"command-a-vision-07-2025\",\n\t\t\tMessages: cohere.ChatMessages{\n\t\t\t\t{\n\t\t\t\t\tRole: \"user\",\n\t\t\t\t\tUser: &cohere.UserMessageV2{\n\t\t\t\t\t\tContent: &cohere.UserMessageV2Content{\n\t\t\t\t\t\t\tContentList: []*cohere.Content{\n\t\t\t\t\t\t\t\t{Type: \"text\", Text: &cohere.ChatTextContent{Text: \"Describe this image\"}},\n\t\t\t\t\t\t\t\t{Type: \"image_url\", ImageUrl: &cohere.ImageContent{\n\t\t\t\t\t\t\t\t\tImageUrl: &cohere.ImageUrl{\n\t\t\t\t\t\t\t\t\t\t// Can be either a base64 data URI or a web URL.\n\t\t\t\t\t\t\t\t\t\tUrl:    \"https://cohere.com/favicon-32x32.png\",\n\t\t\t\t\t\t\t\t\t\tDetail: cohere.ImageUrlDetailAuto.Ptr(),\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t}},\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Make sure to close the stream when you're done reading.\n\t// This is easily handled with defer.\n\tdefer resp.Close()\n\n\tfor {\n\t\tmessage, err := resp.Recv()\n\n\t\tif errors.Is(err, io.EOF) {\n\t\t\t// An io.EOF error means the server is done sending messages\n\t\t\t// and should be treated as a success.\n\t\t\tbreak\n\t\t}\n\n\t\tif message.ContentDelta != nil {\n\t\t\tlog.Printf(\"%+v\", message)\n\t\t}\n\t}\n}\n","name":"Images","sdk":"go"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/chat \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"stream\": true,\n    \"model\": \"command-a-vision-07-2025\",\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"Describe the logo in this image\"\n          },\n          {\n            \"type\": \"image_url\",\n            \"image_url\": {\n              \"url\": \"https://cohere.com/favicon-32x32.png\",\n              \"detail\": \"auto\"\n            }\n          }\n        ]\n      }\n    ]\n  }'\n","name":"Images","sdk":"curl"}],"request":{"messages":[{"content":[{"text":"Describe this image","type":"text"},{"image_url":{"detail":"auto","url":"https://cohere.com/favicon-32x32.png"},"type":"image_url"}],"role":"user"}],"model":"command-a-vision-07-2025","stream":true},"response":{"stream":[{"data":{"delta":{"message":{"role":"assistant"}},"id":"29f14a5a-11de-4cae-9800-25e4747408ea","type":"message-start"},"event":"message-start"},{"data":{"delta":{"message":{"content":{"text":"","type":"text"}}},"type":"content-start"},"event":"content-start"},{"data":{"delta":{"message":{"content":{"text":"The"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" image"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" you"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"'ve"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" provided"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" appears"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" to"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" be"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" simple"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" abstract"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" composition"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" featuring"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" three"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" colored"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" shapes"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" on"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" white"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" background"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"."}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" At"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" the"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" top"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" there"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"'s"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" large"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" dark"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" green"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" oval"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" shape"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"."}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" Below"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" it"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" on"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" the"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" left"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" side"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" there"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"'s"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" smaller"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" bright"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" orange"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" circular"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" shape"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"."}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" To"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" the"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" right"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" of"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" the"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" orange"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" circle"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" there"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"'s"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" medium"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"-"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"sized"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":","}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" light"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" purple"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" oval"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" shape"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"."}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" The"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" shapes"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" are"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" arranged"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" in"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" somewhat"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" triangular"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" formation"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"."}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" The"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" overall"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" style"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" is"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" minimalistic"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" and"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" could"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" be"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" interpreted"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" as"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" form"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" of"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" modern"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" art"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" or"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" a"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" basic"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" design"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":" element"}}},"type":"content-delta"},"event":"content-delta"},{"data":{"delta":{"message":{"content":{"text":"."}}},"type":"content-delta"},"event":"content-delta"},{"data":{"type":"content-end"},"event":"content-end"},{"data":{"delta":{"finish_reason":"COMPLETE","usage":{"billed_units":{"input_tokens":262,"output_tokens":105},"tokens":{"input_tokens":499,"output_tokens":105}}},"type":"message-end"},"event":"message-end"}]}}],"x-fern-sdk-group-name":"v2","x-fern-sdk-method-name":"chat","x-fern-streaming":{"format":"sse","response":{"properties":{"finish_reason":{"$ref":"#/components/schemas/ChatFinishReason"},"id":{"description":"Unique identifier for the generated reply. Useful for submitting feedback.","type":"string"},"logprobs":{"items":{"$ref":"#/components/schemas/LogprobItem"},"type":"array"},"message":{"$ref":"#/components/schemas/AssistantMessageResponse"},"usage":{"$ref":"#/components/schemas/Usage"}},"required":["id","finish_reason","message"]},"response-stream":{"description":"StreamedChatResponse is returned in streaming mode (specified with `stream=True` in the request).","discriminator":{"mapping":{"citation-end":"#/components/schemas/CitationEndEvent","citation-start":"#/components/schemas/CitationStartEvent","content-delta":"#/components/schemas/ChatContentDeltaEvent","content-end":"#/components/schemas/ChatContentEndEvent","content-start":"#/components/schemas/ChatContentStartEvent","debug":"#/components/schemas/ChatDebugEvent","message-end":"#/components/schemas/ChatMessageEndEvent","message-start":"#/components/schemas/ChatMessageStartEvent","tool-call-delta":"#/components/schemas/ChatToolCallDeltaEvent","tool-call-end":"#/components/schemas/ChatToolCallEndEvent","tool-call-start":"#/components/schemas/ChatToolCallStartEvent","tool-plan-delta":"#/components/schemas/ChatToolPlanDeltaEvent"},"propertyName":"type"},"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"}]},"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).\n\nFollow the [Migration Guide](https://docs.cohere.com/v2/docs/migrating-v1-to-v2) for instructions on moving from API v1 to API v2.\n","terminator":"[DONE]"}}},"/v2/embed":{"post":{"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.\n\nEmbeddings can be used to create text classifiers as well as empower semantic search. To learn more about embeddings, see the embedding page.\n\nIf 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).","operationId":"embedv2","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"embedding_types":{"default":["float"],"description":"Specifies the types of embeddings you want to get back. Can be one or more of the following types.\n\n* `\"float\"`: Use this when you want to get back the default float embeddings. Supported with all Embed models.\n* `\"int8\"`: Use this when you want to get back signed int8 embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"uint8\"`: Use this when you want to get back unsigned int8 embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"binary\"`: Use this when you want to get back signed binary embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"ubinary\"`: Use this when you want to get back unsigned binary embeddings. Supported with Embed v3.0 and newer Embed models.\n* `\"base64\"`: Use this when you want to get back base64 embeddings. Supported with Embed v3.0 and newer Embed models.","items":{"$ref":"#/components/schemas/EmbeddingType"},"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"images":{"description":"An array of image data URIs for the model to embed.\n\nThe 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.\n\nImage embeddings are supported with Embed v3.0 and newer models.\n\nFor **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.\n\nFor **Embed v4.0 and newer** models, there is no limit on the number of images per call. The combined size of all images in the request must be at most `20MB`.","items":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"minItems":1,"type":"array","x-fern-audiences":["public"]},"input_type":{"$ref":"#/components/schemas/EmbedInputType","x-fern-audiences":["public"]},"inputs":{"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.","items":{"$ref":"#/components/schemas/EmbedInput"},"type":"array","x-fern-audiences":["public"]},"max_tokens":{"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.","type":"integer","x-fern-audiences":["public"]},"model":{"description":"ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).","type":"string","writeOnly":true,"x-fern-audiences":["public"]},"output_dimension":{"description":"The number of dimensions of the output embedding. This is only available for `embed-v4` and newer models.\nPossible values are `256`, `512`, `1024`, and `1536`. The default is `1536`.","type":"integer","x-fern-audiences":["public"]},"priority":{"default":0,"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.","maximum":999,"minimum":0,"type":"integer","x-fern-audiences":["public"]},"texts":{"description":"An array of strings for the model to embed. Maximum number of texts per call is `96`.","items":{"type":"string","writeOnly":true,"x-fern-audiences":["public"]},"maxItems":96,"minItems":1,"type":"array","writeOnly":true,"x-fern-audiences":["public"]},"truncate":{"default":"END","description":"One of `NONE|START|END` to specify how the API will handle inputs longer than the maximum token length.\n\nPassing `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.\n\nIf `NONE` is selected, when the input exceeds the maximum input token length an error will be returned.","enum":["NONE","START","END"],"type":"string","writeOnly":true,"x-fern-audiences":["public"]}},"required":["input_type","model"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"V2EmbedRequest"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedByTypeResponse"}}},"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"}},"summary":"Embed API (v2)","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v2/embed\");\nrequest.Content = new StringContent(\"{\\\"embedding_types\\\":[\\\"float\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"inputs\\\":[{\\\"content\\\":[{\\\"image_url\\\":{\\\"url\\\":\\\"string\\\"},\\\"type\\\":\\\"image_url\\\"}]}],\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"output_dimension\\\":0,\\\"priority\\\":0,\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v2/embed' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"embedding_types\":[\"float\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"inputs\":[{\"content\":[{\"image_url\":{\"url\":\"string\"},\"type\":\"image_url\"}]}],\"max_tokens\":0,\"model\":\"string\",\"output_dimension\":0,\"priority\":0,\"texts\":[\"string\"],\"truncate\":\"END\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"embedding_types\":[\"float\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"inputs\":[{\"content\":[{\"image_url\":{\"url\":\"string\"},\"type\":\"image_url\"}]}],\"max_tokens\":0,\"model\":\"string\",\"output_dimension\":0,\"priority\":0,\"texts\":[\"string\"],\"truncate\":\"END\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v2/embed\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/embed\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"embedding_types\\\":[\\\"float\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"inputs\\\":[{\\\"content\\\":[{\\\"image_url\\\":{\\\"url\\\":\\\"string\\\"},\\\"type\\\":\\\"image_url\\\"}]}],\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"output_dimension\\\":0,\\\"priority\\\":0,\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/embed', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"embedding_types\":[\"float\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"inputs\":[{\"content\":[{\"image_url\":{\"url\":\"string\"},\"type\":\"image_url\"}]}],\"max_tokens\":0,\"model\":\"string\",\"output_dimension\":0,\"priority\":0,\"texts\":[\"string\"],\"truncate\":\"END\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/embed', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"embedding_types\\\":[\\\"float\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"inputs\\\":[{\\\"content\\\":[{\\\"image_url\\\":{\\\"url\\\":\\\"string\\\"},\\\"type\\\":\\\"image_url\\\"}]}],\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"output_dimension\\\":0,\\\"priority\\\":0,\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/embed\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"embedding_types\\\":[\\\"float\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"inputs\\\":[{\\\"content\\\":[{\\\"image_url\\\":{\\\"url\\\":\\\"string\\\"},\\\"type\\\":\\\"image_url\\\"}]}],\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"output_dimension\\\":0,\\\"priority\\\":0,\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v2/embed\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"embedding_types\":[\"float\"],\"images\":[\"string\"],\"input_type\":\"classification\",\"inputs\":[{\"content\":[{\"image_url\":{\"url\":\"string\"},\"type\":\"image_url\"}]}],\"max_tokens\":0,\"model\":\"string\",\"output_dimension\":0,\"priority\":0,\"texts\":[\"string\"],\"truncate\":\"END\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/embed\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"embedding_types\\\":[\\\"float\\\"],\\\"images\\\":[\\\"string\\\"],\\\"input_type\\\":\\\"classification\\\",\\\"inputs\\\":[{\\\"content\\\":[{\\\"image_url\\\":{\\\"url\\\":\\\"string\\\"},\\\"type\\\":\\\"image_url\\\"}]}],\\\"max_tokens\\\":0,\\\"model\\\":\\\"string\\\",\\\"output_dimension\\\":0,\\\"priority\\\":0,\\\"texts\\\":[\\\"string\\\"],\\\"truncate\\\":\\\"END\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["v2-beta"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.Embed(\n\t\tcontext.TODO(),\n\t\t&cohere.V2EmbedRequest{\n\t\t\tTexts:          []string{\"hello\", \"goodbye\"},\n\t\t\tModel:          \"embed-v4.0\",\n\t\t\tInputType:      cohere.EmbedInputTypeSearchDocument,\n\t\t\tEmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Texts","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const embed = await cohere.v2.embed({\n    texts: ['hello', 'goodbye'],\n    model: 'embed-v4.0',\n    inputType: 'classification',\n    embeddingTypes: ['float'],\n  });\n  console.log(embed);\n})();\n","name":"Texts","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\ntext_inputs = [\n    {\n        \"content\": [\n            {\"type\": \"text\", \"text\": \"hello\"},\n            {\"type\": \"text\", \"text\": \"goodbye\"}\n        ]\n    },\n]\n\nresponse = co.embed(\n    inputs=text_inputs,\n    model=\"embed-v4.0\",\n    input_type=\"classification\",\n    embedding_types=[\"float\"],\n)\nprint(response)\n","name":"Texts","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClient()\n\n\nasync def main():\n    response = await co.embed(\n        texts=[\"hello\", \"goodbye\"],\n        model=\"embed-v4.0\",\n        input_type=\"classification\",\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Texts (async)","sdk":"python"},{"code":"package embedv2post; /* (C)2024 */\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2EmbedRequest;\nimport com.cohere.api.types.EmbedByTypeResponse;\nimport com.cohere.api.types.EmbedInputType;\nimport java.util.List;\n\npublic class EmbedPost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    EmbedByTypeResponse response =\n        cohere\n            .v2()\n            .embed(\n                V2EmbedRequest.builder()\n                    .model(\"embed-v4.0\")\n                    .inputType(EmbedInputType.CLASSIFICATION)\n                    .texts(List.of(\"hello\", \"goodbye\"))\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Texts","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/embed \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"embed-v4.0\",\n    \"texts\": [\"hello\", \"goodbye\"],\n    \"input_type\": \"classification\",\n    \"embedding_types\": [\"float\"]\n  }'\n","name":"Texts","sdk":"curl"}],"request":{"embedding_types":["float"],"input_type":"classification","model":"embed-v4.0","texts":["hello","goodbye"]},"response":{"body":{"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,-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]]},"id":"da6e531f-54c6-4a73-bf92-f60566d8d753","meta":{"api_version":{"is_experimental":true,"version":"2"},"billed_units":{"input_tokens":2},"warnings":["You are using an experimental version, for more information please refer to https://docs.cohere.com/reference/about"]},"texts":["hello","goodbye"]}}},{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\t// Fetch the image\n\tresp, err := http.Get(\"https://cohere.com/favicon-32x32.png\")\n\tif err != nil {\n\t\tlog.Println(\"Error fetching the image:\", err)\n\t\treturn\n\t}\n\tdefer resp.Body.Close()\n\n\t// Read the image content\n\tbuffer, err := io.ReadAll(resp.Body)\n\tif err != nil {\n\t\tlog.Println(\"Error reading the image content:\", err)\n\t\treturn\n\t}\n\n\tstringifiedBuffer := base64.StdEncoding.EncodeToString(buffer)\n\tcontentType := resp.Header.Get(\"Content-Type\")\n\timageBase64 := fmt.Sprintf(\"data:%s;base64,%s\", contentType, stringifiedBuffer)\n\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tembed, err := co.V2.Embed(\n\t\tcontext.TODO(),\n\t\t&cohere.V2EmbedRequest{\n\t\t\tImages:         []string{imageBase64},\n\t\t\tModel:          \"embed-v4.0\",\n\t\t\tInputType:      cohere.EmbedInputTypeImage,\n\t\t\tEmbeddingTypes: []cohere.EmbeddingType{cohere.EmbeddingTypeFloat},\n\t\t},\n\t)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", embed)\n}\n","name":"Images","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const image = await fetch('https://cohere.com/favicon-32x32.png');\n  const buffer = await image.arrayBuffer();\n  const stringifiedBuffer = Buffer.from(buffer).toString('base64');\n  const contentType = image.headers.get('content-type');\n  const imageBase64 = `data:${contentType};base64,${stringifiedBuffer}`;\n\n  const embed = await cohere.v2.embed({\n    model: 'embed-v4.0',\n    inputType: 'image',\n    embeddingTypes: ['float'],\n    images: [imageBase64],\n  });\n  console.log(embed);\n})();\n","name":"Images","sdk":"typescript"},{"code":"import cohere\nimport requests\nimport base64\n\nco = cohere.ClientV2()\n\nimage = requests.get(\"https://cohere.com/favicon-32x32.png\")\nstringified_buffer = base64.b64encode(image.content).decode(\"utf-8\")\ncontent_type = image.headers[\"Content-Type\"]\nimage_base64 = f\"data:{content_type};base64,{stringified_buffer}\"\n\nimage_inputs = [\n    {\n        \"content\": [\n            {\n                \"type\": \"image_url\",\n                \"image_url\": {\"url\": image_base64}\n            }\n        ]\n    }\n]\n\nresponse = co.embed(\n    model=\"embed-v4.0\",\n    input_type=\"image\",\n    embedding_types=[\"float\"],\n    inputs=image_inputs\n)\n\nprint(response)\n","name":"Images","sdk":"python"},{"code":"package embedv2post; /* (C)2024 */\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2EmbedRequest;\nimport com.cohere.api.types.EmbedByTypeResponse;\nimport com.cohere.api.types.EmbedInputType;\nimport com.cohere.api.types.EmbeddingType;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.net.HttpURLConnection;\nimport java.net.MalformedURLException;\nimport java.net.URI;\nimport java.net.URL;\nimport java.util.Base64;\nimport java.util.List;\n\npublic class EmbedImagePost {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    try {\n      URI uri = URI.create(\"https://cohere.com/favicon-32x32.png\");\n      URL url = uri.toURL();\n      HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n      connection.connect();\n\n      InputStream inputStream = connection.getInputStream();\n      byte[] buffer = inputStream.readAllBytes();\n      inputStream.close();\n\n      String imageBase64 =\n          String.format(\n              \"data:%s;base64,%s\",\n              connection.getHeaderField(\"Content-Type\"),\n              Base64.getEncoder().encodeToString(buffer));\n\n      EmbedByTypeResponse response =\n          cohere\n              .v2()\n              .embed(\n                  V2EmbedRequest.builder()\n                      .model(\"embed-v4.0\")\n                      .inputType(EmbedInputType.IMAGE)\n                      .images(List.of(imageBase64))\n                      .embeddingTypes(List.of(EmbeddingType.FLOAT))\n                      .build());\n\n      System.out.println(response);\n    } catch (MalformedURLException e) {\n      System.err.println(\"Invalid URL: \" + e.getMessage());\n    } catch (IOException e) {\n      System.err.println(\"I/O error: \" + e.getMessage());\n    }\n  }\n}\n","name":"Images","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/embed \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"embed-v4.0\",\n    \"input_type\": \"image\",\n    \"embedding_types\": [\"float\"],\n    \"images\": [\"data:image/jpeg;base64,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\"]\n  }'\n","name":"Images","sdk":"curl"}],"request":{"embedding_types":["float"],"images":["data:image/jpeg;base64,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"],"input_type":"image","model":"embed-v4.0"},"response":{"body":{"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,0.000050604343,-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,-0.00009846687,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,-0.00008481741,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,0.000072181225,-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,0.00004631281,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,0.000075519085,-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]]},"id":"5807ee2e-0cda-445a-9ec8-864c60a06606","images":[{"bit_depth":24,"format":"jpeg","height":400,"width":400}],"meta":{"api_version":{"version":"2"},"billed_units":{"images":1}},"texts":[]}}}],"x-fern-sdk-group-name":"v2","x-fern-sdk-method-name":"embed"}},"/v2/parse":{"post":{"description":"Parse a document image into structured output. Use `output_format` to select\nblocks or markdown (default).\n\nCurrently supports `document.type = image_url` only (data URI or remote http(s)\nimage URL). PDF / file URL inputs are not yet supported.\n\nImage limits: 20 MB file size; 50 megapixels or 200 MB decoded (whichever is\nexceeded first).\n","operationId":"parsev2","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"document":{"$ref":"#/components/schemas/ParseDocument"},"model":{"description":"The name of a compatible Cohere parse model.","type":"string"},"output_format":{"$ref":"#/components/schemas/ParseOutputFormat"}},"required":["document","model"],"type":"object","x-fern-type-name":"ParseRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParseResponse"}}},"description":"OK"},"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"}},"summary":"Parse API (v2)","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v2/parse\");\nrequest.Content = new StringContent(\"{\\\"document\\\":{\\\"image_url\\\":\\\"string\\\",\\\"type\\\":\\\"image_url\\\"},\\\"model\\\":\\\"string\\\",\\\"output_format\\\":\\\"markdown\\\"}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v2/parse' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"document\":{\"image_url\":\"string\",\"type\":\"image_url\"},\"model\":\"string\",\"output_format\":\"markdown\"}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"document\":{\"image_url\":\"string\",\"type\":\"image_url\"},\"model\":\"string\",\"output_format\":\"markdown\"}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v2/parse\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/parse\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"document\\\":{\\\"image_url\\\":\\\"string\\\",\\\"type\\\":\\\"image_url\\\"},\\\"model\\\":\\\"string\\\",\\\"output_format\\\":\\\"markdown\\\"}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/parse', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"document\":{\"image_url\":\"string\",\"type\":\"image_url\"},\"model\":\"string\",\"output_format\":\"markdown\"}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/parse', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"document\\\":{\\\"image_url\\\":\\\"string\\\",\\\"type\\\":\\\"image_url\\\"},\\\"model\\\":\\\"string\\\",\\\"output_format\\\":\\\"markdown\\\"}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/parse\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"document\\\":{\\\"image_url\\\":\\\"string\\\",\\\"type\\\":\\\"image_url\\\"},\\\"model\\\":\\\"string\\\",\\\"output_format\\\":\\\"markdown\\\"}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v2/parse\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"document\":{\"image_url\":\"string\",\"type\":\"image_url\"},\"model\":\"string\",\"output_format\":\"markdown\"}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/parse\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"document\\\":{\\\"image_url\\\":\\\"string\\\",\\\"type\\\":\\\"image_url\\\"},\\\"model\\\":\\\"string\\\",\\\"output_format\\\":\\\"markdown\\\"}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["v2-beta"],"x-fern-examples":[{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.Parse(\n\t\tcontext.TODO(),\n\t\t&cohere.ParseRequest{\n\t\t\tModel: \"parse-v5.0\",\n\t\t\tDocument: &cohere.ParseDocument{\n\t\t\t\tImageUrl: \"https://cohere.com/favicon-32x32.png\",\n\t\t\t},\n\t\t\tOutputFormat: cohere.ParseOutputFormatMarkdown.Ptr(),\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Markdown","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const response = await cohere.v2.parse({\n    model: 'parse-v5.0',\n    document: {\n      type: 'image_url',\n      imageUrl: 'https://cohere.com/favicon-32x32.png',\n    },\n    outputFormat: 'markdown',\n  });\n  console.log(response);\n})();\n","name":"Markdown","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.parse(\n    model=\"parse-v5.0\",\n    document={\n        \"type\": \"image_url\",\n        \"image_url\": \"https://cohere.com/favicon-32x32.png\",\n    },\n    output_format=\"markdown\",\n)\n\nprint(response)\n","name":"Markdown","sdk":"python"},{"code":"import asyncio\n\nimport cohere\n\nco = cohere.AsyncClientV2()\n\n\nasync def main():\n    response = await co.parse(\n        model=\"parse-v5.0\",\n        document={\n            \"type\": \"image_url\",\n            \"image_url\": \"https://cohere.com/favicon-32x32.png\",\n        },\n        output_format=\"markdown\",\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Markdown (async)","sdk":"python"},{"code":"package parsev2post; /* (C)2024 */\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.ParseRequest;\nimport com.cohere.api.types.ParseDocument;\nimport com.cohere.api.types.ParseOutputFormat;\nimport com.cohere.api.types.ParseResponse;\n\npublic class Markdown {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ParseResponse response =\n        cohere\n            .v2()\n            .parse(\n                ParseRequest.builder()\n                    .model(\"parse-v5.0\")\n                    .document(\n                        ParseDocument.builder()\n                            .imageUrl(\"https://cohere.com/favicon-32x32.png\")\n                            .build())\n                    .outputFormat(ParseOutputFormat.MARKDOWN)\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Markdown","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/parse \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"parse-v5.0\",\n    \"document\": {\n      \"type\": \"image_url\",\n      \"image_url\": \"https://cohere.com/favicon-32x32.png\"\n    },\n    \"output_format\": \"markdown\"\n  }'\n","name":"Markdown","sdk":"curl"}],"request":{"document":{"image_url":"https://cohere.com/favicon-32x32.png","type":"image_url"},"model":"parse-v5.0","output_format":"markdown"},"response":{"body":{"id":"8f2a1c3e-4b5d-6e7f-8091-a2b3c4d5e6f7","meta":{"api_version":{"version":"2"},"billed_units":{"pages":1}},"pages":[{"index":0,"markdown":{"content":"# Sample Document\n\nCohere builds AI that understands language.\n\n![Company logo](img-0)\n","images":[{"bounding_box":{"bottom_right_x":48,"bottom_right_y":44,"top_left_x":12,"top_left_y":8},"bounding_box_normalized":{"bottom_right_x":0.15,"bottom_right_y":0.14,"top_left_x":0.04,"top_left_y":0.03},"category":"logo","description":"Company logo","id":"img-0"}]},"type":"markdown"}]}}},{"code-samples":[{"code":"package main\n\nimport (\n\t\"context\"\n\t\"log\"\n\t\"os\"\n\n\tcohere \"github.com/cohere-ai/cohere-go/v2\"\n\t\"github.com/cohere-ai/cohere-go/v2/client\"\n)\n\nfunc main() {\n\tco := client.NewClient(client.WithToken(os.Getenv(\"CO_API_KEY\")))\n\n\tresp, err := co.V2.Parse(\n\t\tcontext.TODO(),\n\t\t&cohere.ParseRequest{\n\t\t\tModel: \"parse-v5.0\",\n\t\t\tDocument: &cohere.ParseDocument{\n\t\t\t\tImageUrl: \"https://cohere.com/favicon-32x32.png\",\n\t\t\t},\n\t\t\tOutputFormat: cohere.ParseOutputFormatBlocks.Ptr(),\n\t\t},\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tlog.Printf(\"%+v\", resp)\n}\n","name":"Blocks","sdk":"go"},{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const response = await cohere.v2.parse({\n    model: 'parse-v5.0',\n    document: {\n      type: 'image_url',\n      imageUrl: 'https://cohere.com/favicon-32x32.png',\n    },\n    outputFormat: 'blocks',\n  });\n  console.log(response);\n})();\n","name":"Blocks","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\nresponse = co.parse(\n    model=\"parse-v5.0\",\n    document={\n        \"type\": \"image_url\",\n        \"image_url\": \"https://cohere.com/favicon-32x32.png\",\n    },\n    output_format=\"blocks\",\n)\n\nprint(response)\n","name":"Blocks","sdk":"python"},{"code":"import asyncio\n\nimport cohere\n\nco = cohere.AsyncClientV2()\n\n\nasync def main():\n    response = await co.parse(\n        model=\"parse-v5.0\",\n        document={\n            \"type\": \"image_url\",\n            \"image_url\": \"https://cohere.com/favicon-32x32.png\",\n        },\n        output_format=\"blocks\",\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Blocks (async)","sdk":"python"},{"code":"package parsev2post; /* (C)2024 */\n\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.ParseRequest;\nimport com.cohere.api.types.ParseDocument;\nimport com.cohere.api.types.ParseOutputFormat;\nimport com.cohere.api.types.ParseResponse;\n\npublic class Blocks {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    ParseResponse response =\n        cohere\n            .v2()\n            .parse(\n                ParseRequest.builder()\n                    .model(\"parse-v5.0\")\n                    .document(\n                        ParseDocument.builder()\n                            .imageUrl(\"https://cohere.com/favicon-32x32.png\")\n                            .build())\n                    .outputFormat(ParseOutputFormat.BLOCKS)\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Blocks","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/parse \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"parse-v5.0\",\n    \"document\": {\n      \"type\": \"image_url\",\n      \"image_url\": \"https://cohere.com/favicon-32x32.png\"\n    },\n    \"output_format\": \"blocks\"\n  }'\n","name":"Blocks","sdk":"curl"}],"request":{"document":{"image_url":"https://cohere.com/favicon-32x32.png","type":"image_url"},"model":"parse-v5.0","output_format":"blocks"},"response":{"body":{"id":"1a2b3c4d-5e6f-7081-92a3-b4c5d6e7f809","meta":{"api_version":{"version":"2"},"billed_units":{"pages":1}},"pages":[{"blocks":[{"text":{"content":"# Sample Document\n\nCohere builds AI that understands language."},"type":"text"},{"image":{"bounding_box":{"bottom_right_x":48,"bottom_right_y":44,"top_left_x":12,"top_left_y":8},"bounding_box_normalized":{"bottom_right_x":0.15,"bottom_right_y":0.14,"top_left_x":0.04,"top_left_y":0.03},"category":"logo","description":"Company logo","id":"img-0"},"type":"image"}],"index":0,"type":"blocks"}]}}}],"x-fern-sdk-group-name":"v2","x-fern-sdk-method-name":"parse"}},"/v2/rerank":{"post":{"description":"This endpoint takes in a query and a list of texts and produces an ordered array with each text assigned a relevance score.","operationId":"rerankv2","parameters":[{"$ref":"#/components/parameters/RequestSource"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"documents":{"description":"A list of texts that will be compared to the `query`.\nFor optimal performance we recommend against sending more than 1,000 documents in a single request.\n\n**Note**: long documents will automatically be truncated to the value of `max_tokens_per_doc`.\n\n**Note**: structured data should be formatted as YAML strings for best performance.","items":{"type":"string"},"type":"array","x-fern-audiences":["public"]},"max_tokens_per_doc":{"description":"Defaults to `4096`. Long documents will be automatically truncated to the specified number of tokens.","type":"integer","x-fern-audiences":["public"]},"model":{"description":"The identifier of the model to use, eg `rerank-v3.5`.","type":"string","x-fern-audiences":["public"]},"priority":{"default":0,"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.","maximum":999,"minimum":0,"type":"integer","x-fern-audiences":["public"]},"query":{"description":"The search query","type":"string","x-fern-audiences":["public"]},"top_n":{"description":"Limits the number of returned rerank results to the specified value. If not passed, all the rerank results will be returned.","minimum":1,"type":"integer","x-fern-audiences":["public"]}},"required":["documents","model","query"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"V2RerankRequest"}}},"description":""},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"id":{"type":"string","x-fern-audiences":["public"]},"meta":{"$ref":"#/components/schemas/ApiMeta","x-fern-audiences":["public"]},"results":{"description":"An ordered list of ranked documents","items":{"properties":{"index":{"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)","type":"integer","x-fern-audiences":["public"]},"relevance_score":{"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","format":"float","type":"number","x-fern-audiences":["public"]}},"required":["index","relevance_score"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"V2RerankResponseResultsItem"},"type":"array","x-fern-audiences":["public"]}},"required":["results"],"type":"object","x-fern-audiences":["public"],"x-fern-type-name":"V2RerankResponse"}}},"description":"OK"},"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"}},"summary":"Rerank API (v2)","x-codeSamples":[{"lang":"csharp","source":"using var client = new HttpClient();\nusing var request = new HttpRequestMessage(HttpMethod.Post, \"https://api.cohere.com/v2/rerank\");\nrequest.Content = new StringContent(\"{\\\"documents\\\":[\\\"string\\\"],\\\"max_tokens_per_doc\\\":0,\\\"model\\\":\\\"string\\\",\\\"priority\\\":0,\\\"query\\\":\\\"string\\\",\\\"top_n\\\":0}\", Encoding.UTF8, \"application/json\");\nusing var response = await client.SendAsync(request);"},{"lang":"curl","source":"curl -X POST 'https://api.cohere.com/v2/rerank' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"documents\":[\"string\"],\"max_tokens_per_doc\":0,\"model\":\"string\",\"priority\":0,\"query\":\"string\",\"top_n\":0}'"},{"lang":"go","source":"package main\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\tbody := strings.NewReader(`{\"documents\":[\"string\"],\"max_tokens_per_doc\":0,\"model\":\"string\",\"priority\":0,\"query\":\"string\",\"top_n\":0}`)\n\treq, err := http.NewRequestWithContext(ctx, \"POST\", \"https://api.cohere.com/v2/rerank\", body)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treq.Header.Set(\"Content-Type\", \"application/json\")\n\tresp, err := http.DefaultClient.Do(req)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer resp.Body.Close()\n}"},{"lang":"java","source":"var request = HttpRequest.newBuilder(URI.create(\"https://api.cohere.com/v2/rerank\"))\n    .method(\"POST\", HttpRequest.BodyPublishers.noBody())\n    .header(\"Content-Type\", \"application/json\")\n    .method(\"POST\", HttpRequest.BodyPublishers.ofString(\"{\\\"documents\\\":[\\\"string\\\"],\\\"max_tokens_per_doc\\\":0,\\\"model\\\":\\\"string\\\",\\\"priority\\\":0,\\\"query\\\":\\\"string\\\",\\\"top_n\\\":0}\"))\n    .build();\nvar response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());"},{"lang":"javascript-fetch","source":"const response = await fetch('https://api.cohere.com/v2/rerank', {\n  method: 'POST',\n  headers: { 'Content-Type': 'application/json' },\n  body: JSON.stringify({\"documents\":[\"string\"],\"max_tokens_per_doc\":0,\"model\":\"string\",\"priority\":0,\"query\":\"string\",\"top_n\":0}),\n});\nconst data = await response.json();"},{"lang":"node","source":"const response = await fetch('https://api.cohere.com/v2/rerank', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: \"{\\\"documents\\\":[\\\"string\\\"],\\\"max_tokens_per_doc\\\":0,\\\"model\\\":\\\"string\\\",\\\"priority\\\":0,\\\"query\\\":\\\"string\\\",\\\"top_n\\\":0}\" });\nconsole.log(await response.json());"},{"lang":"php","source":"<?php\n$request = curl_init(\"https://api.cohere.com/v2/rerank\");\ncurl_setopt($request, CURLOPT_CUSTOMREQUEST, \"POST\");\ncurl_setopt($request, CURLOPT_POSTFIELDS, \"{\\\"documents\\\":[\\\"string\\\"],\\\"max_tokens_per_doc\\\":0,\\\"model\\\":\\\"string\\\",\\\"priority\\\":0,\\\"query\\\":\\\"string\\\",\\\"top_n\\\":0}\");\ncurl_setopt($request, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);\n$response = curl_exec($request);\ncurl_close($request);"},{"lang":"python","source":"import requests\n\nresponse = requests.request(\n    \"POST\",\n    \"https://api.cohere.com/v2/rerank\",\n    headers={\"Content-Type\": \"application/json\"},\n    data='{\"documents\":[\"string\"],\"max_tokens_per_doc\":0,\"model\":\"string\",\"priority\":0,\"query\":\"string\",\"top_n\":0}',\n)\nprint(response.json())"},{"lang":"ruby","source":"require 'net/http'\n\nuri = URI(\"https://api.cohere.com/v2/rerank\")\nrequest = Net::HTTPGenericRequest.new(\"POST\", true, true, uri)\nrequest['Content-Type'] = 'application/json'\nrequest.body = \"{\\\"documents\\\":[\\\"string\\\"],\\\"max_tokens_per_doc\\\":0,\\\"model\\\":\\\"string\\\",\\\"priority\\\":0,\\\"query\\\":\\\"string\\\",\\\"top_n\\\":0}\"\nresponse = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }"}],"x-fern-audiences":["v2-beta"],"x-fern-examples":[{"code-samples":[{"code":"import { CohereClient } from 'cohere-ai';\n\nconst cohere = new CohereClient({});\n\n(async () => {\n  const rerank = await cohere.v2.rerank({\n    documents: [\n      'Carson City is the capital city of the American state of Nevada.',\n      'The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.',\n      '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.',\n      '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.',\n      '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.',\n    ],\n    query: 'What is the capital of the United States?',\n    topN: 3,\n    model: 'rerank-v4.0-pro',\n  });\n\n  console.log(rerank);\n})();\n","name":"Cohere TypeScript SDK","sdk":"typescript"},{"code":"import cohere\n\nco = cohere.ClientV2()\n\ndocs = [\n    \"Carson City is the capital city of the American state of Nevada.\",\n    \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n    \"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.\",\n    \"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.\",\n    \"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.\",\n]\n\nresponse = co.rerank(\n    model=\"rerank-v4.0-pro\",\n    query=\"What is the capital of the United States?\",\n    documents=docs,\n    top_n=3,\n)\nprint(response)\n","name":"Sync","sdk":"python"},{"code":"import cohere\nimport asyncio\n\nco = cohere.AsyncClientV2()\n\nasync def main():\n    response = await co.rerank(\n        model=\"rerank-v4.0-pro\",\n        query=\"What is the capital of the United States?\",\n        documents=[\n            \"Carson City is the capital city of the American state of Nevada.\",\n            \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n            \"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.\",\n            \"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.\",\n            \"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.\",\n        ],\n        top_n=3\n    )\n    print(response)\n\n\nasyncio.run(main())\n","name":"Async","sdk":"python"},{"code":"/* (C)2024 */\nimport com.cohere.api.Cohere;\nimport com.cohere.api.resources.v2.requests.V2RerankRequest;\nimport com.cohere.api.resources.v2.types.V2RerankResponse;\nimport java.util.List;\n\npublic class RerankV2Post {\n  public static void main(String[] args) {\n    Cohere cohere = Cohere.builder().clientName(\"snippet\").build();\n\n    V2RerankResponse response =\n        cohere\n            .v2()\n            .rerank(\n                V2RerankRequest.builder()\n                    .model(\"rerank-v4.0-pro\")\n                    .query(\"What is the capital of the United States?\")\n                    .documents(\n                        List.of(\n                            \"Carson City is the capital city of the American state of Nevada.\",\n                            \"The Commonwealth of the Northern Mariana Islands is a group of islands\"\n                                + \" in the Pacific Ocean. Its capital is Saipan.\",\n                            \"Capitalization or capitalisation in English grammar is the use of a\"\n                                + \" capital letter at the start of a word. English usage varies\"\n                                + \" from capitalization in other languages.\",\n                            \"Washington, D.C. (also known as simply Washington or D.C., and\"\n                                + \" officially as the District of Columbia) is the capital of the\"\n                                + \" United States. It is a federal district.\",\n                            \"Capital punishment has existed in the United States since before the\"\n                                + \" United States was a country. As of 2017, capital punishment is\"\n                                + \" legal in 30 of the 50 states.\"))\n                    .topN(3)\n                    .build());\n\n    System.out.println(response);\n  }\n}\n","name":"Cohere java SDK","sdk":"java"},{"code":"curl --request POST \\\n  --url https://api.cohere.com/v2/rerank \\\n  --header 'accept: application/json' \\\n  --header 'content-type: application/json' \\\n  --header \"Authorization: bearer $CO_API_KEY\" \\\n  --data '{\n    \"model\": \"rerank-v4.0-pro\",\n    \"query\": \"What is the capital of the United States?\",\n    \"top_n\": 3,\n    \"documents\": [\"Carson City is the capital city of the American state of Nevada.\",\n                  \"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.\",\n                  \"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.\",\n                  \"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.\",\n                  \"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.\"]\n  }'\n","name":"cURL","sdk":"curl"}],"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."],"model":"rerank-v4.0-pro","query":"What is the capital of the United States?","top_n":3},"response":{"body":{"id":"07734bd2-2473-4f07-94e1-0d9f0e6843cf","meta":{"api_version":{"is_experimental":false,"version":"2"},"billed_units":{"search_units":1}},"results":[{"index":3,"relevance_score":0.999071},{"index":4,"relevance_score":0.7867867},{"index":0,"relevance_score":0.32713068}]}}}],"x-fern-sdk-group-name":"v2","x-fern-sdk-method-name":"rerank"}}},"security":[{"bearerAuth":[]}],"servers":[{"description":"production","url":"https://api.cohere.com"}],"tags":[{"description":"Datasets API","name":"/datasets"},{"description":"Connectors API","name":"/connectors"},{"description":"Embed Jobs API","name":"/embed-jobs"},{"description":"Finetuning API (Beta)","name":"/finetuning"}]}