Skip to content
Docs ·Responses API

Responses API

Use the OpenAI Responses format

POST https://alprouter.com/api/v1/responses operates in the same manner as OpenAI’s Responses API. You can use client.responses from OpenAI’s SDK directly.

from openai import OpenAI

client = OpenAI(base_url="https://alprouter.com/api/v1", api_key="alp-your-key")

response = client.responses.create(
    model="openai/gpt-6.2-sol",
    instructions="Keep your answer brief.",
    input="Hello",
)
print(response.output_text)

The responses are not saved.

We don’t store the actual content of requests and responses. Therefore, we don’t have any functionality for storing such information. Instead, any subsequent conversations need to be sent entirely within the input section.

ItemProcessed
storeWhatever I send, it isn’t saved. The responses are always marked as “false”.
previous_response_id · conversation · promptIt’s not received. It’s reported as an “stateless-only” error.
backgroundNone

The processing method varies depending on the model.

ModelsProcessedWhat happens in this case?
openai/gpt-6.2-sol, openai/gpt-6.1-sol, openai/gpt-6-luna, openai/gpt-5.4-mini, openai/gpt-5.4-nano, openai/gpt-5.2, openai/gpt-5.1, openai/gpt-5, openai/gpt-5-mini, openai/gpt-5-nano, openai/gpt-4.1, openai/gpt-4.1-mini, openai/gpt-4.1-nano, openai/gpt-4o, openai/gpt-chat-latest, openai/gpt-5.3-codex, openai/gpt-5.2-codex, openai/gpt-5.1-codex-max, openai/gpt-5.1-codex, openai/gpt-5.1-codex-mini, openai/gpt-5-codex, openai/gpt-5.4-pro, openai/gpt-5-proPlease convey the request without changing it.Function tools, custom format tools, encrypted content items, images and files, specified formats
Other models asideLet’s switch to a conversational format, and change the way we ask questions as well.Text, images, function tools, predefined formats, adjustment of reasoning processes
  • Please exclude those tools that are executed by the server on behalf of us, such as tools like web_search, file_search, code_interpreter, etc.
  • Items whose prices vary, like service_tier, are also excluded from the calculation. The excluded items are listed in the response header x-alprouter-dropped.
  • The model that supports sending is not capable of sending free-form tools and files (input_file). If you try to send such files, an error will be reported.
  • When you send both models for model fallback and provider for provider selection, the request uses the chat-format adapter.

Responses and fees

  • The response from id is the request ID. It can be directly inserted into GET https://alprouter.com/api/v1/generation?id= so that the fees can be viewed accordingly.
  • There are fees of usage.cost dollars associated with this request. In the streaming case, it’s located at the last event, which is response.completed.
  • If you don’t enter max_output_tokens, then it will be the shorter of the two lengths: 32,768 tokens and the remaining credits.
  • The file can be sent up to 400KB in size.