Skip to content

Commit 6dc59cc

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-365: docs: move examples up for openai
1 parent e73fc6b commit 6dc59cc

18 files changed

Lines changed: 239 additions & 294 deletions

‎docs/api-references/text-models-llm/OpenAI/gpt-3.5-turbo.md‎

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
# gpt-3.5-turbo
22

3-
{% hint style="info" %}
4-
This documentation is valid for the following list of our models:
5-
6-
* `gpt-3.5-turbo`
7-
* `gpt-3.5-turbo-0125`
8-
* `gpt-3.5-turbo-1106`
9-
{% endhint %}
3+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following list of our models:</p><ul><li><code>gpt-3.5-turbo</code></li><li><code>gpt-3.5-turbo-0125</code></li><li><code>gpt-3.5-turbo-1106</code></li></ul></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=gpt-3.5-turbo&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
104

115
## Model Overview
126

@@ -27,7 +21,7 @@ You can also view [a detailed comparison of this model](https://aimlapi.com/comp
2721

2822
### &#x20;:digit\_two: Copy the code example
2923

30-
At the bottom of this page, you'll find [a code example](gpt-3.5-turbo.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
24+
Below, you'll find [a code example](gpt-3.5-turbo.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
3125

3226
### :digit\_three: Modify the code example
3327

@@ -48,20 +42,6 @@ If you need a more detailed walkthrough for setting up your development environm
4842

4943
</details>
5044

51-
## API Schema
52-
53-
{% openapi-operation spec="gpt-3-5-turbo" path="/v1/chat/completions" method="post" %}
54-
[OpenAPI gpt-3-5-turbo](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-3.5-turbo.json)
55-
{% endopenapi-operation %}
56-
57-
### Responses Endpoint
58-
59-
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
60-
61-
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
62-
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
63-
{% endopenapi-operation %}
64-
6545
## Code Example
6646

6747
{% code overflow="wrap" %}
@@ -107,6 +87,20 @@ print(data)
10787

10888
</details>
10989

90+
## API Schema
91+
92+
{% openapi-operation spec="gpt-3-5-turbo" path="/v1/chat/completions" method="post" %}
93+
[OpenAPI gpt-3-5-turbo](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-3.5-turbo.json)
94+
{% endopenapi-operation %}
95+
96+
### Responses Endpoint
97+
98+
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
99+
100+
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
101+
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
102+
{% endopenapi-operation %}
103+
110104
## Code Example #2: Using /responses Endpoint
111105

112106
{% tabs %}

‎docs/api-references/text-models-llm/OpenAI/gpt-4-preview.md‎

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# gpt-4-preview
22

3-
{% hint style="info" %}
4-
This documentation is valid for the following list of our models:
5-
6-
* `gpt-4-0125-preview`
7-
* `gpt-4-1106-preview`
8-
{% endhint %}
3+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following list of our models:</p><ul><li><code>gpt-4-0125-preview</code></li><li><code>gpt-4-1106-preview</code></li></ul></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=gpt-4-0125-preview&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
94

105
## Model Overview
116

@@ -24,7 +19,7 @@ Before the release of GPT-4 Turbo, OpenAI introduced two preview models that all
2419

2520
### &#x20;:digit\_two: Copy the code example
2621

27-
At the bottom of this page, you'll find [a code example](gpt-4-preview.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
22+
Below, you'll find [a code example](gpt-4-preview.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
2823

2924
### :digit\_three: Modify the code example
3025

@@ -45,20 +40,6 @@ If you need a more detailed walkthrough for setting up your development environm
4540

4641
</details>
4742

48-
## API Schema
49-
50-
{% openapi-operation spec="gpt-4-preview" path="/v1/chat/completions" method="post" %}
51-
[OpenAPI gpt-4-preview](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4-preview.json)
52-
{% endopenapi-operation %}
53-
54-
### Responses Endpoint
55-
56-
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
57-
58-
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
59-
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
60-
{% endopenapi-operation %}
61-
6243
## Code Example
6344

6445
{% code overflow="wrap" %}
@@ -104,6 +85,20 @@ print(data)
10485

10586
</details>
10687

88+
## API Schema
89+
90+
{% openapi-operation spec="gpt-4-preview" path="/v1/chat/completions" method="post" %}
91+
[OpenAPI gpt-4-preview](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4-preview.json)
92+
{% endopenapi-operation %}
93+
94+
### Responses Endpoint
95+
96+
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
97+
98+
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
99+
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
100+
{% endopenapi-operation %}
101+
107102
## Code Example #2: Using /responses Endpoint
108103

109104
{% tabs %}

‎docs/api-references/text-models-llm/OpenAI/gpt-4-turbo.md‎

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# gpt-4-turbo
22

3-
{% hint style="info" %}
4-
This documentation is valid for the following list of our models:
5-
6-
* `gpt-4-turbo`
7-
* `gpt-4-turbo-2024-04-09`
8-
{% endhint %}
3+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following list of our models:</p><ul><li><code>gpt-4-turbo</code></li><li><code>gpt-4-turbo-2024-04-09</code></li></ul></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=gpt-4-turbo&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
94

105
## Model Overview
116

@@ -24,7 +19,7 @@ The model enhances the already impressive capabilities of [gpt-4](gpt-4.md) by s
2419

2520
### &#x20;:digit\_two: Copy the code example
2621

27-
At the bottom of this page, you'll find [a code example](gpt-4-turbo.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
22+
Below, you'll find [a code example](gpt-4-turbo.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
2823

2924
### :digit\_three: Modify the code example
3025

@@ -45,20 +40,6 @@ If you need a more detailed walkthrough for setting up your development environm
4540

4641
</details>
4742

48-
## API Schema
49-
50-
{% openapi-operation spec="gpt-4-turbo" path="/v1/chat/completions" method="post" %}
51-
[OpenAPI gpt-4-turbo](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4-turbo.json)
52-
{% endopenapi-operation %}
53-
54-
### Responses Endpoint
55-
56-
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
57-
58-
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
59-
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
60-
{% endopenapi-operation %}
61-
6243
## Code Example
6344

6445
{% code overflow="wrap" %}
@@ -104,6 +85,20 @@ print(data)
10485

10586
</details>
10687

88+
## API Schema
89+
90+
{% openapi-operation spec="gpt-4-turbo" path="/v1/chat/completions" method="post" %}
91+
[OpenAPI gpt-4-turbo](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4-turbo.json)
92+
{% endopenapi-operation %}
93+
94+
### Responses Endpoint
95+
96+
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
97+
98+
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
99+
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
100+
{% endopenapi-operation %}
101+
107102
## Code Example #2: Using /responses Endpoint
108103

109104
{% tabs %}

‎docs/api-references/text-models-llm/OpenAI/gpt-4.md‎

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# gpt-4
22

3-
{% hint style="info" %}
4-
This documentation is valid for the following list of our models:
5-
6-
* `gpt-4`
7-
{% endhint %}
3+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following model: <br><code>gpt-4</code></p></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=gpt-4&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
84

95
## Model Overview
106

@@ -23,7 +19,7 @@ The model represents a significant leap forward in conversational AI technology.
2319

2420
### &#x20;:digit\_two: Copy the code example
2521

26-
At the bottom of this page, you'll find [a code example](gpt-4.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
22+
Below, you'll find [a code example](gpt-4.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
2723

2824
### :digit\_three: Modify the code example
2925

@@ -44,20 +40,6 @@ If you need a more detailed walkthrough for setting up your development environm
4440

4541
</details>
4642

47-
## API Schema
48-
49-
{% openapi-operation spec="gpt-4" path="/v1/chat/completions" method="post" %}
50-
[OpenAPI gpt-4](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4.json)
51-
{% endopenapi-operation %}
52-
53-
### Responses Endpoint
54-
55-
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
56-
57-
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
58-
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
59-
{% endopenapi-operation %}
60-
6143
## Code Example
6244

6345
{% code overflow="wrap" %}
@@ -103,6 +85,20 @@ print(data)
10385

10486
</details>
10587

88+
## API Schema
89+
90+
{% openapi-operation spec="gpt-4" path="/v1/chat/completions" method="post" %}
91+
[OpenAPI gpt-4](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4.json)
92+
{% endopenapi-operation %}
93+
94+
### Responses Endpoint
95+
96+
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
97+
98+
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
99+
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
100+
{% endopenapi-operation %}
101+
106102
## Code Example #2: Using /responses Endpoint
107103

108104
{% tabs %}

‎docs/api-references/text-models-llm/OpenAI/gpt-4o-mini.md‎

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
# gpt-4o-mini
22

3-
{% hint style="info" %}
4-
This documentation is valid for the following list of our models:
5-
6-
* `gpt-4o-mini`
7-
* `gpt-4o-mini-2024-07-18`
8-
{% endhint %}
3+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following list of our models:</p><ul><li><code>gpt-4o-mini</code></li><li><code>gpt-4o-mini-2024-07-18</code></li></ul></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=gpt-4o-mini&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
94

105
## Model Overview
116

@@ -45,20 +40,6 @@ If you need a more detailed walkthrough for setting up your development environm
4540

4641
</details>
4742

48-
## API Schema
49-
50-
{% openapi-operation spec="gpt-4o-mini" path="/v1/chat/completions" method="post" %}
51-
[OpenAPI gpt-4o-mini](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4o-mini.json)
52-
{% endopenapi-operation %}
53-
54-
### Responses Endpoint
55-
56-
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
57-
58-
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
59-
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
60-
{% endopenapi-operation %}
61-
6243
## Code Example
6344

6445
{% code overflow="wrap" %}
@@ -104,6 +85,20 @@ print(data)
10485

10586
</details>
10687

88+
## API Schema
89+
90+
{% openapi-operation spec="gpt-4o-mini" path="/v1/chat/completions" method="post" %}
91+
[OpenAPI gpt-4o-mini](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4o-mini.json)
92+
{% endopenapi-operation %}
93+
94+
### Responses Endpoint
95+
96+
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
97+
98+
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
99+
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
100+
{% endopenapi-operation %}
101+
107102
## Code Example #2: Using /responses Endpoint
108103

109104
{% tabs %}

‎docs/api-references/text-models-llm/OpenAI/gpt-4o.md‎

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
# gpt-4o
22

3-
{% hint style="info" %}
4-
This documentation is valid for the following list of our models:
53

6-
* `gpt-4o`
7-
* `chatgpt-4o-latest`
8-
* `gpt-4o-2024-05-13`
9-
* `gpt-4o-2024-08-06`
10-
{% endhint %}
4+
5+
<table data-header-hidden data-full-width="true"><thead><tr><th width="546.4443969726562" valign="top"></th><th width="202.666748046875" valign="top"></th></tr></thead><tbody><tr><td valign="top"><div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This documentation is valid for the following list of our models:</p><ul><li><code>gpt-4o</code></li><li><code>chatgpt-4o-latest</code></li><li><code>gpt-4o-2024-05-13</code></li><li><code>gpt-4o-2024-08-06</code></li></ul></div></td><td valign="top"><a href="https://aimlapi.com/app/?model=openai/gpt-4o&#x26;mode=chat" class="button primary">Try in Playground</a></td></tr></tbody></table>
116

127
## Model Overview
138

@@ -28,7 +23,7 @@ You can also view [a detailed comparison of this model](https://aimlapi.com/comp
2823

2924
### &#x20;:digit\_two: Copy the code example
3025

31-
At the bottom of this page, you'll find [a code example](gpt-4o.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
26+
Below, you'll find [a code example](gpt-4o.md#code-example) that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.
3227

3328
### :digit\_three: Modify the code example
3429

@@ -49,20 +44,6 @@ If you need a more detailed walkthrough for setting up your development environm
4944

5045
</details>
5146

52-
## API Schema
53-
54-
{% openapi-operation spec="gpt-4o" path="/v1/chat/completions" method="post" %}
55-
[OpenAPI gpt-4o](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4o.json)
56-
{% endopenapi-operation %}
57-
58-
### Responses Endpoint
59-
60-
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
61-
62-
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
63-
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
64-
{% endopenapi-operation %}
65-
6647
## Code Example
6748

6849
{% code overflow="wrap" %}
@@ -108,6 +89,20 @@ print(data)
10889

10990
</details>
11091

92+
## API Schema
93+
94+
{% openapi-operation spec="gpt-4o" path="/v1/chat/completions" method="post" %}
95+
[OpenAPI gpt-4o](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/OpenAI/gpt-4o.json)
96+
{% endopenapi-operation %}
97+
98+
### Responses Endpoint
99+
100+
This endpoint is currently used _only_ with OpenAI models. Some models support both the `/chat/completions` and `/responses` endpoints, while others support only one of them. OpenAI has announced plans to expand the capabilities of the `/responses` endpoint in the future.
101+
102+
{% openapi-operation spec="responses-all-models" path="/v1/responses" method="post" %}
103+
[OpenAPI responses-all-models](https://api.aimlapi.com/docs-public-yaml)
104+
{% endopenapi-operation %}
105+
111106
## Code Example #2: Using /responses Endpoint
112107

113108
{% tabs %}

0 commit comments

Comments
 (0)