examples

This endpoint allows clients to upload examples to a specified dataset by sending a multipart/form-data POST request. Each form part contains either JSON-encoded data or binary attachment files associated with an example.

post/api/v1/platform/datasets/{dataset_id}/examples

Request

  • Base URL
    https://api.smith.langchain.com
  • URL
    https://api.smith.langchain.com/api/v1/platform/datasets/{dataset_id}/examples
  • Auth
    • API key in header X-API-Key
    • or API key in header X-Tenant-Id
    • or HTTP bearer

Path parameters

dataset_idstring uuid required

Dataset ID

Request body multipart/form-data

{example_id}string binary required

The Example info as JSON. Can have fields 'metadata', 'split', 'use_source_run_io', 'source_run_id', 'created_at', 'modified_at'

{example_id}.inputsstring binary required

The Example inputs as JSON

{example_id}.outputsstring binary

THe Example outputs as JSON

{example_id}.attachments.{name}string binary

File attachment named {name}

Response

Created

as_ofstring
countinteger
example_idsstring[]

Example response

{
  "as_of": "2024-01-21T10:00:00.123456Z",
  "count": 1,
  "example_ids": [
    "[\"123e4567-e89b-12d3-a456-426614174000\"]"
  ]
}

Changes