Talk to GPT (Legacy)
Legacy endpoint for chat interactions with the GPT model
Overview
The Talk to GPT endpoint is our legacy text generation API that also supports web search capabilities through LinkUp integration. The legacy endpoint supports the same model suffix parser for web search and provider routing as Chat Completions, but new integrations should use/api/v1/chat/completions. See Model Suffixes.
The body provider field accepts either the existing provider ID string or a structured routing object with fields such as order, only, ignore, sort, max_price, allow_fallbacks, and require_parameters. See Provider Selection > Provider Routing Object.
Web Search
Enable web search by appending suffixes to the model name::online- Standard web search ($0.006 per request):online/linkup-deep- Deep web search ($0.06 per request)
:fast / :speed, :cheap / :price / :floor, :throughput, :latency, :tools, and :caching / :cache / :cached are also accepted for eligible models.
If you need direct control over search query, output mode (searchResults / sourcedAnswer / structured), or date/domain filters, use Direct Web Search API (POST /api/web).
Example with Web Search
Important Notes
- Web search works with all models - simply append the suffix
- Increases input token count which affects total cost
- Provides access to real-time information
- For new projects, consider using the OpenAI-compatible
/v1/chat/completionsendpoint instead
Authorizations
Body
Parameters for talking to GPT
The model to use for generation. The legacy endpoint supports the same model suffix parser for web search and provider routing, including ':caching', ':cache', and ':cached', as Chat Completions.
"minimax/minimax-m2.7"
"zai-org/glm-5:fast"
"zai-org/glm-5:cheap"
"openai/gpt-5.2:online/exa-instant"
The text prompt to send to GPT (optional)
"Please explain the concept of artificial intelligence."
Optional provider override or structured provider routing controls for provider-selection-capable models. A string explicitly selects one provider. An object can set soft order, hard pins, exclusions, sort preference, price caps, fallback behavior, and parameter-capability requirements.
Array of previous message objects for context (optional)
Response
Talk to GPT response
Text response followed by metadata in tags