# Ottenere un'attività di generazione immagini

**API:** Model API

**Endpoint:** `GET /api/v1/images/generations/{task_id}`

Leggere l'attività immagine persistente del chiamante autenticato.

## Base URL

- `https://openapi.felo.ai` — Produzione

## Authentication

- `FeloBearerAuth` (http bearer) — Chiave API Felo inviata come `Authorization: Bearer <key>`.
- `FeloApiKey` (apiKey in header `X-API-Key`) — Chiave API Felo inviata come `X-API-Key: <key>`.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `task_id` | path | yes | string | ID attività restituito da POST /api/v1/videos/generations. |

## Responses

### 200 — Stato corrente dell'attività

**application/json**

Schema: `ImageGenerationTask` (`#/components/schemas/ImageGenerationTask`)

### 401 — Chiave API Felo non valida o mancante

**application/json**

Schema: `GenerationError` (`#/components/schemas/GenerationError`)

### 404 — Attività non trovata per questo account

**application/json**

Schema: `GenerationError` (`#/components/schemas/GenerationError`)

### 503 — Servizio di generazione temporaneamente non disponibile

**application/json**

Schema: `GenerationError` (`#/components/schemas/GenerationError`)

## Schema definitions

### GenerationError

`#/components/schemas/GenerationError`

```json
{
  "type": "object",
  "description": "Struttura di errore compatibile con OpenAI.",
  "properties": {
    "error": {
      "type": "object",
      "required": [
        "message",
        "type"
      ],
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "invalid_request_error",
            "server_error"
          ]
        },
        "param": {
          "type": "string",
          "nullable": true
        },
        "code": {
          "type": "string"
        }
      }
    }
  }
}
```

### ImageGenerationTask

`#/components/schemas/ImageGenerationTask`

```json
{
  "type": "object",
  "required": [
    "task_id",
    "status",
    "kind",
    "outputs"
  ],
  "properties": {
    "task_id": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "queued",
        "running",
        "succeeded",
        "failed",
        "interrupted"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "image"
      ]
    },
    "outputs": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "string",
            "format": "uri"
          },
          {
            "type": "object",
            "properties": {
              "url": {
                "type": "string",
                "format": "uri"
              },
              "watermark_url": {
                "type": "string",
                "format": "uri",
                "nullable": true,
                "description": "Optional watermarked version of this image."
              },
              "b64_json": {
                "type": "string"
              }
            }
          }
        ]
      }
    },
    "error": {
      "type": "object",
      "properties": {
        "message": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "code": {
          "type": "string",
          "description": "Stable failure code, e.g. file_not_found."
        },
        "param": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "description": "Presente quando l'attività non è riuscita."
    }
  }
}
```
