> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.oai.oai_models.CompletionUsage

<h2 id="autogen.oai.oai_models.CompletionUsage" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">CompletionUsage</span>
</h2>

```python theme={null}
CompletionUsage(**data: Any)
```

!!! abstract "Usage Documentation"
[Models](/docs/api-reference/autogen/oai/concepts/models)

A base class for creating Pydantic models.<br />

<b>Parameters:</b>

| Name     | Description   |
| -------- | ------------- |
| `**data` | **Type:** Any |

### Class Attributes

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### completion\_tokens

<br />

Number of tokens in the generated completion.

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### completion\_tokens\_details

<br />

Breakdown of tokens used in a completion.

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### model\_config

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### prompt\_tokens

<br />

Number of tokens in the prompt.

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### prompt\_tokens\_details

<br />

Breakdown of tokens used in the prompt.

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### total\_tokens

<br />

Total number of tokens used in the request (prompt + completion).
