# Vervollständigung des Netzteils

> **POST** `/v3/mesh/complete`

Vervollständigen Sie segmentierte Netzteile und reparieren Sie fehlende Bereiche.

## Anforderungsparameter

### Anforderungsheader

| Parameter | Typ | Erforderlich | Standard | Beschreibung |
| :-: | :-: | :-: | :-: | :-: |
| Content-Type | Zeichenfolge | Ja | — | `application/json` |
| Authorization | Zeichenfolge | Ja | — | `Bearer {api_key}` |

### Anforderungstext

| Parameter | Typ | Erforderlich | Standard | Beschreibung |
| :-: | :-: | :-: | :-: | :-: |
| input | Zeichenfolge | Ja | — | task_id einer `mesh/segment`-Aufgabe, beginnend mit `task_` |
| model | Zeichenfolge | Nein | `v1.0-20250506` | Abschlussmodellversion (derzeit einzige Version) |
| part_names | string[] | Nein | Alle Teile | Liste der auszufüllenden Teilenamen. Wenn es weggelassen wird, sind alle Teile vervollständigt |
| completion_mode | Zeichenfolge | Nein | `ai_completion` | Abschlussmodus: `ai_completion` (KI-Diffusions-Vervollständigung, Standard) oder `quick_cap` (schnelle Lochfüllung ohne KI) |

## Fordern Sie Beispiele an

### KI-Vervollständigung (Standard)

#### curl

```bash
curl -X POST https://openapi.tripo3d.ai/v3/mesh/complete \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {api_key}" \
  -d '{
    "input": "task_abc123",
    "part_names": ["head", "body"]
  }'
```

### Python

```python
import requests

url = "https://openapi.tripo3d.ai/v3/mesh/complete"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer {api_key}"
}
payload = {
    "input": "task_abc123",
    "part_names": ["head", "body"]
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```

### JavaScript

```javascript
const url = "https://openapi.tripo3d.ai/v3/mesh/complete";

const response = await fetch(url, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer {api_key}"
  },
  body: JSON.stringify({
    input: "task_abc123",
    part_names: ["head", "body"]
  })
});

const data = await response.json();
console.log(data);
```

### Schnelle Lochfüllung

#### curl

```bash
curl -X POST https://openapi.tripo3d.ai/v3/mesh/complete \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {api_key}" \
  -d '{
    "input": "task_abc123",
    "completion_mode": "quick_cap"
  }'
```

#### Python

```python
payload = {
    "input": "task_abc123",
    "completion_mode": "quick_cap"
}
```

#### JavaScript

```javascript
body: JSON.stringify({
  input: "task_abc123",
  completion_mode: "quick_cap"
})
```

## Antwort

### Erfolgreiche Antwort

```json
{
  "code": 0,
  "data": {
    "task_id": "task_def456"
  }
}
```

### Antwortfelder

| Parameter | Typ | Beschreibung |
| :-: | :-: | :-: |
| code | ganze Zahl | Statuscode. `0` zeigt Erfolg an |
| data.task_id | Zeichenfolge | Eindeutiger Aufgabenbezeichner, der zum Abfragen des Abschlussfortschritts und -ergebnisses verwendet wird |

## Fehlercodes

| HTTP Statuscode | Fehlercode | Beschreibung | Empfehlung |
| :-: | :-: | :-: | :-: |
| 429 | 2000 | Generationslimit überschritten | Reduzieren Sie die Anforderungsrate und versuchen Sie es später erneut |
| 400 | 2002 | Nicht unterstützter Anforderungsparameter | Überprüfen Sie die Parameternamen und Wertebereiche des Anforderungshauptteils |
| 400 | 2006 | Ungültiger Aufgabentyp der Eingabequelle | Bestätigen Sie, dass task_id einer `mesh/segment`-Aufgabe entspricht |
| 400 | 2007 | Der Status der Quellaufgabe ist nicht erfolgreich | Warten Sie, bis die Quellaufgabe abgeschlossen ist, bevor Sie mit der Fertigstellung beginnen |
| 403 | 2010 | Unzureichende Credits | Guthaben aufladen und erneut versuchen |
