Files
openrouter-python-sdk-retry…/docs/components/openresponsesresult.mdx
T

47 lines
59 KiB
Plaintext

---
title: "OpenResponsesResult"
---
Complete non-streaming response from the Responses API
## Fields
| Field | Type | Required | Description | Example |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `background` | *OptionalNullable[bool]* | :heavy_minus_sign: | N/A | |
| `completed_at` | *Nullable[int]* | :heavy_check_mark: | N/A | |
| `created_at` | *int* | :heavy_check_mark: | N/A | |
| `error` | [Nullable[components.ResponsesErrorField]](../components/responseserrorfield.mdx) | :heavy_check_mark: | Error information returned from the API | \{<br/>"code": "rate_limit_exceeded",<br/>"message": "Rate limit exceeded. Please try again later."<br/>} |
| `frequency_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `id` | *str* | :heavy_check_mark: | N/A | |
| `incomplete_details` | [Nullable[components.IncompleteDetails]](../components/incompletedetails.mdx) | :heavy_check_mark: | N/A | \{<br/>"reason": "max_output_tokens"<br/>} |
| `instructions` | [Nullable[components.BaseInputsUnion]](../components/baseinputsunion.mdx) | :heavy_check_mark: | N/A | [<br/>\{<br/>"content": "What is the weather today?",<br/>"role": "user"<br/>}<br/>] |
| `max_output_tokens` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `max_tool_calls` | *OptionalNullable[int]* | :heavy_minus_sign: | N/A | |
| `metadata` | Dict[str, *str*] | :heavy_check_mark: | Metadata key-value pairs for the request. Keys must be ≤64 characters and cannot contain brackets. Values must be ≤512 characters. Maximum 16 pairs allowed. | \{<br/>"session_id": "abc-def-ghi",<br/>"user_id": "123"<br/>} |
| `model` | *str* | :heavy_check_mark: | N/A | |
| `object` | [components.OpenResponsesResultObject](../components/openresponsesresultobject.mdx) | :heavy_check_mark: | N/A | |
| `output` | List[[components.OutputItems](../components/outputitems.mdx)] | :heavy_check_mark: | N/A | |
| `output_text` | *Optional[str]* | :heavy_minus_sign: | N/A | |
| `parallel_tool_calls` | *bool* | :heavy_check_mark: | N/A | |
| `presence_penalty` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `previous_response_id` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `prompt` | [OptionalNullable[components.StoredPromptTemplate]](../components/storedprompttemplate.mdx) | :heavy_minus_sign: | N/A | \{<br/>"id": "prompt-abc123",<br/>"variables": \{<br/>"name": "John"<br/>}<br/>} |
| `prompt_cache_key` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `reasoning` | [OptionalNullable[components.BaseReasoningConfig]](../components/basereasoningconfig.mdx) | :heavy_minus_sign: | N/A | \{<br/>"effort": "medium",<br/>"summary": "auto"<br/>} |
| `safety_identifier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `service_tier` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `status` | [components.OpenAIResponsesResponseStatus](../components/openairesponsesresponsestatus.mdx) | :heavy_check_mark: | N/A | completed |
| `store` | *Optional[bool]* | :heavy_minus_sign: | N/A | |
| `temperature` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `text` | [Optional[components.TextExtendedConfig]](../components/textextendedconfig.mdx) | :heavy_minus_sign: | Text output configuration including format and verbosity | \{<br/>"format": \{<br/>"type": "text"<br/>}<br/>} |
| `tool_choice` | [components.OpenAIResponsesToolChoiceUnion](../components/openairesponsestoolchoiceunion.mdx) | :heavy_check_mark: | N/A | auto |
| `tools` | List[[components.OpenResponsesResultToolUnion](../components/openresponsesresulttoolunion.mdx)] | :heavy_check_mark: | N/A | |
| `top_logprobs` | *Optional[int]* | :heavy_minus_sign: | N/A | |
| `top_p` | *Nullable[float]* | :heavy_check_mark: | N/A | |
| `truncation` | [OptionalNullable[components.Truncation]](../components/truncation.mdx) | :heavy_minus_sign: | N/A | auto |
| `usage` | [OptionalNullable[components.Usage]](../components/usage.mdx) | :heavy_minus_sign: | Token usage information for the response | \{<br/>"cost": 0.0012,<br/>"cost_details": \{<br/>"upstream_inference_cost": null,<br/>"upstream_inference_input_cost": 0.0008,<br/>"upstream_inference_output_cost": 0.0004<br/>},<br/>"input_tokens": 10,<br/>"input_tokens_details": \{<br/>"cached_tokens": 0<br/>},<br/>"output_tokens": 25,<br/>"output_tokens_details": \{<br/>"reasoning_tokens": 0<br/>},<br/>"total_tokens": 35<br/>} |
| `user` | *OptionalNullable[str]* | :heavy_minus_sign: | N/A | |
| `error_type` | [Optional[components.APIErrorType]](../components/apierrortype.mdx) | :heavy_minus_sign: | Canonical OpenRouter error type, stable across all API formats | rate_limit_exceeded |
| `openrouter_metadata` | [Optional[components.OpenRouterMetadata]](../components/openroutermetadata.mdx) | :heavy_minus_sign: | N/A | \{<br/>"attempt": 1,<br/>"endpoints": \{<br/>"available": [<br/>\{<br/>"model": "openai/gpt-4o",<br/>"provider": "OpenAI",<br/>"selected": true<br/>}<br/>],<br/>"total": 1<br/>},<br/>"is_byok": false,<br/>"region": "iad",<br/>"requested": "openai/gpt-4o",<br/>"strategy": "direct",<br/>"summary": "available=1, selected=OpenAI"<br/>} |