Service usage
‘s AI service provides all completion content and grounding sources from frontier AI labs as structured or raw data for use in generative or language engine optimization. The service has a RESTful interface that acceptsGET requests at https:///ai.
Conversations can be localized with geotargeting parameters.
They’re streamed live by default or optionally queued for subsequent
retrieval. Live conversations take an average of several seconds but may require multiple
retries, in which case up to 3 minutes is allocated per API call. Usage
data is published regularly.
Authentication
You can access the service by including your secret API token in anAuthorization header:
Chat parameters
Besides the geotargeting and scheduling params linked above, required and optional chat params can be added in a standard query string. The keys and values supports are as follows:Device emulation
Thedevice param lets you fetch a device-specific completion, rather than the default desktop
completion. For a list of supported smartphone and tablet devices, make a request with your API
token and no params to https:///ai/devices:
Response format
Completions are returned as structured JSON, rendered HTML, or raw (unrendered) HTML (planned).JSON
If you set the output to JSON, your completion will be parsed into an object with the geotargeting keys and values above and following chat keys and values:View JSON example
View JSON example