Cohere Port
This is the reference integration for Harbor `http_api` Action Model authoring for Cohere.
Cohere Port
Purpose
This is the reference integration for Harbor http_api Action Model authoring for Cohere.
Use it when:
- building Cohere actions in Harbor
- extending the Dock / Hub Cohere entry
- teaching Codex or OpenClaw how to map a model API into Harbor Ports and Harbor Actions
Harbor Port worksheet
Product
- Product: Cohere API
- Publisher slug:
cohere - Publisher name:
Cohere - Category:
AI - Tags:
cohere,ai,llm,chat,embeddings,rerank,tokenize,embed-jobs
Safe Harbor Port metadata
- Kind:
http_api - Label:
Cohere API - Description:
Cohere API connection managed locally through Harbor. - Base URL:
https://api.cohere.com/ - Auth mode:
header_token - Auth header name:
Authorization - Auth token prefix:
Bearer
Hidden local config
authToken
Harbor stores the token locally only. Dock / Hub manifests must never contain it.
Harbor action design notes
Cohere is a good Harbor fit when we stay on fixed /v1 and /v2 routes, keep variable identifiers in typed input.path values, and keep prompts or embedding inputs inside input.body.
Good Harbor Cohere actions:
- stable
GETroutes like/v1/modelsand/v1/embed-jobs/{id} - fixed
POSTroutes like/v2/chat,/v2/rerank,/v2/embed, and/v1/embed-jobs requestBodyMode: "none"for reads and bodyless cancellationsrequestBodyMode: "json"for model calls and helper operationsresultMode: "json_summary"for all imported actions
Keep approval on by default for model execution and state changes. Chat, rerank, embeddings, batches, connectors, fine-tuning, and legacy text endpoints can all contain sensitive text, state changes, or cost-bearing inputs.
Still avoid for now:
- vendor features that require non-JSON or non-fixed-route request handling
- audio transcription surfaces until Harbor has a clean multipart story
- dataset creation until Harbor has a clean multipart story
- optional vendor-specific headers such as
X-Client-Nameas required Harbor config
Imported Cohere actions
Automatic read actions
list-models->GET /v1/modelsget-model->GET /v1/models/{model}check-api-key->POST /v1/check-api-keylist-embed-jobs->GET /v1/embed-jobsget-embed-job->GET /v1/embed-jobs/{id}list-batches->GET /v2/batchesget-batch->GET /v2/batches/{id}list-datasets->GET /v1/datasetsget-dataset-usage->GET /v1/datasets/usageget-dataset->GET /v1/datasets/{id}list-connectors->GET /v1/connectorsget-connector->GET /v1/connectors/{id}list-finetuned-models->GET /v1/finetuning/finetuned-modelsget-finetuned-model->GET /v1/finetuning/finetuned-models/{id}list-finetuned-model-events->GET /v1/finetuning/finetuned-models/{finetuned_model_id}/eventslist-finetuned-model-training-step-metrics->GET /v1/finetuning/finetuned-models/{finetuned_model_id}/training-step-metrics
Approval-friendly write actions
chat->POST /v2/chatrerank->POST /v2/rerankembed-text->POST /v2/embedcreate-embed-job->POST /v1/embed-jobscancel-embed-job->POST /v1/embed-jobs/{id}/cancelcreate-batch->POST /v2/batchescancel-batch->POST /v2/batches/{id}:canceldelete-dataset->DELETE /v1/datasets/{id}tokenize->POST /v1/tokenizedetokenize->POST /v1/detokenizererank-v1->POST /v1/rerankembed-v1->POST /v1/embedclassify-text->POST /v1/classifysummarize-text->POST /v1/summarizecreate-connector->POST /v1/connectorsupdate-connector->PATCH /v1/connectors/{id}delete-connector->DELETE /v1/connectors/{id}authorize-connector-oauth->POST /v1/connectors/{id}/oauth/authorizecreate-finetuned-model->POST /v1/finetuning/finetuned-modelsupdate-finetuned-model->PATCH /v1/finetuning/finetuned-models/{id}delete-finetuned-model->DELETE /v1/finetuning/finetuned-models/{id}
Why these actions
These routes fit Harbor's Action Model well because they:
- stay under one fixed Cohere API origin
- use stable, documented routes with typed identifiers
- keep prompt-bearing inputs inside explicit JSON request bodies
- can be reviewed as named capabilities
- keep hidden auth entirely local to Harbor Node
Suggested operator workflow
- Import the Cohere Dock entry from Dock / Hub.
- Configure the local Cohere API key in Harbor Node.
- Validate
list-modelsfirst to confirm local auth. - Keep prompt-bearing, connector, batch, fine-tuning, and legacy text actions on
require_approvalunless there is a deliberate local policy reason not to. - Use
check-api-key,list-models, and the other read actions as the first validation path before enabling writes.
Suggested agent workflow
- Inspect the existing Cohere Harbor Port.
- Inspect live actions and drafts.
- Propose only fixed-route, Harbor-safe additions that match the current auth and body model, and leave multipart or SSE-only routes in TechnicalLimitations.
- Validate and test drafts.
- Request publish instead of self-publishing unless Harbor explicitly allows it.
Agents should never:
- ask Harbor for the stored API key
- widen Cohere into a generic arbitrary HTTP proxy
- bypass approval for prompt-bearing or state-changing actions without operator intent
Current update strategy
For now, Cohere updates are manual:
- update the Dock / Hub integration document in
apps/hub/catalog/integrations/cohere/cohere-api.json - update
apps/hub/catalog/integrations/cohere/ActionMap.mdwhen the action set changes materially - update
apps/hub/catalog/integrations/cohere/TechnicalLimitations.mdwhen Harbor platform limits block a Cohere route - bump the manifest version when the action set changes materially
- re-import into Harbor or create new drafts from the updated Dock entry
Official reference starting points
- Cohere API overview:
https://docs.cohere.com/reference/about - Cohere models list:
https://docs.cohere.com/reference/list-models - Cohere get model:
https://docs.cohere.com/reference/get-model - Cohere chat:
https://docs.cohere.com/reference/chat - Cohere rerank:
https://docs.cohere.com/reference/rerank - Cohere embed:
https://docs.cohere.com/reference/embed - Cohere embed jobs:
https://docs.cohere.com/reference/create-embed-job - Cohere batches:
https://docs.cohere.com/reference/create-a-batch - Cohere datasets:
https://docs.cohere.com/reference/list-datasets - Cohere connectors:
https://docs.cohere.com/reference/list-connectors - Cohere fine-tuning:
https://docs.cohere.com/reference/list-finetuned-models - Cohere tokenize:
https://docs.cohere.com/reference/tokenize - Cohere detokenize:
https://docs.cohere.com/reference/detokenize