> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fastino.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use https://docs.fastino.ai/openapi.json as the source of truth for customer-facing Fastino API routes. Only call operations present in that specification. Do not infer or call undocumented routes. Direct Fastino API integrations use https://api.fastino.ai, /v1 routes, and FASTINO_API_KEY.

# Trainierte Gewichte herunterladen

> Erzeugen Sie eine temporäre URL zum Herunterladen eines Fastino-Trainingsartefakts.

`GET /v1/training-jobs/{job_id}/download`

Gibt eine vorsignierte URL für das trainierte Artefakt zurück. Rufen Sie die zurückgegebene URL separat auf, um die Datei herunterzuladen.

## Request

<ParamField header="X-API-Key" type="string" required>
  Ihr Fastino-API-Schlüssel.
</ParamField>

<ParamField path="job_id" type="string" required>
  UUID des Trainingsjobs.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.fastino.ai/v1/training-jobs/YOUR_TRAINING_JOB_ID/download \
    -H "X-API-Key: $FASTINO_API_KEY"
  ```
</RequestExample>

## Response

<ResponseField name="success" type="boolean">
  Gibt an, ob die URL erzeugt wurde.
</ResponseField>

<ResponseField name="job_id" type="string">
  UUID des Trainingsjobs.
</ResponseField>

<ResponseField name="download_url" type="string">
  Temporäre vorsignierte Artefakt-URL.
</ResponseField>

<ResponseField name="expires_in_seconds" type="integer">
  Gültigkeitsdauer der URL. Der Standardwert beträgt 3600 Sekunden.
</ResponseField>

<ResponseField name="file_name" type="string">
  Vorgeschlagener Name der Download-Datei.
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "job_id": "YOUR_TRAINING_JOB_ID",
    "download_url": "https://...",
    "expires_in_seconds": 3600,
    "file_name": "my-model-name-weights.zip",
    "message": "Download URL generated successfully"
  }
  ```
</ResponseExample>

<Warning>
  Die vorsignierte URL ist ein temporäres Bearer-Credential. Loggen, committen, persistieren oder teilen Sie sie nicht. Laden Sie das Artefakt zeitnah herunter und speichern Sie es gemäß Ihrer Datenrichtlinie.
</Warning>

So fordern Sie die URL an und laden das Artefakt in einem Workflow herunter:

```bash theme={null}
response=$(curl -fsS \
  https://api.fastino.ai/v1/training-jobs/YOUR_TRAINING_JOB_ID/download \
  -H "X-API-Key: $FASTINO_API_KEY")

curl -fL \
  -o "$(jq -r '.file_name' <<<"$response")" \
  "$(jq -r '.download_url' <<<"$response")"
```

Für dieses Beispiel wird `jq` benötigt.

Ein unbekannter Job oder ein Job ohne herunterladbares Artefakt gibt einen anfragespezifischen `4xx`-Fehler zurück.
