Skip to main content
POST
cURL

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. 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)
Provider routing suffixes such as :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).

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/completions endpoint instead

Authorizations

x-api-key
string
header
required

Body

application/json

Parameters for talking to GPT

model
string
default:minimax/minimax-m2.7
required

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.

Examples:

"minimax/minimax-m2.7"

"zai-org/glm-5:fast"

"zai-org/glm-5:cheap"

"openai/gpt-5.2:online/exa-instant"

prompt
string
default:""

The text prompt to send to GPT (optional)

Example:

"Please explain the concept of artificial intelligence."

provider

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.

messages
object[]

Array of previous message objects for context (optional)

Response

Talk to GPT response

Text response followed by metadata in tags