Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.woodwide.ai/llms.txt

Use this file to discover all available pages before exploring further.

The Wood Wide AI API lets you upload tabular data, train models, and run inference without managing infrastructure, feature engineering, or model tuning. This guide walks you through authentication, uploading a dataset, training a model, and running your first prediction.

1. Get Your API Key

  1. Go to console.woodwide.ai and sign in to your Wood Wide AI account.
  2. Navigate to API keys.
  3. Click CREATE KEY.
  4. Copy the key securely.
Your API key grants full API access to your account. Store it securely and never share or commit it to version control.

2. Set Up Authentication

Store your API key in an environment variable and configure the base URL. All API requests require a Bearer token in the Authorization header.
import os
import requests

api_key = os.getenv("WOODWIDE_API_KEY")
base_url = "https://api.woodwide.ai"

headers = {"Authorization": f"Bearer {api_key}"}

3. Upload a Dataset

Upload a CSV or Parquet file to create a new dataset. The response contains a nested dataset object with the id you will use for training. Direct file uploads are limited to 30 MB. For larger files, see the signed-URL upload flow.
with open("train.csv", "rb") as f:
    response = requests.post(
        f"{base_url}/datasets",
        headers=headers,
        files={"file": ("train.csv", f, "text/csv")},
        data={"dataset_name": "my_dataset"},
    )

result = response.json()
dataset_id = result["dataset"]["id"]
print(f"Dataset created: {dataset_id}")

4. Train a Model

Start a training job by specifying the dataset, a model name, the model type, and the target column. The response contains a nested model object with the id.
response = requests.post(
    f"{base_url}/models/train",
    headers=headers,
    json={
        "model_name": "my_model",
        "model_type": "prediction",
        "dataset_id": dataset_id,
        "label_column": "target",
    },
)

result = response.json()
model_id = result["model"]["id"]
print(f"Training started: {model_id}")
Training a second model on the same dataset — even if it is a different model type — is significantly faster than the first training run.

5. Wait for Training to Complete

Poll the model status until it transitions to ready. Model status progresses through queued -> training -> ready (or failed).
import time

while True:
    status_response = requests.get(
        f"{base_url}/models/{model_id}",
        headers=headers,
    )
    status = status_response.json()["status"]

    if status == "ready":
        print("Model is ready.")
        break
    elif status == "failed":
        print("Training failed.")
        break

    print(f"Status: {status} - waiting...")
    time.sleep(5)

6. Run Inference

Send a test CSV to the trained model for synchronous predictions. File uploads for inference are limited to 30 MB.
with open("test.csv", "rb") as f:
    response = requests.post(
        f"{base_url}/models/{model_id}/infer",
        headers=headers,
        files={"file": ("test.csv", f, "text/csv")},
        data={"output_type": "json"},
    )

results = response.json()
print(results["data"])

Next Steps

Explore the full API reference to learn about all available endpoints:
  • Datasets — Upload, list, and manage your datasets and dataset versions
  • Models — Train, retrain, and inspect models across six model types (prediction, anomaly, embedding, clustering, factors, search)
  • Inference — Synchronous, asynchronous, and batch inference
  • Jobs — Monitor training and inference job status and retrieve results

Security Reminder

  • Keep your API key private and rotate it periodically.
  • All requests are encrypted in transit (TLS 1.2+).
  • For questions about authentication or API onboarding, contact support@woodwide.ai.