Principally, there are 4 ways to construct an RNN architecture (the 4 right ones in the picture):

### 1. **One-to-one**

You might use a Dense layer as you are not processing sequences:

```
model.add(Dense(output_size, input_shape=input_shape))
```

### 2. **One-to-many**

This option is not supported well as chaining models is not very easy in Keras so the following version is the easiest one:

```
model.add(RepeatVector(number_of_times, input_shape=input_shape))
model.add(LSTM(output_size, return_sequences=True))
```

### 3. **Many-to-one**

Actually your code snippet is (allmost) example of this approach:

```
model = Sequential()
model.add(LSTM(1, input_shape=(timesteps, data_dim)))
```

### 4. **Many-to-many**

This is the easiest snippet when length of input and output matches the number of recurent steps:

```
model = Sequential()
model.add(LSTM(1, input_shape=(timesteps, data_dim), return_sequences=True))
```

More info here

### 5. **Many-to-many when number of steps differ from input/output length**

This is freaky hard in Keras. There are no easy code snippets to code that.