For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
  • Cohere API
    • About
    • Teams and Roles
    • Errors
    • Migrating From API v1 to API v2
    • Using the OpenAI SDK
  • Endpoints
      • POSTCreate a Dataset
      • GETList Datasets
      • GETGet Dataset Usage
      • GETGet a Dataset
      • DELDelete a Dataset
  • Deprecated
LogoLogodocs
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
Endpointsv1/datasets

List Datasets

GET
https://api.cohere.com/v1/datasets
GET
/v1/datasets
1import cohere
2
3co = cohere.Client()
4
5# get list of datasets
6response = co.datasets.list()
7
8print(response)
1{
2 "datasets": [
3 {
4 "id": "string",
5 "name": "string",
6 "created_at": "2024-01-15T09:30:00Z",
7 "updated_at": "2024-01-15T09:30:00Z",
8 "dataset_type": "embed-input",
9 "validation_status": "unknown",
10 "validation_error": "string",
11 "schema": "string",
12 "required_fields": [
13 "string"
14 ],
15 "preserve_fields": [
16 "string"
17 ],
18 "dataset_parts": [
19 {
20 "id": "string",
21 "name": "string",
22 "url": "string",
23 "index": 1,
24 "size_bytes": 1,
25 "num_rows": 1,
26 "original_url": "string",
27 "samples": [
28 "string"
29 ]
30 }
31 ],
32 "validation_warnings": [
33 "string"
34 ],
35 "parse_info": {},
36 "metrics": {
37 "finetune_dataset_metrics": {
38 "trainable_token_count": 1.1,
39 "total_examples": 1.1,
40 "train_examples": 1.1,
41 "train_size_bytes": 1.1,
42 "eval_examples": 1.1,
43 "eval_size_bytes": 1.1,
44 "reranker_data_metrics": {
45 "num_train_queries": 1.1,
46 "num_train_relevant_passages": 1.1,
47 "num_train_hard_negatives": 1.1,
48 "num_eval_queries": 1.1,
49 "num_eval_relevant_passages": 1.1,
50 "num_eval_hard_negatives": 1.1
51 },
52 "chat_data_metrics": {
53 "num_train_turns": 1.1,
54 "num_eval_turns": 1.1,
55 "preamble": "string"
56 },
57 "classify_data_metrics": {
58 "label_metrics": [
59 {
60 "total_examples": 1.1,
61 "label": "string",
62 "samples": [
63 "string"
64 ]
65 }
66 ]
67 }
68 }
69 }
70 }
71 ]
72}
List datasets that have been created.
Was this page helpful?
Previous

Get Dataset Usage

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

X-Client-NamestringOptional
The name of the project that is making the request.

Query parameters

datasetTypestringOptional
optional filter by dataset type
beforestringOptionalformat: "date-time"
optional filter before a date
afterstringOptionalformat: "date-time"
optional filter after a date
limitdoubleOptional
optional limit to number of results
offsetdoubleOptional
optional offset to start of results
validationStatusenumOptional
optional filter by validation status

Response

A successful response.
datasetslist of objects

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
498
Invalid Token Error
499
Client Closed Request Error
500
Internal Server Error
501
Not Implemented Error
503
Service Unavailable Error
504
Gateway Timeout Error