Skip to content

Commit 2b29c8c

Browse files
committed
feat(api): add dedicated api endpoint, update docs, update deploy modal
1 parent c6357f7 commit 2b29c8c

File tree

39 files changed

+92
-60
lines changed

39 files changed

+92
-60
lines changed

apps/docs/content/docs/de/execution/api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Alle API-Anfragen erfordern einen API-Schlüssel, der im Header `x-api-key` übe
1414

1515
```bash
1616
curl -H "x-api-key: YOUR_API_KEY" \
17-
https://sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID
17+
https://api.sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID
1818
```
1919

2020
Sie können API-Schlüssel in Ihren Benutzereinstellungen im Sim-Dashboard generieren.
@@ -528,7 +528,7 @@ async function pollLogs() {
528528
}
529529

530530
const response = await fetch(
531-
`https://sim.ai/api/v1/logs?${params}`,
531+
`https://api.sim.ai/api/v1/logs?${params}`,
532532
{
533533
headers: {
534534
'x-api-key': 'YOUR_API_KEY'

apps/docs/content/docs/de/execution/costs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ GET /api/users/me/usage-limits
142142
**Beispielanfrage:**
143143

144144
```bash
145-
curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" https://sim.ai/api/users/me/usage-limits
145+
curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" https://api.sim.ai/api/users/me/usage-limits
146146
```
147147

148148
**Beispielantwort:**

apps/docs/content/docs/de/sdks/python.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ def stream_workflow():
647647

648648
def generate():
649649
response = requests.post(
650-
'https://sim.ai/api/workflows/WORKFLOW_ID/execute',
650+
'https://api.sim.ai/api/workflows/WORKFLOW_ID/execute',
651651
headers={
652652
'Content-Type': 'application/json',
653653
'X-API-Key': os.getenv('SIM_API_KEY')

apps/docs/content/docs/de/sdks/typescript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,7 @@ function StreamingWorkflow() {
965965

966966
// IMPORTANT: Make this API call from your backend server, not the browser
967967
// Never expose your API key in client-side code
968-
const response = await fetch('https://sim.ai/api/workflows/WORKFLOW_ID/execute', {
968+
const response = await fetch('https://api.sim.ai/api/workflows/WORKFLOW_ID/execute', {
969969
method: 'POST',
970970
headers: {
971971
'Content-Type': 'application/json',

apps/docs/content/docs/en/execution/api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ All API requests require an API key passed in the `x-api-key` header:
1414

1515
```bash
1616
curl -H "x-api-key: YOUR_API_KEY" \
17-
https://sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID
17+
https://api.sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID
1818
```
1919

2020
You can generate API keys from your user settings in the Sim dashboard.
@@ -513,7 +513,7 @@ async function pollLogs() {
513513
}
514514

515515
const response = await fetch(
516-
`https://sim.ai/api/v1/logs?${params}`,
516+
`https://api.sim.ai/api/v1/logs?${params}`,
517517
{
518518
headers: {
519519
'x-api-key': 'YOUR_API_KEY'

apps/docs/content/docs/en/execution/costs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ GET /api/users/me/usage-limits
160160

161161
**Example Request:**
162162
```bash
163-
curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" https://sim.ai/api/users/me/usage-limits
163+
curl -X GET -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" https://api.sim.ai/api/users/me/usage-limits
164164
```
165165

166166
**Example Response:**

apps/docs/content/docs/en/execution/form.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ Submit forms programmatically:
8282
<Tabs items={['cURL', 'TypeScript']}>
8383
<Tab value="cURL">
8484
```bash
85-
curl -X POST https://sim.ai/api/form/your-identifier \
85+
curl -X POST https://api.sim.ai/api/form/your-identifier \
8686
-H "Content-Type: application/json" \
8787
-d '{
8888
"formData": {
@@ -94,7 +94,7 @@ curl -X POST https://sim.ai/api/form/your-identifier \
9494
</Tab>
9595
<Tab value="TypeScript">
9696
```typescript
97-
const response = await fetch('https://sim.ai/api/form/your-identifier', {
97+
const response = await fetch('https://api.sim.ai/api/form/your-identifier', {
9898
method: 'POST',
9999
headers: { 'Content-Type': 'application/json' },
100100
body: JSON.stringify({
@@ -115,14 +115,14 @@ const result = await response.json();
115115

116116
For password-protected forms:
117117
```bash
118-
curl -X POST https://sim.ai/api/form/your-identifier \
118+
curl -X POST https://api.sim.ai/api/form/your-identifier \
119119
-H "Content-Type: application/json" \
120120
-d '{ "password": "secret", "formData": { "name": "John" } }'
121121
```
122122

123123
For email-protected forms:
124124
```bash
125-
curl -X POST https://sim.ai/api/form/your-identifier \
125+
curl -X POST https://api.sim.ai/api/form/your-identifier \
126126
-H "Content-Type: application/json" \
127127
-d '{ "email": "allowed@example.com", "formData": { "name": "John" } }'
128128
```

apps/docs/content/docs/en/sdks/python.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@ def stream_workflow():
655655

656656
def generate():
657657
response = requests.post(
658-
'https://sim.ai/api/workflows/WORKFLOW_ID/execute',
658+
'https://api.sim.ai/api/workflows/WORKFLOW_ID/execute',
659659
headers={
660660
'Content-Type': 'application/json',
661661
'X-API-Key': os.getenv('SIM_API_KEY')

apps/docs/content/docs/en/sdks/typescript.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,7 +948,7 @@ function StreamingWorkflow() {
948948

949949
// IMPORTANT: Make this API call from your backend server, not the browser
950950
// Never expose your API key in client-side code
951-
const response = await fetch('https://sim.ai/api/workflows/WORKFLOW_ID/execute', {
951+
const response = await fetch('https://api.sim.ai/api/workflows/WORKFLOW_ID/execute', {
952952
method: 'POST',
953953
headers: {
954954
'Content-Type': 'application/json',

apps/docs/content/docs/es/execution/api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Todas las solicitudes a la API requieren una clave de API pasada en el encabezad
1414

1515
```bash
1616
curl -H "x-api-key: YOUR_API_KEY" \
17-
https://sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID
17+
https://api.sim.ai/api/v1/logs?workspaceId=YOUR_WORKSPACE_ID
1818
```
1919

2020
Puedes generar claves de API desde la configuración de usuario en el panel de control de Sim.
@@ -528,7 +528,7 @@ async function pollLogs() {
528528
}
529529

530530
const response = await fetch(
531-
`https://sim.ai/api/v1/logs?${params}`,
531+
`https://api.sim.ai/api/v1/logs?${params}`,
532532
{
533533
headers: {
534534
'x-api-key': 'YOUR_API_KEY'

0 commit comments

Comments
 (0)