# create Radio Session

Retained recommendation Worker adapter. Automatic retries are disabled. 

Operation: createRadioSession
POST /api/recommendation/radio/sessions

Access: anonymous. Automatic retries: none. Redirects: manual. Request body limit: 0 bytes.
Default timeout: 30 seconds. Response limit: 16 MiB. Pagination is opt-in and bounded; an exhausted bound reports incomplete execution.

[HTML reference](/developers/api/createRadioSession) · [Authoritative schemas](/api/openapi.json)

## Wire contract

```json
{
  "operationId": "createRadioSession",
  "summary": "create Radio Session",
  "tags": [
    "recommendation"
  ],
  "description": "Retained recommendation Worker adapter. Automatic retries are disabled. ",
  "parameters": [],
  "security": [],
  "x-public-access": "anonymous",
  "x-public-side-effect": "capability",
  "x-public-body-limit": 0,
  "responses": {
    "201": {
      "description": "Successful response",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "conversationId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 200
              },
              "conversationUrl": {
                "type": "string",
                "format": "uri"
              },
              "token": {
                "type": "string",
                "minLength": 1,
                "maxLength": 8192
              },
              "expiresAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^\\d{4}-(?:0[1-9]|1[0-2])-(?:[12]\\d|0[1-9]|3[01])[T ](?:0\\d|1\\d|2[0-3])(?::[0-5]\\d){2}(?:\\.\\d{1,9})?(?:Z| ?[+-](?:0\\d|1\\d|2[0-3])(?::?[0-5]\\d)?)$"
              }
            },
            "required": [
              "conversationId",
              "conversationUrl",
              "token",
              "expiresAt"
            ],
            "additionalProperties": false
          }
        }
      }
    },
    "400": {
      "description": "Request failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      }
    },
    "403": {
      "description": "Request failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      }
    },
    "413": {
      "description": "Request failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      }
    },
    "429": {
      "description": "Request failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      }
    },
    "502": {
      "description": "Request failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      }
    },
    "503": {
      "description": "Request failed",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ProblemDetails"
          }
        }
      }
    }
  }
}
```

## Synthetic examples

### curl

```bash
curl --fail-with-body --max-time 30 --max-filesize 16777216 --request POST 'https://irvinebroque.com/api/recommendation/radio/sessions' --header 'Accept: application/json'
```

### TypeScript

```typescript
import { PublicApi } from '@irvinebroque/public-api';
const api = new PublicApi();
const result = await api.radio.createSession({});
console.log(result.status, result.headers.get('content-type')); // Keep transient capabilities in memory.
```

### CLI

```bash
irvinebroque radio create-session
```
