@@ -13,7 +13,7 @@ import NoURLForServerlessAPI from '/snippets/general-shared-text/no-url-for-serv
1313
1414<NoURLForServerlessAPI />
1515
16- import UseIngestInstead from ' /snippets/general-shared-text/use-ingest-instead.mdx' ;
16+ import UseIngestOrPlatformInstead from ' /snippets/general-shared-text/use-ingest-or-platform -instead.mdx' ;
1717
1818### Changing partition strategy for a PDF
1919
@@ -82,7 +82,7 @@ The `hi_res` strategy supports different models, and the default is `layout_v1.1
8282 ```
8383 </Accordion >
8484 <Accordion title = " POST" >
85- <UseIngestInstead />
85+ <UseIngestOrPlatformInstead />
8686 ``` bash POST
8787 curl -X ' POST' $UNSTRUCTURED_API_URL \
8888 -H ' accept: application/json' \
@@ -94,7 +94,7 @@ The `hi_res` strategy supports different models, and the default is `layout_v1.1
9494 ```
9595 </Accordion >
9696 <Accordion title = " Python SDK" >
97- <UseIngestInstead />
97+ <UseIngestOrPlatformInstead />
9898 ``` python Python
9999 import asyncio
100100 import os
@@ -103,8 +103,7 @@ The `hi_res` strategy supports different models, and the default is `layout_v1.1
103103 from unstructured_client.models import shared
104104
105105 client = unstructured_client.UnstructuredClient(
106- api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" ),
107- server_url = os.getenv(" UNSTRUCTURED_API_URL" ),
106+ api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" )
108107 )
109108
110109 async def call_api (filename , input_dir , output_dir ):
@@ -123,7 +122,10 @@ The `hi_res` strategy supports different models, and the default is `layout_v1.1
123122 }
124123
125124 try :
126- res = await client.general.partition_async(request = req)
125+ res = await client.general.partition_async(
126+ request = req,
127+ server_url = os.getenv(" UNSTRUCTURED_API_URL" )
128+ )
127129 element_dicts = [element for element in res.elements]
128130 json_elements = json.dumps(element_dicts, indent = 2 )
129131
@@ -159,7 +161,7 @@ The `hi_res` strategy supports different models, and the default is `layout_v1.1
159161 ```
160162 </Accordion >
161163 <Accordion title = " JavaScript/TypeScript SDK" >
162- <UseIngestInstead />
164+ <UseIngestOrPlatformInstead />
163165 ``` typescript TypeScript
164166 import { UnstructuredClient } from " unstructured-client" ;
165167 import * as fs from " fs" ;
@@ -300,7 +302,7 @@ For better OCR results, you can specify what languages your document is in using
300302 ```
301303 </Accordion >
302304 <Accordion title = " POST" >
303- <UseIngestInstead />
305+ <UseIngestOrPlatformInstead />
304306 ``` bash POST
305307 curl -X ' POST' $UNSTRUCTURED_API_URL \
306308 -H ' accept: application/json' \
@@ -312,7 +314,7 @@ For better OCR results, you can specify what languages your document is in using
312314 ```
313315 </Accordion >
314316 <Accordion title = " Python SDK" >
315- <UseIngestInstead />
317+ <UseIngestOrPlatformInstead />
316318 ``` python Python
317319 import asyncio
318320 import os
@@ -321,8 +323,7 @@ For better OCR results, you can specify what languages your document is in using
321323 from unstructured_client.models import shared
322324
323325 client = unstructured_client.UnstructuredClient(
324- api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" ),
325- server_url = os.getenv(" UNSTRUCTURED_API_URL" ),
326+ api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" )
326327 )
327328
328329 async def call_api (filename , input_dir , output_dir ):
@@ -341,7 +342,10 @@ For better OCR results, you can specify what languages your document is in using
341342 }
342343
343344 try :
344- res = await client.general.partition_async(request = req)
345+ res = await client.general.partition_async(
346+ request = req,
347+ server_url = os.getenv(" UNSTRUCTURED_API_URL" )
348+ )
345349 element_dicts = [element for element in res.elements]
346350 json_elements = json.dumps(element_dicts, indent = 2 )
347351
@@ -377,7 +381,7 @@ For better OCR results, you can specify what languages your document is in using
377381 ```
378382 </Accordion >
379383 <Accordion title = " JavaScript/TypeScript SDK" >
380- <UseIngestInstead />
384+ <UseIngestOrPlatformInstead />
381385 ``` typescript TypeScript
382386 import { UnstructuredClient } from " unstructured-client" ;
383387 import * as fs from " fs" ;
@@ -515,7 +519,7 @@ Set the `coordinates` parameter to `true` to add this field to the elements in t
515519 ```
516520 </Accordion >
517521 <Accordion title = " POST" >
518- <UseIngestInstead />
522+ <UseIngestOrPlatformInstead />
519523 ``` bash POST
520524 curl -X ' POST' $UNSTRUCTURED_API_URL \
521525 -H ' accept: application/json' \
@@ -527,7 +531,7 @@ Set the `coordinates` parameter to `true` to add this field to the elements in t
527531 ```
528532 </Accordion >
529533 <Accordion title = " Python SDK" >
530- <UseIngestInstead />
534+ <UseIngestOrPlatformInstead />
531535 ``` python Python
532536 import asyncio
533537 import os
@@ -536,8 +540,7 @@ Set the `coordinates` parameter to `true` to add this field to the elements in t
536540 from unstructured_client.models import shared
537541
538542 client = unstructured_client.UnstructuredClient(
539- api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" ),
540- server_url = os.getenv(" UNSTRUCTURED_API_URL" ),
543+ api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" )
541544 )
542545
543546 async def call_api (filename , input_dir , output_dir ):
@@ -556,7 +559,10 @@ Set the `coordinates` parameter to `true` to add this field to the elements in t
556559 }
557560
558561 try :
559- res = await client.general.partition_async(request = req)
562+ res = await client.general.partition_async(
563+ request = req,
564+ server_url = os.getenv(" UNSTRUCTURED_API_URL" )
565+ )
560566 element_dicts = [element for element in res.elements]
561567 json_elements = json.dumps(element_dicts, indent = 2 )
562568
@@ -592,7 +598,7 @@ Set the `coordinates` parameter to `true` to add this field to the elements in t
592598 ```
593599 </Accordion >
594600 <Accordion title = " JavaScript/TypeScript SDK" >
595- <UseIngestInstead />
601+ <UseIngestOrPlatformInstead />
596602 ``` typescript TypeScript
597603 import { UnstructuredClient } from " unstructured-client" ;
598604 import * as fs from " fs" ;
@@ -734,7 +740,7 @@ This can be helpful if you'd like to use the IDs as a primary key in a database,
734740 ```
735741 </Accordion >
736742 <Accordion title = " POST" >
737- <UseIngestInstead />
743+ <UseIngestOrPlatformInstead />
738744 ``` bash POST
739745 curl -X ' POST' $UNSTRUCTURED_API_URL \
740746 -H ' accept: application/json' \
@@ -745,7 +751,7 @@ This can be helpful if you'd like to use the IDs as a primary key in a database,
745751 ```
746752 </Accordion >
747753 <Accordion title = " Python SDK" >
748- <UseIngestInstead />
754+ <UseIngestOrPlatformInstead />
749755 ``` python Python
750756 import asyncio
751757 import os
@@ -754,8 +760,7 @@ This can be helpful if you'd like to use the IDs as a primary key in a database,
754760 from unstructured_client.models import shared
755761
756762 client = unstructured_client.UnstructuredClient(
757- api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" ),
758- server_url = os.getenv(" UNSTRUCTURED_API_URL" ),
763+ api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" )
759764 )
760765
761766 async def call_api (filename , input_dir , output_dir ):
@@ -774,7 +779,10 @@ This can be helpful if you'd like to use the IDs as a primary key in a database,
774779 }
775780
776781 try :
777- res = await client.general.partition_async(request = req)
782+ res = await client.general.partition_async(
783+ request = req,
784+ server_url = os.getenv(" UNSTRUCTURED_API_URL" )
785+ )
778786 element_dicts = [element for element in res.elements]
779787 json_elements = json.dumps(element_dicts, indent = 2 )
780788
@@ -810,7 +818,7 @@ This can be helpful if you'd like to use the IDs as a primary key in a database,
810818 ```
811819 </Accordion >
812820 <Accordion title = " JavaScript/TypeScript SDK" >
813- <UseIngestInstead />
821+ <UseIngestOrPlatformInstead />
814822 ``` typescript TypeScript
815823 import { UnstructuredClient } from " unstructured-client" ;
816824 import * as fs from " fs" ;
@@ -956,7 +964,7 @@ By default, the `chunking_strategy` is set to `None`, and no chunking is perform
956964 ```
957965 </Accordion >
958966 <Accordion title = " POST" >
959- <UseIngestInstead />
967+ <UseIngestOrPlatformInstead />
960968 ``` bash POST
961969 curl -X ' POST' $UNSTRUCTURED_API_URL \
962970 -H ' accept: application/json' \
@@ -969,7 +977,7 @@ By default, the `chunking_strategy` is set to `None`, and no chunking is perform
969977 ```
970978 </Accordion >
971979 <Accordion title = " Python SDK" >
972- <UseIngestInstead />
980+ <UseIngestOrPlatformInstead />
973981 ``` python Python
974982 import asyncio
975983 import os
@@ -978,8 +986,7 @@ By default, the `chunking_strategy` is set to `None`, and no chunking is perform
978986 from unstructured_client.models import shared
979987
980988 client = unstructured_client.UnstructuredClient(
981- api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" ),
982- server_url = os.getenv(" UNSTRUCTURED_API_URL" ),
989+ api_key_auth = os.getenv(" UNSTRUCTURED_API_KEY" )
983990 )
984991
985992 async def call_api (filename , input_dir , output_dir ):
@@ -999,7 +1006,10 @@ By default, the `chunking_strategy` is set to `None`, and no chunking is perform
9991006 }
10001007
10011008 try :
1002- res = await client.general.partition_async(request = req)
1009+ res = await client.general.partition_async(
1010+ request = req,
1011+ server_url = os.getenv(" UNSTRUCTURED_API_URL" )
1012+ )
10031013 element_dicts = [element for element in res.elements]
10041014 json_elements = json.dumps(element_dicts, indent = 2 )
10051015
@@ -1035,7 +1045,7 @@ By default, the `chunking_strategy` is set to `None`, and no chunking is perform
10351045 ```
10361046 </Accordion >
10371047 <Accordion title = " JavaScript/TypeScript SDK" >
1038- <UseIngestInstead />
1048+ <UseIngestOrPlatformInstead />
10391049 ``` typescript TypeScript
10401050 import { UnstructuredClient } from " unstructured-client" ;
10411051 import * as fs from " fs" ;
0 commit comments