Prompt Tokens

Quick definition

Tokens contributed to a model request by instructions, user content, and supplied context.

Tokens contributed to a model request by instructions, user content, and supplied context.

Why it matters: Input-token accounting can differ when tools, images, or cached prefixes are involved.

Practical example: A team trims a lengthy system prompt to reduce request cost.

Common use cases: Prompt optimization, budgeting, and context management.

Examples

  • A team trims a lengthy system prompt to reduce request cost.

Use cases

  • Prompt optimization, budgeting, and context management.

Frequently asked questions

What is Prompt Tokens?

Tokens contributed to a model request by instructions, user content, and supplied context.

What should I know before using Prompt Tokens?

Input-token accounting can differ when tools, images, or cached prefixes are involved. Example: A team trims a lengthy system prompt to reduce request cost.

Categories and tags

Sources

  1. https://developers.openai.com/api/docs