# একটি ইমেজ জেনারেশন টাস্ক পান

**API:** Model API

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

প্রমাণীকৃত কলারের জন্য স্থায়ী ইমেজ টাস্ক পড়ুন।

## Base URL

- `https://openapi.felo.ai` — প্রোডাকশন

## Authentication

- `FeloBearerAuth` (http bearer) — `Authorization: Bearer <key>` হিসেবে পাঠানো Felo API key।
- `FeloApiKey` (apiKey in header `X-API-Key`) — `X-API-Key: <key>` হিসেবে পাঠানো Felo API key।

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `task_id` | path | yes | string | POST /api/v1/videos/generations থেকে পাওয়া টাস্ক id। |

## Responses

### 200 — বর্তমান টাস্ক অবস্থা

**application/json**

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

### 401 — Felo API key অবৈধ বা অনুপস্থিত

**application/json**

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

### 404 — এই অ্যাকাউন্টের জন্য টাস্ক পাওয়া যায়নি

**application/json**

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

### 503 — জেনারেশন পরিষেবা সাময়িকভাবে অনুপলব্ধ

**application/json**

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

## Schema definitions

### GenerationError

`#/components/schemas/GenerationError`

```json
{
  "type": "object",
  "description": "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": "টাস্ক ব্যর্থ হলে উপস্থিত থাকে।"
    }
  }
}
```
