Skip to content

Commit f88f1d0

Browse files
authored
Troubleshooting API keys/URLs: simplify solutions, clean up UI steps (#543)
1 parent 0d2fbac commit f88f1d0

File tree

1 file changed

+45
-14
lines changed

1 file changed

+45
-14
lines changed

api-reference/troubleshooting/api-key-url.mdx

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebarTitle: API keys and URLs
55

66
## Issue
77

8-
When you run script or code to call an Unstructured API, you get one of the following warnings or errors:
8+
When you run script or code to call an Unstructured API, you might get one of the following warnings or errors:
99

1010
```
1111
UserWarning: If intending to use the paid API, please define `server_url` in your request.
@@ -15,7 +15,7 @@ UserWarning: If intending to use the paid API, please define `server_url` in you
1515
ERROR: Server responded with 404 - {"detail":"Not Found"}
1616
```
1717

18-
You also get the following related warnings or errors in your logs:
18+
You might also get the following related warnings or errors in your logs:
1919

2020
```
2121
SDKError: API error occurred: Status 401
@@ -37,24 +37,50 @@ API error occurred: Status 404
3737

3838
For the API URL, note the following:
3939

40-
- For the [Unstructured Workflow Endpoint](/api-reference/workflow/overview), the API URL is typically `https://platform.unstructuredapp.io/api/v1`.
41-
- For the [Unstructured Partition Endpoint](/api-reference/partition/overview), the API URL is typically `https://api.unstructuredapp.io/general/v0/general`.
40+
- For the [Unstructured Workflow Endpoint](/api-reference/workflow/overview), the typical API URL is `https://platform.unstructuredapp.io/api/v1`. This is also
41+
the default API URL that Unstructured Python SDK uses for the Workflow Endpoint.
42+
- For the [Unstructured Partition Endpoint](/api-reference/partition/overview), the default API URL is `https://api.unstructuredapp.io/general/v0/general`. This is also
43+
the default API URL that Unstructured Python SDK uses for the Partition Endpoint.
4244

43-
For the API key, the same API key works for both the [Unstructured Workflow Endpoint](/api-reference/workflow/overview) key or [Unstructured Partition Endpoint](/api-reference/partition/overview). This API key is in your Unstructured account dashboard. To access your dashboard:
45+
<Note>
46+
If you signed up through the [For Enterprise](https://unstructured.io/enterprise) page, of if you are using a self-hosted deployment of Unstructured, your API URL
47+
might be different. For guidance, email Unstructured Sales at [[email protected]](mailto:[email protected]).
48+
</Note>
4449

45-
![Unstructured account settings](/img/ui/AccountSettings.png)
50+
For the API key, the same API key works for both the [Unstructured Workflow Endpoint](/api-reference/workflow/overview) and the [Unstructured Partition Endpoint](/api-reference/partition/overview). To access your key:
4651

47-
1. Sign in to your Unstructured account, at [https://platform.unstructured.io](https://platform.unstructured.io).
48-
2. At the bottom of the sidebar, click your user icon, and then click **Account Settings**.
49-
3. On the **API Keys** tab, click the copy icon next to your key.
52+
1. Go to [https://platform.unstructured.io](https://platform.unstructured.io) and use your email address, Google account, or GitHub account to
53+
sign up for an Unstructured account (if you do not already have one) and sign into the account at the same time. The
54+
[Unstructured user interface (UI)](/ui/overview) appears.
55+
2. Get your Unstructured API key:
56+
57+
a. In the Unstructured UI, click **API Keys** on the sidebar.<br/>
58+
b. Click the **Copy** icon next to your target key to add the key to your system's clipboard. If you lose this key, simply return and click the **Copy** icon again.<br/>
59+
60+
3. If you want or need to generate a new Unstructured API key at this point:
61+
62+
a. Click **Generate API Key**.<br/>
63+
b. Follow the on-screen instructions to finish generating the key.<br/>
64+
c. Click the **Copy** icon next to your new key to add the key to your system's clipboard. If you lose this key, simply return and click the **Copy** icon again.<br/>
65+
66+
<Note>
67+
If you signed up through the [For Enterprise](https://unstructured.io/enterprise) page, of if you are using a self-hosted deployment of Unstructured, the process for getting your API key
68+
might be different. For guidance, email Unstructured Sales at [[email protected]](mailto:[email protected]).
69+
</Note>
5070

51-
For the API URL, note the value of the the Unstructured **API URL** (for the Unstructured Workflow Endpoint) or the Unstructured **Serverless API URL** (for the Unstructured Partition Endpoint).
71+
For the API URL, note the value of the Unstructured API URL for the Endpoint that you want to call. To access these API URLs:
5272

53-
![Unstructured Serverless and API URLs](/img/ui/ServerlessPlatformAPIURL.png)
73+
1. Go to [https://platform.unstructured.io](https://platform.unstructured.io) and use your email address, Google account, or GitHub account to
74+
sign up for an Unstructured account (if you do not already have one) and sign into the account at the same time. The
75+
[Unstructured user interface (UI)](/ui/overview) appears.
76+
2. In the Unstructured UI, click **API Keys** on the sidebar.
77+
3. Note the API URL for the **Unstructured Workflow Endpoint** or the **Unstructured Partition Endpoint**, depending on whether you want to call the
78+
[Unstructured Workflow Endpoint](/api-reference/workflow/overview) or the [Unstructured Partition Endpoint](/api-reference/partition/overview), respectively.
5479

55-
1. Sign in to your Unstructured account, at [https://platform.unstructured.io](https://platform.unstructured.io).
56-
2. At the bottom of the sidebar, click your user icon, and then click **Account Settings**.
57-
3. On the **API Keys** tab, note the correct API URL. These APIs are not interchangeable between the Workflow and Partition APIs.
80+
<Note>
81+
If you signed up through the [For Enterprise](https://unstructured.io/enterprise) page, of if you are using a self-hosted deployment of Unstructured, your API URL
82+
might be different. For guidance, email Unstructured Sales at [[email protected]](mailto:[email protected]).
83+
</Note>
5884

5985
If you still believe you have the correct API URL and API key, try the following steps:
6086

@@ -70,6 +96,11 @@ If you still believe you have the correct API URL and API key, try the following
7096
- Check the value of the `server_url` parameter. Make sure it is set to the right API URL, or an environment variable representing the right API URL.
7197
- Check the value of the `api_key_auth` parameter. Make sure it is set to the right API key, or an environment variable representing the right API key.
7298

99+
<Note>
100+
If you are using the Unstructured Python SDK to call the Workflow Endpoint or the Partition Endpoint, you should not need to set the value of the
101+
`server_url` parameter if you are using these Endpoints' default API URL. However, you might want to try setting this value anyway to see if it otherwise resolves your issue.
102+
</Note>
103+
73104
**For the Unstructured JavaScript/TypeScript SDK**
74105

75106
- Check the value of the `UnstructuredClient` object's `serverURL` parameter. Make sure it is set to the right API URL, or an environment variable representing the right API URL.

0 commit comments

Comments
 (0)