Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cohere

connector.cohere · ai

Chat with Command models, create embeddings, rerank documents and classify text.

Vendor API documentation: https://docs.cohere.com/reference/about

Authentication

MethodCredential kindAuth kindFieldsTest request
API keycohere/api_keybearertoken (secret)yes

Actions

Node type connector.cohere. Choose a resource and an operation; each operation has its own parameters.

Chat

OperationIDEffectPaginatedCassette tests
Send chat messageschat.completewrites3

Send chat messages

Operation chat.complete. Generates a reply with a Command model, optionally grounded on documents with citations.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"command-a-03-2025"yesValues from lookup chat_models.
messagesfixed_collectionyes
messages.roleoptions"user"One of system, user, assistant.
messages.contentstringyes
documentsjsonGrounding documents. JSON array of strings or {id, data} objects the reply may cite.
optionscollection
options.temperaturenumber
options.max_tokensnumber
options.pnumberTop P.
options.knumberTop K.
options.seednumber
options.stop_sequencesstringComma-separated (up to 5).
options.frequency_penaltynumber
options.presence_penaltynumber
options.safety_modeoptionsOne of CONTEXTUAL, STRICT, OFF.
options.citation_modeoptionsOne of FAST, ACCURATE, OFF.
options.json_outputbooleanfalseJSON output.
options.json_schemajsonJSON schema. Schema the JSON output must follow (requires JSON output).
options.thinkingoptionsReasoning. One of enabled, disabled.
options.thinking_budgetnumberReasoning token budget.
simplifybooleantrueSimplify output. Return reply text, citations and usage only.

Embedding

OperationIDEffectPaginatedCassette tests
Create embeddingsembedding.createreads2

Create embeddings

Operation embedding.create.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"embed-v4.0"yesValues from lookup embed_models.
input_typeoptions"search_document"yesOne of search_document, search_query, classification, clustering.
input_modeoptions"single"Input. One of single, batch.
textstringyesinput_mode = single
textsjsonyesinput_mode = batchJSON array of up to 96 strings.
embedding_typeoptions"float"One of float, int8, uint8, binary, ubinary, base64.
output_dimensionoptionsembed-v4.0 and newer only. One of 256, 512, 1024, 1536.
truncateoptions"END"One of NONE, START, END.

Rerank

OperationIDEffectPaginatedCassette tests
Rerank documentsrerank.runreads1

Rerank documents

Operation rerank.run. Orders documents by relevance to a query. One output item per returned document.

NameTypeDefaultRequiredShown whenDescription
modelresource_locator"rerank-v3.5"yesValues from lookup rerank_models.
querystringyes
documentsjsonyesJSON array of strings (structured documents should be serialized to YAML or text first).
top_nnumberTop N. Return only the best N documents.
max_tokens_per_docnumber4096Max tokens per document.

Classification

OperationIDEffectPaginatedCassette tests
Classify textclassification.classifyreads1

Classify text

Operation classification.classify. Labels text using a fine-tuned classifier or few-shot examples.

NameTypeDefaultRequiredShown whenDescription
modelresource_locatoryesValues from lookup classify_models.
inputsjsonyesTexts. JSON array of strings to classify (up to 96).
examplesfixed_collectionLabeled examples, needed when the model is not a fine-tuned classifier.
examples.textstringyes
examples.labelstringyes
truncateoptions"END"One of NONE, START, END.

Tokenizer

OperationIDEffectPaginatedCassette tests
Tokenize texttokenizer.tokenizereads1
Detokenize tokenstokenizer.detokenizereads1

Tokenize text

Operation tokenizer.tokenize.

NameTypeDefaultRequiredShown whenDescription
modelresource_locatoryesValues from lookup chat_models.
textstringyes

Detokenize tokens

Operation tokenizer.detokenize.

NameTypeDefaultRequiredShown whenDescription
modelresource_locatoryesValues from lookup chat_models.
tokensjsonyesJSON array of token ids.

Model

OperationIDEffectPaginatedCassette tests
List modelsmodel.listreadsyes1
Get a modelmodel.getreads1

List models

Operation model.list.

NameTypeDefaultRequiredShown whenDescription
return_allbooleanfalse
limitnumber50return_all = false
endpointoptionsCompatible with. One of chat, embed, classify, rerank, generate, summarize.

Get a model

Operation model.get.

NameTypeDefaultRequiredShown whenDescription
modelresource_locatoryesValues from lookup chat_models.

Lookups

Lookups fill dropdowns and resource pickers in the editor from the vendor API.

LookupDepends onSearchDescription
chat_modelsclient-side
embed_modelsclient-side
rerank_modelsclient-side
classify_modelsclient-side

Import

No exported node type imports to this node.

Provenance

Written from the vendor’s documentation: