> ## 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.

# Descargar pesos entrenados

> Genera una URL temporal para descargar un artefacto de entrenamiento de Fastino.

Devuelve una URL prefirmada del artefacto entrenado. Consulta la URL devuelta por separado para descargar el archivo.

## Solicitud

<ParamField header="X-API-Key" type="string" required>
  Tu clave de API de Fastino.
</ParamField>

<ParamField path="job_id" type="string" required>
  UUID del trabajo de entrenamiento.
</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>

## Respuesta

<ResponseField name="success" type="boolean">
  Si se generó la URL.
</ResponseField>

<ResponseField name="job_id" type="string">
  UUID del trabajo de entrenamiento.
</ResponseField>

<ResponseField name="download_url" type="string">
  URL prefirmada temporal del artefacto.
</ResponseField>

<ResponseField name="expires_in_seconds" type="integer">
  Tiempo de vida de la URL. El valor predeterminado es 3600 segundos.
</ResponseField>

<ResponseField name="file_name" type="string">
  Nombre de archivo sugerido para la descarga.
</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>
  La URL prefirmada es una credencial de portador temporal. No la registres, no la subas al control de versiones, no la persistas ni la compartas. Descarga el artefacto rápidamente y guárdalo según tu política de manejo de datos.
</Warning>

Para solicitar la URL y descargar el artefacto en un solo flujo:

```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")"
```

Este ejemplo requiere `jq`.

Un trabajo desconocido o un trabajo sin un artefacto descargable devuelve un error `4xx` específico de la solicitud.
