# Responses and stored conversations

## Create a response

**POST `/v1/responses`** accepts a string or a typed input array.

~~~json
{
  "model": "deepseek-v4.1-flash-1017",
  "input": "Explain backpressure in two sentences.",
  "max_output_tokens": 256,
  "store": false
}
~~~

For raw HTTP, concatenate the `text` values from `output[]` message entries whose content type is `output_text`. OpenAI-compatible SDKs also expose `output_text` as a convenience property. Check `status` and `incomplete_details` before treating an answer as complete.

## Continue a stored response

Save the first response by using `store: true` or omitting `store`. Send its `id` as `previous_response_id` on the next turn.

~~~json
{
  "model": "deepseek-v4.1-flash-1017",
  "previous_response_id": "resp_your_stored_response_id",
  "input": "Give one example of that pattern.",
  "max_output_tokens": 256
}
~~~

Send `instructions`, `system_prompt` and `agents_md` again if you want them on the new request. You can also send your own message history in `input` for a stateless request.

## Return a tool result

Use the `call_id` from the model’s `function_call` item. The following example assumes the call is available through the stored previous response.

~~~json
{
  "model": "deepseek-v4.1-flash-1017",
  "previous_response_id": "resp_your_stored_response_id",
  "input": [
    {"type": "function_call_output", "call_id": "call_from_the_response", "output": "{\"temperature\":17}"}
  ],
  "max_output_tokens": 256
}
~~~

For a stateless continuation, include the original input, the `function_call` item and its matching `function_call_output`. See [client tools](/tools/#client-functions) for the call and result sequence.

## Reasoning and structured output

Choose a supported value with `reasoning: {"effort":"high"}`, and use `thinking: false` to suppress reasoning reporting. [Discover supported levels](/models/) before setting an effort. For structured JSON, use `text.format` with `type: "json_schema"`, `name` and `schema`.

Set `stream: true` to follow `response.output_text.delta` and the terminal response event. [Streaming details](/streaming/).

## Store or retrieve a response

Responses are stored by default. Use `store: false` to opt out. Stored Responses support `previous_response_id` for a later turn.

| Method | Path | Result |
|---|---|---|
| GET | `/v1/responses/{id}` | Return the stored response. |
| GET | `/v1/responses/{id}/input_items` | List its stored input items. |
| DELETE | `/v1/responses/{id}` | Delete that stored response. |

~~~bash
curl --fail-with-body -sS "https://site6.eokgg.win/v1/responses/$RESPONSE_ID" \
  -H "Authorization: Bearer $SITE6_API_KEY"
~~~

## Store chat completions

Send `store: true` when creating a Chat Completion. You can retrieve or delete that saved object later.

| Method | Path | Result |
|---|---|---|
| GET | `/v1/chat/completions` | List stored chat completions. |
| GET | `/v1/chat/completions/{id}` | Return one completion. |
| GET | `/v1/chat/completions/{id}/messages` | List saved messages. |
| POST | `/v1/chat/completions/{id}` | Update the object’s `metadata`. |
| DELETE | `/v1/chat/completions/{id}` | Delete the stored completion. |

Listings support `limit`, `order` and cursor parameters where returned. Objects are encrypted and retained for up to seven days, with up to 200 stored objects per account. An individual stored record can be up to 16 MiB. Model-restricted keys have separate storage access scopes.

## Dashboard conversations

The dashboard shows request records grouped into conversations. Use a stable `X-Conversation-Id` header for a conversation when you want explicit grouping. Change it for a new conversation. Stored API objects and dashboard conversation logs can be managed separately.

[See Responses continuations](/responses/#continue-a-stored-response) for instructions and tool results in a later turn.
