Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fern/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
announcement:
message: "🚀 New Open Source Agentic Coding Model: Meet North Mini Code! (<a href=\"https://docs.cohere.com/docs/north-mini-code-1.0\" target=\"_blank\">Learn more</a>)"
message: "🚀 Meet Parse: Cohere's latest model that transforms enterprise documents into AI-ready data. (<a href=\"https://docs.cohere.com/docs/parse\" target=\"_blank\">Learn more</a>)"

instances:
- url: cohere.docs.buildwithfern.com
Expand Down Expand Up @@ -950,4 +950,4 @@ metadata:

analytics:
segment:
write-key: ${SEGMENT_WRITE_KEY}
write-key: ${SEGMENT_WRITE_KEY}
23 changes: 23 additions & 0 deletions fern/pages/changelog/2026-08-27-parse-v5.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Meet Cohere Parse
slug: "changelog/parse"
createdAt: "Mon Aug 23 2026 08:06:00 (EST)"
hidden: false
description: >-
This announcement covers the release of Cohere Parse, Cohere's document parsing model for visual understanding and document intelligence workflows.
---

Today we are releasing Cohere [Parse](/docs/parse).

Parse (model ID: `parse-v5.0`) turns complex documents into clean, structured Markdown ready for downstream AI workflows. The 2.3B-parameter multimodal model extracts text in reading order, tables, lists, forms, images and captions, page boundaries, and visual element locations.

Outputs include Markdown/HTML content, HTML-formatted tables, bounding boxes, and image descriptions — preserving both document structure and layout for easier rendering and processing.

Key specs: 8K context window · ~4.6GB model size · Markdown output

## Availability

Cohere Parse is available through the Parse API, as well as Microsoft Foundry and [AWS SageMaker](https://aws.amazon.com/marketplace/pp/prodview-25vdn5x53zqgo).
For single-tenant deployment, Parse is also available in [Model Vault](/docs/model-vault).

For more details, see the [model documentation](/docs/parse).
2 changes: 1 addition & 1 deletion fern/pages/deployment-options/cohere-on-aws.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Developers can access a range of Cohere language models in a private environment

[Amazon SageMaker](https://aws.amazon.com/pm/sagemaker/) is a service that allows customers to prepare data and build, train, and deploy machine learning (ML) models for any use case with fully managed infrastructure, tools, and workflows.

Cohere offers a comprehensive suite of generative and embedding models through SageMaker on a range of hardware options, many of which support finetuning for deeper customization and performance.
Cohere offers a comprehensive suite of generative, embedding, and parsing models through SageMaker on a range of hardware options, many of which support finetuning for deeper customization and performance.

[View Cohere's products on Amazon SageMaker](https://aws.amazon.com/marketplace/seller-profile?id=87af0c85-6cf9-4ed8-bee0-b40ce65167e0).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,48 @@ results = co.rerank(
print(result)
```

### Parsing

You can use this code to invoke Cohere's Parse model on Amazon SageMaker. Resize and convert the image to WEBP first so the data URI stays under the payload limit.

```python PYTHON
from PIL import Image
import base64
import cohere

IMG_MAX_SIZE = 2048
with Image.open("page.png") as img:
img.thumbnail(
(IMG_MAX_SIZE, IMG_MAX_SIZE), Image.Resampling.LANCZOS
)
if img.mode != "RGB":
img = img.convert("RGB")
img.save("page.webp", format="WEBP", quality=90)

with open("page.webp", "rb") as f:
b64 = base64.b64encode(f.read()).decode()
image_url = f"data:image/webp;base64,{b64}"

co = cohere.SagemakerClientV2(
aws_region="us-east-1",
aws_access_key="...",
aws_secret_key="...",
aws_session_token="...",
)

# Invoke the model and print the response
result = co.parse(
model="<YOUR PARSE ENDPOINT NAME>", # On SageMaker, you create a model name that you'll pass here.
document={
"type": "image_url",
"image_url": image_url,
},
output_format="markdown", # or "blocks"
)

print(result)
```

## Access Via Amazon SageMaker Jumpstart

Cohere's models are also available on Amazon SageMaker Jumpstart, which makes it easy to access the models with just a few clicks.
Expand Down
74 changes: 67 additions & 7 deletions fern/pages/deployment-options/cohere-on-microsoft-azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ keywords: "generative AI, large language models, Microsoft Azure"
createdAt: "Mon Apr 08 2024 14:53:59 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Tue Feb 25 2025 13:15:36 Mountain Standard Time (MST)"
---
In this document, you learn how to use [Azure AI Foundry](https://ai.azure.com/) to deploy the Cohere Command, Embedding, and Rerank models on Microsoft's Azure cloud computing platform. For more information, refer to the [Azure AI Foundry documentation](https://learn.microsoft.com/en-us/azure/ai-foundry/what-is-azure-ai-foundry).
In this document, you learn how to use [Azure AI Foundry](https://ai.azure.com/) to deploy the Cohere Command, Embed, Rerank, and Parse models on Microsoft's Azure cloud computing platform. For more information, refer to the [Azure AI Foundry documentation](https://learn.microsoft.com/en-us/azure/ai-foundry/what-is-azure-ai-foundry).

The following models are available through Azure AI Foundry with pay-as-you-go, token-based billing:

Expand All @@ -22,20 +22,20 @@ The following models are available through Azure AI Foundry with pay-as-you-go,
- Cohere Rerank V4.0 Pro
- Cohere Rerank V4.0 Fast

The following model is available through Azure AI Foundry with pay-as-you-go, page-based billing:

- Parse v5

## Prerequisites

Whether you're using Command, Embed, or Rerank, the initial set up is the same. You'll need:
Whether you're using Command, Embed, Rerank, or Parse the initial set up is the same. You'll need:

- An Azure subscription with a valid payment method. Free or trial Azure subscriptions won't work. If you don't have an Azure subscription, create a [paid Azure account](https://azure.microsoft.com/pricing/purchase-options/pay-as-you-go) to begin.
- An [Azure AI hub resource](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/create-azure-ai-resource). Note: for Cohere models, the pay-as-you-go deployment offering is only available with AI hubs created in the `East US`, `East US 2`, `North Central US`, `South Central US`, `Sweden Central`, `West US` or `West US 3` regions.
- An [Azure AI project](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/create-projects) in Azure AI Studio.
- Azure role-based access controls (Azure RBAC) are used to grant access to operations in Azure AI Studio. To perform the required steps, your user account must be assigned the Azure AI Developer role on the resource group. For more information on permissions, see [Role-based access control in Azure AI Studio](https://learn.microsoft.com/en-us/azure/ai-studio/concepts/rbac-ai-studio).

For workflows based around Command, Embed, or Rerank, you'll also need to create a deployment and consume the model. Here are links for more information:

- **Command:** [create a Command deployment](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-command#create-a-new-deployment) and then [consume the Command model](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-command#create-a-new-deployment).
- **Embed:** [create an Embed deployment](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-embed#create-a-new-deployment) and [consume the Embed model](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-embed#consume-the-cohere-embed-models-as-a-service).
- **Rerank**: [create a Rerank deployment](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-rerank) and [consume the Rerank model](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-rerank#consume-the-cohere-rerank-models-as-a-service).
For workflows based around Command, Embed, Rerank, or Parse you'll also need to create a deployment and consume the model. [Here is a link for more information on how to deploy a Foundry model](https://learn.microsoft.com/en-us/azure/foundry/foundry-models/how-to/deploy-foundry-models).

## Text Generation

Expand Down Expand Up @@ -204,6 +204,45 @@ response = co.rerank(
)
```

## Parse

You can use the Cohere SDK to invoke Parse on Azure AI Foundry. Parse converts document images into structured Markdown (or content blocks). Resize and convert the image to WEBP first so the data URI stays under the payload limit.

```python PYTHON
from PIL import Image
import base64
import cohere

IMG_MAX_SIZE = 2048
with Image.open("page.png") as img:
img.thumbnail(
(IMG_MAX_SIZE, IMG_MAX_SIZE), Image.Resampling.LANCZOS
)
if img.mode != "RGB":
img = img.convert("RGB")
img.save("page.webp", format="WEBP", quality=90)

with open("page.webp", "rb") as f:
b64 = base64.b64encode(f.read()).decode()
image_url = f"data:image/webp;base64,{b64}"

co = cohere.ClientV2(
api_key="<key>",
base_url="https://<endpoint>.<region>.inference.ai.azure.com/",
)

response = co.parse(
model="parse-v5.0",
document={
"type": "image_url",
"image_url": image_url,
},
output_format="markdown", # or "blocks"
)

print(response)
```

## Using the Cohere SDK

You can use the Cohere SDK client to consume Cohere models that are deployed via Azure AI Foundry. This means you can leverage the SDK's features such as RAG, tool use, structured outputs, and more.
Expand Down Expand Up @@ -234,6 +273,12 @@ co_rerank = cohere.Client(
api_key="AZURE_INFERENCE_CREDENTIAL",
base_url="AZURE_MODEL_ENDPOINT", # Example - https://cohere-rerank-v4-pro-xyz.eastus.models.ai.azure.com/
)

# For Parse models
co_parse = cohere.ClientV2(
api_key="AZURE_INFERENCE_CREDENTIAL",
base_url="AZURE_MODEL_ENDPOINT", # Example - https://cohere-parse-v5-xyz.eastus.models.ai.azure.com/
)
```

### Chat
Expand Down Expand Up @@ -304,6 +349,21 @@ results = co_rerank.rerank(
)
```

### Parse

```python PYTHON
response = co_parse.parse(
model="parse-v5.0",
document={
"type": "image_url",
"image_url": image_url, # data URI; see the Parse section above
},
output_format="markdown", # or "blocks"
)

print(response)
```

Here are some other examples for [Command](https://github.com/Azure/azureml-examples/blob/main/sdk/python/foundation-models/cohere/cohere-cmdR.ipynb) and [Embed](https://github.com/Azure/azureml-examples/blob/main/sdk/python/foundation-models/cohere/cohere-embed.ipynb).

The important thing to understand is that our new and existing customers can call the models from Azure while still leveraging their integration with the Cohere SDK.
60 changes: 60 additions & 0 deletions fern/pages/get-started/quickstart/parse-best-practices.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Document Parsing - best practices
slug: /docs/parse-best-practices

description: "Best practices for image format, resolution, and throughput when using the Cohere Parse API."
image: "../../../assets/images/f1cc130-cohere_meta_image.jpg"
keywords: "Cohere, document parsing, parse, image format, best practices, throughput"
---

## Quick Recommendations

| Use Case | Format | Resize | Notes |
|----------|--------|--------|-------|
| General Parsing (recommended) | WebP 90 | 2048/1536px long side | Good balance for most workloads |
| Tables, financial, high precision docs | PNG or JPEG 95 | 2048px long side | Preserves fine lines and cell borders |

**For throughput**: resize to 1536px on the long side before sending. Minimal loss in parsing quality while significantly improving throughput.

## Resize and Convert

The key operation is `thumbnail` which resizes in-place while preserving aspect ratio:

```python PYTHON
from PIL import Image

IMG_MAX_SIZE = 2048

with Image.open("page.png") as img:
img.thumbnail(
(IMG_MAX_SIZE, IMG_MAX_SIZE), Image.Resampling.LANCZOS
)
if img.mode != "RGB":
img = img.convert("RGB")
img.save("page.webp", format="WEBP", quality=90)
```

## Send a Parse Request

```python PYTHON
import os
import base64
import cohere

co = cohere.Client(
"COHERE_API_KEY"
) # Get your free API key here: https://dashboard.cohere.com/api-keys

with open("page.webp", "rb") as f:
b64 = base64.b64encode(f.read()).decode()

data_uri = f"data:image/webp;base64,{b64}"

response = co.parse(
model="parse-v5.0",
document={"type": "image_url", "image_url": data_uri},
)

for page in response.pages:
print(page.markdown.content)
```
Loading
Loading