Does Responses API support `stop` parameter or not?

To my understanding, this article says that Responses API supports the `stop` parameter.

https://help.openai.com/en/articles/5072518-controlling-the-length-of-openai-model-responses

However, when I tried sending a request with `stop` parameter, I received the following error response.

{
  "error": {
    "message": "Unknown parameter: 'stop'. Did you mean 'store'?",
    "type": "invalid_request_error",
    "param": "stop",
    "code": "unknown_parameter"
  }
}

And I can’t find any information regarding `stop` parameter either in the Responses API reference or in the migration guide.

Is the `stop` parameter not supported in Responses API?

Here is how to do it:

I have never tried it before.

Thanks for your quick reaction.

I tried that and received the error response mentioned in my first post.

It’s not a parameter. It’s a stop sequence. I don’t know how it’s implemented - there is no example in the docs…

Here is a simple Python example using a stop sequence with the OpenAI Responses API:

from openai import OpenAI

client = OpenAI()

response = client.responses.create(
model=“gpt-4.1-mini”,
input=“Write a short bedtime story in two sentences. End the story with the marker .”,
stop=[“END”]
)

print(response.output_text)

In this example, "END" is the stop sequence. When the model generates "END", the API stops producing more output, and the stop sequence itself is not included in response.output_text.

I tried the following request:

curl https://api.openai.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {My API Key}" \
  -d '{
    "model": "gpt-4.1-mini",
    "input": "Write a short bedtime story in two sentences. End the story with the marker .",
    "stop":["END"]
  }'

and received the error response.

{
  "error": {
    "message": "Unknown parameter: 'stop'. Did you mean 'store'?",
    "type": "invalid_request_error",
    "param": "stop",
    "code": "unknown_parameter"
  }

So, it seems that the Responses API itself supports `stop` but not with REST API?

The Responses API does not support stop sequences as an API parameter. The previous respondent is providing falsehoods.

You can read the API documentation for POST a “create response”, and see alphabetically there is no such parameter:

You will see my prior citation of this absence as a serious deficit of Responses over Chat Completions, among many:

The Responses API does not support stop sequences as an API parameter.

Thanks. Then what’s written in this article seems to be wrong. I’ve sent my feedback via the form at the bottom of the article.

https://help.openai.com/en/articles/5072518-controlling-the-length-of-openai-model-responses

What’s also confusing for me is that there’s no information regarding stop sequences in the migration guide.

But anyway, thank you for your confirmation that there is no `stop` parameter in the Responses API.

So, can you provide a working example of a Stop Sequence OR confirm that there is no Stop Sequence and what was writen https://help.openai.com/en/articles/5072518-controlling-the-length-of-openai-model-responses by OpenAI is incorrect?

My previous post was a result of a gpt-5.5 query, so I’m assuming that to also be incorrect?

Hi and welcome to the community!

You are correct, the docs are outdated.

For API-specific questions, I generally suggest using developers.openai.com. Unfortunately, those docs also look incomplete here because they state that o-series reasoning models do not support stop sequences, which is not the full picture with regards to the gpt-5 family of models.

I will ping the team to review these findings.