> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Response

OpenAI's Responses API generates text from text and image inputs. Built-in tools extend the model with features such as file search, web search, and computer use. Function calling lets it access external systems and data.

### Text messages

Send a basic Responses API request:

```bash curl theme={null}
curl --location --request POST 'https://geekai.co/api/v1/responses' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-5-mini",
    "input": "Hello"
}'
```

```bash python theme={null}
# Install the OpenAI SDK first: `pip3 install openai`
from openai import OpenAI
client = OpenAI(api_key="$GEEKAI_API_KEY", base_url="https://geekai.co/api/v1")
response = client.responses.create(
    model="gpt-5-mini",
    input="Hello"
)
print(response)
```

```bash javascript theme={null}
// Install the OpenAI SDK first: `npm install openai`
import OpenAI from "openai";
const openai = new OpenAI({
    baseURL: 'https://geekai.co/api/v1',
    apiKey: '$GEEKAI_API_KEY'
});
async function main() {
    const response = await openai.responses.create({
        model: "gpt-5-mini",
        input: "Hello"
    });
    console.log(response);
}
main();
```

```bash go theme={null}
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
)

func main() {
	requestBody := map[string]any{
		"model": "gpt-5-mini",
		"input": "Hello",
	}

	jsonData, err := json.Marshal(requestBody)
	if err != nil {
		panic(err)
	}

	client := &http.Client{}
	req, err := http.NewRequest("POST", "https://geekai.co/api/v1/responses", bytes.NewBuffer(jsonData))
	if err != nil {
		panic(err)
	}

	req.Header.Set("Authorization", "Bearer $GEEKAI_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	body, err := io.ReadAll(resp.Body)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(body))
}
```

To pass several messages as an array, use this format:

```bash single_text theme={null}
curl --location --request POST 'https://geekai.co/api/v1/responses' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-5-mini",
    "input": [
		{
			"type": "message",
			"role": "user",
			"content": "Hello"
		}
	]
}'
```

```bash content_list theme={null}
curl --location --request POST 'https://geekai.co/api/v1/responses' \
--header 'Authorization: Bearer {YOUR_GEEKAI_API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-5-mini",
    "input": [
		{
			"type": "message",
			"role": "user",
			"content": [
				{
					"type": "input_text",
					"text": "Hello"
				}
			]
		}
	]
}'
```

Unlike Chat Completions, the Responses API requires the message's `type` field (usually `message`) to be set explicitly at the same level as `role`.

### Supported models

The following models currently support the Responses API:

* `gpt-3.5-turbo`
* `gpt-4`
* `gpt-4-turbo`
* `gpt-4o-mini`
* `gpt-4o`
* `gpt-4.1`
* `gpt-4.1-mini`
* `gpt-4.1-nano`
* `gpt-5`
* `gpt-5-mini`
* `gpt-5-nano`
* `gpt-5-pro`
* `gpt-5-codex`
* `o1`
* `o1-pro`
* `o3-mini`
* `o3`
* `o3-pro`
* `o4-mini`
* `codex-mini-latest`
* `computer-use-preview`
* `o3-deep-research`
* `o4-mini-deep-research`

Of these, `o3-pro`, `o3-deep-research`, `o4-mini-deep-research`, and `gpt-5-pro` are available only through the Responses API. The other models support both Responses and Chat Completions.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.