← All tutorialsData

CSV importer with auto-types

User uploads a messy CSV. data.csv_parse infers types, returns rows. Then extract_structured normalizes column names.

Cost~$0.005 per file
Operations
data.csv_parsetext_generation.extract_structured

Prerequisites

  • data.csv_parse enabled.

Walkthrough

1. Parse

Send the file as text or as a URL. Returns headers + typed rows + parse warnings.

bash# Type-inferred CSV parse with header detection.
curl -X POST https://www.upivia.com/v1/service-requests \
  -H "Authorization: Bearer $AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service":"data",
    "operation":"csv_parse",
    "payload":{"url":"https://uploads.example.com/leads.csv","has_header":true}
  }'

2. Normalize column names

Pass the headers to extract_structured with a target schema. LLM maps `Email Addr` to `email`, `Co.` to `company`, etc.

Next steps

Audit every call at /audit-logs, watch spend at /usage, and tune budgets per service on the agent's page.

Create an account →