from keras.models import Sequential
from keras.layers import InputLayer
model = Sequential()
model.add(InputLayer(input_shape=(784,)))
This is all, but since it was not mentioned in the Sequential model tutorial, I will write it as an article.
Confirmed with Python 3.5.2, Keras 1.1.2.
from keras.models import Sequential
from keras.layers.core import Dense
model = Sequential()
model.add(Dense(256, activation='relu', input_dim=784))
model.add(Dense(128, activation='relu'))
model.add(Dense(10, activation='relu'))
How to write according to the tutorial. In this case, the shape of the input layer is defined in the intermediate layer. Also, if you comment out the first add to remove the Dense (256) layer, The input shape will be undefined.
from keras.models import Sequential
from keras.layers import InputLayer
from keras.layers.core import Dense
model = Sequential()
model.add(InputLayer(input_shape=(784,)))
model.add(Dense(256, activation='relu'))
model.add(Dense(128, activation='relu'))
model.add(Dense(10, activation='relu'))
The flow of input layer → intermediate layer → output layer has become easier to understand.