Model workflows
Start with a successful first request, then choose the workflow your application needs. A model ID being available does not imply support for every workflow below; confirm the model and protocol together.
Build a feature
| Goal | Guide | What you will implement |
|---|---|---|
| Display an answer as it arrives | Streaming | Incremental output, completion states and cancellation |
| Let the application perform an operation | Function calling | Tool definitions, validation, execution and results |
| Extract machine-readable records | Structured output | JSON mode, schemas and result validation |
| Understand images or documents | Vision | Correct content blocks and input checks |
| Search your own content | Embeddings | Vector generation and a consistent retrieval pipeline |
| Create or modify images | Image generation | Generation, multipart edits and result handling |
Operate the feature
- Prompt caching: organize reusable context and check actual cache usage.
- Usage and costs: account for all model rounds and control spend.
- Rate limits and concurrency: bound work before sending requests.
- Errors, timeouts and retries: distinguish invalid requests from replay-safe failures.
For exact field names and response shapes, use the separate model API reference. To configure an existing application instead of writing an API client, use integrations.