---
title: "ChatResult"
---

Chat completion response


## Fields

| Field                                                                                                                                                                                                                                                                                                                                                                                                                                             | Type                                                                                                                                                                                                                                                                                                                                                                                                                                              | Required                                                                                                                                                                                                                                                                                                                                                                                                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                       | Example                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `choices`                                                                                                                                                                                                                                                                                                                                                                                                                                         | List[[components.ChatChoice](../components/chatchoice.mdx)]                                                                                                                                                                                                                                                                                                                                                                                        | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                | List of completion choices                                                                                                                                                                                                                                                                                                                                                                                                                        |                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `created`                                                                                                                                                                                                                                                                                                                                                                                                                                         | *int*                                                                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                | Unix timestamp of creation                                                                                                                                                                                                                                                                                                                                                                                                                        | 1677652288                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `id`                                                                                                                                                                                                                                                                                                                                                                                                                                              | *str*                                                                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                | Unique completion identifier                                                                                                                                                                                                                                                                                                                                                                                                                      | chatcmpl-123                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `model`                                                                                                                                                                                                                                                                                                                                                                                                                                           | *str*                                                                                                                                                                                                                                                                                                                                                                                                                                             | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                | Model used for completion                                                                                                                                                                                                                                                                                                                                                                                                                         | openai/gpt-4                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `object`                                                                                                                                                                                                                                                                                                                                                                                                                                          | [components.ChatResultObject](../components/chatresultobject.mdx)                                                                                                                                                                                                                                                                                                                                                                                  | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                | N/A                                                                                                                                                                                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `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/>}                                                                                                        |
| `service_tier`                                                                                                                                                                                                                                                                                                                                                                                                                                    | *OptionalNullable[str]*                                                                                                                                                                                                                                                                                                                                                                                                                           | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                | The service tier used by the upstream provider for this request                                                                                                                                                                                                                                                                                                                                                                                   | default                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `system_fingerprint`                                                                                                                                                                                                                                                                                                                                                                                                                              | *Nullable[str]*                                                                                                                                                                                                                                                                                                                                                                                                                                   | :heavy_check_mark:                                                                                                                                                                                                                                                                                                                                                                                                                                | System fingerprint                                                                                                                                                                                                                                                                                                                                                                                                                                | fp_44709d6fcb                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `usage`                                                                                                                                                                                                                                                                                                                                                                                                                                           | [Optional[components.ChatUsage]](../components/chatusage.mdx)                                                                                                                                                                                                                                                                                                                                                                                      | :heavy_minus_sign:                                                                                                                                                                                                                                                                                                                                                                                                                                | Token usage statistics                                                                                                                                                                                                                                                                                                                                                                                                                            | \{<br/>"completion_tokens": 15,<br/>"completion_tokens_details": \{<br/>"reasoning_tokens": 5<br/>},<br/>"cost": 0.0012,<br/>"cost_details": \{<br/>"upstream_inference_completions_cost": 0.0004,<br/>"upstream_inference_cost": null,<br/>"upstream_inference_prompt_cost": 0.0008<br/>},<br/>"is_byok": false,<br/>"prompt_tokens": 10,<br/>"prompt_tokens_details": \{<br/>"cached_tokens": 2<br/>},<br/>"server_tool_use_details": \{<br/>"tool_calls_executed": 2,<br/>"tool_calls_requested": 2<br/>},<br/>"total_tokens": 25<br/>} |