Skip to main content
The Apps API is in beta. Its endpoints and responses may change.
These endpoints drive an app’s AI chat. Send a message and the AI builds from it, read the conversation, answer the questions the AI pauses on, and roll back changes you don’t want. Sending a message is how you build an app after you create it.

Turns

Each message starts a turn, which covers everything the AI does in response. A turn can take several minutes on a large change, and the request stays open until it settles. Each turn consumes credits. See Apps API concepts for how a turn ends. A 200 response doesn’t mean the turn succeeded, so read the result before you treat it as done. To retry a request without paying twice, see Retrying chat requests.

When the AI waits for you

Some steps pause for approval. A tool call with status set to waiting_for_user_input means the AI can’t continue until you answer it. Find it with Read conversation messages, then answer it with Submit tool-call input, or answer several at once with Submit tool-call input (batch).

Changing course

  • Stop generation stops the turn that’s running. Changes already saved as a checkpoint are kept.
  • Undo message rolls the app back to the checkpoint a message produced.
  • Edit and resend replaces an earlier message and rebuilds from there, so the changes after it are undone.

Endpoints

To retry a request safely, see Retrying chat requests.