22
33from __future__ import annotations
44
5+ from typing import Dict
6+ from typing_extensions import Literal
7+
58import httpx
69
710from ..types import fetch_api_create_params
@@ -47,7 +50,9 @@ def create(
4750 url : str ,
4851 allow_insecure_ssl : bool | Omit = omit ,
4952 allow_redirects : bool | Omit = omit ,
53+ format : Literal ["raw" , "json" , "markdown" ] | Omit = omit ,
5054 proxies : bool | Omit = omit ,
55+ schema : Dict [str , object ] | Omit = omit ,
5156 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
5257 # The extra values given here take precedence over values defined on the client or passed to this method.
5358 extra_headers : Headers | None = None ,
@@ -65,8 +70,15 @@ def create(
6570
6671 allow_redirects: Whether to follow HTTP redirects
6772
73+ format: Output format for the response content. `raw` (default) returns the response
74+ body unchanged; `json` returns structured data (requires `schema`); `markdown`
75+ returns the page as markdown.
76+
6877 proxies: Whether to enable proxy support for the request
6978
79+ schema: JSON Schema describing the desired structure of the response. Only used when
80+ `format` is `json`.
81+
7082 extra_headers: Send extra headers
7183
7284 extra_query: Add additional query parameters to the request
@@ -82,7 +94,9 @@ def create(
8294 "url" : url ,
8395 "allow_insecure_ssl" : allow_insecure_ssl ,
8496 "allow_redirects" : allow_redirects ,
97+ "format" : format ,
8598 "proxies" : proxies ,
99+ "schema" : schema ,
86100 },
87101 fetch_api_create_params .FetchAPICreateParams ,
88102 ),
@@ -119,7 +133,9 @@ async def create(
119133 url : str ,
120134 allow_insecure_ssl : bool | Omit = omit ,
121135 allow_redirects : bool | Omit = omit ,
136+ format : Literal ["raw" , "json" , "markdown" ] | Omit = omit ,
122137 proxies : bool | Omit = omit ,
138+ schema : Dict [str , object ] | Omit = omit ,
123139 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
124140 # The extra values given here take precedence over values defined on the client or passed to this method.
125141 extra_headers : Headers | None = None ,
@@ -137,8 +153,15 @@ async def create(
137153
138154 allow_redirects: Whether to follow HTTP redirects
139155
156+ format: Output format for the response content. `raw` (default) returns the response
157+ body unchanged; `json` returns structured data (requires `schema`); `markdown`
158+ returns the page as markdown.
159+
140160 proxies: Whether to enable proxy support for the request
141161
162+ schema: JSON Schema describing the desired structure of the response. Only used when
163+ `format` is `json`.
164+
142165 extra_headers: Send extra headers
143166
144167 extra_query: Add additional query parameters to the request
@@ -154,7 +177,9 @@ async def create(
154177 "url" : url ,
155178 "allow_insecure_ssl" : allow_insecure_ssl ,
156179 "allow_redirects" : allow_redirects ,
180+ "format" : format ,
157181 "proxies" : proxies ,
182+ "schema" : schema ,
158183 },
159184 fetch_api_create_params .FetchAPICreateParams ,
160185 ),
0 commit comments