OpenAI Web Search
Generate cited answers using web search.
Model-grounded web search (OpenAI).
Generate a cited answer with an OpenAI model and web search. Supply input as a string or message array. The model, tools and search limit are managed by the service. The response is a Responses object whose output includes web_search_call and message items with URL citations. usage reports resource consumption, not a Felo charge.
- 类型: stringinput必填
Your question or instruction, same format as the OpenAI Responses API
input. A message array is also accepted. - 类型: stringinstructions
Optional high-level instructions to steer the answer's tone or format.
- 类型: integermax
_output _tokens Optional cap on the number of tokens generated in the answer.
- 类型: object200
A standard OpenAI Responses object.
output[]interleaves web_search_call items and the cited answer message; the number of web_search_call items is the billed search count.- 类型: stringid
- 类型: stringobject
- 类型: array object[]output
Ordered items: web_search_call (searches performed) and message (the cited answer).
空对象 - 类型: stringstatus
- 类型: objectusage
- input类型: integer
_tokens Integer numbers.
- input类型: object
_tokens _details - cached类型: integer
_tokens Integer numbers.
- output类型: integer
_tokens Integer numbers.
application/json - 400
The request could not be processed. Check the request parameters.
- 401
A valid Felo API key is required.
- 402
The request cannot proceed because a billing requirement is not met.
- 403
The account is not permitted to perform this operation.
- 429
A request or spending limit has been reached.
- 502
The service could not complete the request.
- 503
The API or billing service is temporarily unavailable.
- 504
The service timed out while processing the request.
- default
The operation failed. Keep the response request ID when contacting Felo support.
curl https://openapi.felo.ai/v1/beta/openai-websearch/search \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"input": "What are the three biggest AI announcements this week? Give one sentence each with sources.",
"max_output_tokens": 1024
}'
{
"id": "string",
"object": "response",
"status": "completed",
"output": [
{}
],
"usage": {
"input_tokens": 1,
"output_tokens": 1,
"input_tokens_details": {
"cached_tokens": 1
}
}
}