File size: 2,157 Bytes
2ccebf1
4c0054c
 
 
 
2ccebf1
 
 
 
4c0054c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
title: NeMo DataDesigner API
emoji: 🎨
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
---

# NVIDIA NeMo DataDesigner API

REST API for synthetic data generation using NVIDIA NeMo DataDesigner with z.ai backend.

## Endpoints

| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | `/` | Health check |
| GET | `/health` | Health check |
| GET | `/models` | List available models |
| GET | `/sampler-types` | List sampler types |
| POST | `/generate` | Generate synthetic data |
| POST | `/preview` | Preview single record |

## Usage

### Generate Data

```bash
curl -X POST https://mindchain-nemo-datadesigner-api.hf.space/generate \
  -H "Content-Type: application/json" \
  -d '{
    "num_records": 5,
    "model": "glm-4.7",
    "columns": [
      {
        "name": "category",
        "type": "sampler",
        "params": {
          "sampler_type": "CATEGORY",
          "values": ["Electronics", "Books", "Clothing"]
        }
      },
      {
        "name": "review",
        "type": "llm_text",
        "params": {
          "prompt": "Write a brief product review for a {{ category }} item."
        }
      }
    ]
  }'
```

### Preview

```bash
curl -X POST https://mindchain-nemo-datadesigner-api.hf.space/preview \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-4.7",
    "columns": [
      {"name": "category", "type": "sampler", "params": {"sampler_type": "CATEGORY", "values": ["A", "B"]}},
      {"name": "text", "type": "llm_text", "params": {"prompt": "Generate text about {{ category }}"}}
    ]
  }'
```

## Available Models

| ID | Name | Use Case |
|----|------|----------|
| `glm-5` | GLM-5 (Opus) | Complex reasoning |
| `glm-4.7` | GLM-4.7 (Sonnet) | General purpose |
| `glm-4.5-air` | GLM-4.5-Air (Haiku) | Fast generation |

## Column Types

| Type | Description | Required Params |
|------|-------------|-----------------|
| `sampler` | Statistical samplers | `sampler_type`, type-specific params |
| `llm_text` | LLM text generation | `prompt` |
| `llm_code` | Code generation | `prompt`, `language` |
| `llm_structured` | Structured JSON | `prompt`, `schema` |