openai

Create a response

Creates a response for the provided input and parameters.

post/v1/responses

Request

  • Base URL: https://api.aiand.com
  • URL: https://api.aiand.com/v1/responses
  • Auth: HTTP bearer

Request body

modelstring required

ID of the model to use for this response.

instructionsstring nullable

A system (or developer) message inserted into the model's context.

streamboolean nullable

If true, response data will be streamed as server-sent events.

temperaturenumber nullable

Sampling temperature between 0 and 2. Higher values make output more random.

top_pnumber nullable

Nucleus sampling: consider tokens with top_p probability mass. Greater than 0 and at most 1.

max_output_tokensinteger nullable

Upper bound for tokens that can be generated, including visible output and reasoning tokens.

parallel_tool_callsboolean nullable

Whether to allow the model to run tool calls in parallel.

truncation'auto' | 'disabled' | 'null' nullable

"auto" truncates input to fit context window. "disabled" (default) returns 400 if input exceeds context.

previous_response_idstring nullable

A non-empty value is rejected with 400 unsupported_value: responses are not stored. Send the earlier turns in input.

storeboolean nullable

Accepted for compatibility and ignored. Responses are not stored.

metadataobject nullable

Set of key-value pairs for additional information.

top_logprobsinteger nullable

Number of most likely tokens to return at each position (0-20).

seedinteger nullable

If specified, the system will attempt deterministic sampling.

top_kinteger nullable

Number of highest probability tokens to keep for top-k sampling. -1 to disable.

repetition_penaltynumber nullable

Penalizes new tokens based on whether they appear in the generated text so far. Values > 1.0 penalize repetitions.

min_tokensinteger

Minimum number of tokens to generate before allowing a stop condition.

Response

OK

idstring required

Unique identifier for this response.

object'response' required

The object type — always "response".

status'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete' required

The status of the response generation.

created_atnumber required

Unix timestamp (in seconds) of when this response was created.

completed_atnumber nullable

Unix timestamp of completion. Only present when status is completed.

modelstring required

The model used to generate the response.

instructionsstring nullable
metadataobject nullable
temperaturenumber nullable
top_pnumber nullable
max_output_tokensinteger nullable
toolsobject[]
parallel_tool_callsboolean
truncation'auto' | 'disabled' | 'null' nullable
previous_response_idstring nullable
textobject
top_logprobsinteger nullable

Changes

No recorded changes to this operation across all 1 revision of this API.