You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: reference.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1538,11 +1538,15 @@ client.embed(
1538
1538
1539
1539
**images:**`typing.Optional[typing.List[str]]`
1540
1540
1541
-
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
1541
+
An array of image data URIs for the model to embed.
1542
1542
1543
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
1543
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.
1544
1544
1545
-
Images are only supported with Embed v3.0 and newer models.
1545
+
Image embeddings are supported with Embed v3.0 and newer models.
1546
+
1547
+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.
1548
+
1549
+
For **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`.
1546
1550
1547
1551
</dd>
1548
1552
</dl>
@@ -2967,11 +2971,15 @@ client.v2.embed(
2967
2971
2968
2972
**images:**`typing.Optional[typing.List[str]]`
2969
2973
2970
-
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
2974
+
An array of image data URIs for the model to embed.
2971
2975
2972
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
2976
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.
2973
2977
2974
2978
Image embeddings are supported with Embed v3.0 and newer models.
2979
+
2980
+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.
2981
+
2982
+
For **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`.
Copy file name to clipboardExpand all lines: src/cohere/base_client.py
+14-6Lines changed: 14 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1082,11 +1082,15 @@ def embed(
1082
1082
An array of strings for the model to embed. Maximum number of texts per call is `96`.
1083
1083
1084
1084
images : typing.Optional[typing.Sequence[str]]
1085
-
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
1085
+
An array of image data URIs for the model to embed.
1086
1086
1087
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
1087
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.
1088
1088
1089
-
Images are only supported with Embed v3.0 and newer models.
1089
+
Image embeddings are supported with Embed v3.0 and newer models.
1090
+
1091
+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each image has a maximum size of `5MB`.
1092
+
1093
+
For **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`.
1090
1094
1091
1095
model : typing.Optional[str]
1092
1096
ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).
@@ -2662,11 +2666,15 @@ async def embed(
2662
2666
An array of strings for the model to embed. Maximum number of texts per call is `96`.
2663
2667
2664
2668
images : typing.Optional[typing.Sequence[str]]
2665
-
An array of image data URIs for the model to embed. Maximum number of images per call is `1`.
2669
+
An array of image data URIs for the model to embed.
2670
+
2671
+
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format.
2672
+
2673
+
Image embeddings are supported with Embed v3.0 and newer models.
2666
2674
2667
-
The image must be a valid [data URI](https://developer.mozilla.org/en-US/docs/Web/URI/Schemes/data). The image must be in either `image/jpeg`, `image/png`, `image/webp`, or `image/gif` format and has a maximum size of 5MB.
2675
+
For **Embed v3.x** models, the maximum number of images per call is `1`, and each imagehas a maximum size of `5MB`.
2668
2676
2669
-
Images are only supported with Embed v3.0 and newer models.
2677
+
For **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`.
2670
2678
2671
2679
model : typing.Optional[str]
2672
2680
ID of one of the available [Embedding models](https://docs.cohere.com/docs/cohere-embed).
0 commit comments