## GET /v1/sessions/{session_id}/images/{id}

Read an image sent with a message to a session. Each message lists the IDs of its images.

Required permissions: read:sessions.
API key: Supported.
CLI user token: Supported.
Session token: Requires the ellipsis:api scope, and the session's permissions.ellipsis rules must allow the operation.
Higher permission levels include lower levels: read < write < delete.
Grant match patterns can further restrict access to individual resources.

### Response

```text
{
  "data": str,
  "media_type": str
}
```

### Python

```python
import os

from ellipsis import Ellipsis

client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])

result = client.sessions.image("session_example", "...")
print(result)
```

### TypeScript

```typescript
import { Ellipsis } from '@ellipsis-dev/sdk';

const client = new Ellipsis({
  apiKey: process.env.ELLIPSIS_API_TOKEN!,
});

const result = await client.sessions.image("session_example", '...');
console.log(result);
```

### cURL

```bash
curl "https://api.ellipsis.dev/v1/sessions/{session_id}/images/{id}" \
  -H "Authorization: Bearer $ELLIPSIS_API_TOKEN"
```

### Response schema

```json
{
  "properties": {
    "data": {
      "type": "string"
    },
    "media_type": {
      "enum": [
        "image/png",
        "image/jpeg",
        "image/gif",
        "image/webp"
      ],
      "type": "string"
    }
  },
  "required": [
    "media_type",
    "data"
  ],
  "type": "object"
}
```
