Skip to main content
GET
/
files
# Docs for v1 can be found by changing the above selector ^
from together import Together
import os

client = Together(
    api_key=os.environ.get("TOGETHER_API_KEY"),
)

response = client.files.list()

for file in response.data:
    print(file.id)
{
  "data": [
    {
      "id": "<string>",
      "object": "<unknown>",
      "created_at": 123,
      "filename": "my_file.jsonl",
      "bytes": 123,
      "purpose": "fine-tune",
      "Processed": true,
      "FileType": "jsonl",
      "validation_report": {
        "valid": true,
        "dataset_format": "<string>",
        "dataset_has_sample_weights": true,
        "dataset_has_message_weights": true,
        "dataset_is_multimodal": true,
        "dataset_has_tools": true,
        "dataset_has_parallel_tool_calls": true,
        "dataset_has_reasoning": true,
        "nlines": 123,
        "file_id": "<string>",
        "error_type": "INVALID_FORMAT",
        "error": "<string>"
      }
    }
  ]
}

Authorizations

Authorization
string
header
default:default
required

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

Response

200 - application/json

List of files

data
object[]
required