API Guide

Everything you need to integrate CSV normalization into your SaaS.

Quick Start (5 Minutes)

Step 1: Get an API Key

All requests require an API key. Contact us to obtain one, or use this test key for development:

kn_test_3f91a8d2c7b84f5e9a12

Free tier: 25 requests/day, 1MB max file size.

About the test API key: The test key is provided for evaluation and may reach its daily limit. Creating your own API key ensures reliable access with your own quota.

Step 2: Make Your First Request

curl -X POST https://csvnormalization-api-katenoji.com/v1/normalize \
  -H "X-API-Key: kn_test_3f91a8d2c7b84f5e9a12" \
  -F "file=@sample.csv"

Step 3: Understand the Response

  • schema: Inferred data types for each column
  • data: Normalized rows as JSON objects
  • meta: Processing details, original headers, and warnings

Same input always produces the same output. All assumptions are surfaced as warnings.

KateNoji Guarantees

  • Never drops rows
  • Same input always produces same output
  • All assumptions are surfaced as warnings

1. Overview

The CSV Normalization API is a drop-in service that transforms messy, inconsistent CSV uploads into clean, structured JSON with predictable schemas.

Problems it solves:

2. When to Use This API

3. When NOT to Use It

This API normalizes structure, not business meaning. It does not:

4. Authentication

All requests to /v1/normalize require an API key passed via the X-API-Key header.

X-API-Key: kn_test_3f91a8d2c7b84f5e9a12

Contact us to obtain your API key. Keys are tied to usage tiers (free or pro) with different limits.

5. Endpoint

Method POST
URL /v1/normalize
Content-Type multipart/form-data
File Field file

6. Sample CSV

Download this intentionally messy CSV to test the API:

Download sample.csv
E-Mail Address, Created At , Amount , Active
user@test.com, 01/15/2024, $1,234.56, yes
second@test.com, 15/01/2024, 999.99, no

This sample includes:

7. Expected Output

For the sample CSV above, KateNoji returns:

{
  "schema": {
    "email_address": "string",
    "created_at": "date",
    "amount": "number",
    "active": "boolean"
  },
  "data": [
    {
      "email_address": "user@test.com",
      "created_at": "2024-01-15",
      "amount": 1234.56,
      "active": true
    },
    {
      "email_address": "second@test.com",
      "created_at": "2024-01-15",
      "amount": 999.99,
      "active": false
    }
  ],
  "meta": {
    "row_count": 2,
    "original_headers": ["E-Mail Address", " Created At ", " Amount ", " Active"],
    "detected_encoding": "utf-8",
    "detected_delimiter": ",",
    "changes": [
      "Renamed 'E-Mail Address' to 'email_address'",
      "Renamed ' Created At ' to 'created_at'",
      "Renamed ' Amount ' to 'amount'",
      "Renamed ' Active' to 'active'"
    ],
    "warnings": [
      "Row 2: Ambiguous date '15/01/2024' interpreted as DD/MM/YYYY (2024-01-15)"
    ]
  }
}

KateNoji never silently fixes ambiguous data. The warning above tells you exactly how the ambiguous date was interpreted, so you can verify it matches your expectation.

8. Example Requests

curl

curl -X POST https://csvnormalization-api-katenoji.com/v1/normalize \
  -H "X-API-Key: kn_test_3f91a8d2c7b84f5e9a12" \
  -F "file=@data.csv"

JavaScript (fetch)

const formData = new FormData();
formData.append('file', fileInput.files[0]);

const response = await fetch('/v1/normalize', {
  method: 'POST',
  headers: {
    'X-API-Key': 'kn_test_3f91a8d2c7b84f5e9a12'
  },
  body: formData
});

const result = await response.json();

Python (requests)

import requests

with open('data.csv', 'rb') as f:
    response = requests.post(
        'https://csvnormalization-api-katenoji.com/v1/normalize',
        headers={'X-API-Key': 'kn_test_3f91a8d2c7b84f5e9a12'},
        files={'file': f}
    )

result = response.json()

9. Limits

Limit Free Tier Pro Tier
Max file size 1 MB 10 MB
Requests per day 25 500
Rows per month 50,000 1,000,000

Deterministic guarantee: The same input CSV will always produce the same output JSON. No randomness, no ML models—just predictable rules.

10. Common Errors

All errors return a consistent JSON structure:

{
  "error": {
    "code": "error_code",
    "message": "Human-readable description"
  }
}

401 Unauthorized

Meaning: Missing or invalid API key.

How to fix: Include a valid X-API-Key header. Check for typos in your key.

413 Payload Too Large

Meaning: File exceeds the size limit for your tier.

How to fix: Free tier allows 1MB max. Split your file or upgrade to Pro (10MB).

400 Bad Request

Meaning: Empty file, invalid CSV format, or missing file field.

How to fix: Ensure the file is a valid CSV with at least one header row. Use file as the form field name.

429 Rate Limit Exceeded

Meaning: Daily or monthly request limit reached.

How to fix: Wait until the next day (daily reset) or next month (monthly reset). Consider upgrading for higher limits.

11. Privacy

Ready to try it out? Explore the interactive API documentation.

Open Swagger UI