OpenAI Chat Completion
Run OpenAI chat completion models through each::labs. Supports multiple model variants including GPT-4o, GPT-5, and o3-mini with optional image input and system prompts.
Quick Start
Requires an each::labs API key. Get one at eachlabs.ai.
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "openai-chat-completion",
"version": "0.0.1",
"input": {
"model": "gpt-4o",
"user_prompt": "Explain quantum computing in simple terms",
"system_prompt": "You are a helpful science teacher"
}
}'
Parameters
| Parameter |
Type |
Default |
Description |
| image_url |
string |
|
Optional image URL for multimodal input. |
| max_tokens |
integer |
|
Maximum number of tokens in the response. |
| model |
string |
gpt-4o |
Model to use. enum: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o-mini, gpt-4o, gpt-5.1, gpt-5, gpt-5-mini, gpt-5-nano, o3-mini |
| system_prompt |
string |
|
System prompt to set the model's behavior. |
| user_prompt |
string |
|
The user's message to the model. |
Examples
Vision-enabled query:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "openai-chat-completion",
"version": "0.0.1",
"input": {
"model": "gpt-4o",
"user_prompt": "Describe what you see in this image and identify the main objects",
"image_url": "https://example.com/photo.jpg",
"max_tokens": 500
}
}'
Reasoning with o3-mini:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "openai-chat-completion",
"version": "0.0.1",
"input": {
"model": "o3-mini",
"user_prompt": "Solve this step by step: If a train travels at 60mph for 2.5 hours, then at 80mph for 1.5 hours, what is the total distance?",
"system_prompt": "Show your work step by step"
}
}'
Related Models
Documentation
1---2name: openai-chat-completion3description: OpenAI Chat Completion. Run OpenAI chat models including GPT-4o, GPT-5, and o3-mini. Triggers: chat, gpt, openai, text generation, llm, completion4---56# OpenAI Chat Completion78Run OpenAI chat completion models through each::labs. Supports multiple model variants including GPT-4o, GPT-5, and o3-mini with optional image input and system prompts.910## Quick Start1112> Requires an each::labs API key. Get one at [eachlabs.ai](https://eachlabs.ai).1314```bash15curl -X POST https://api.eachlabs.ai/v1/prediction \16 -H "Content-Type: application/json" \17 -H "X-API-Key: $EACHLABS_API_KEY" \18 -d '{19 "model": "openai-chat-completion",20 "version": "0.0.1",21 "input": {22 "model": "gpt-4o",23 "user_prompt": "Explain quantum computing in simple terms",24 "system_prompt": "You are a helpful science teacher"25 }26 }'27```2829## Parameters3031| Parameter | Type | Default | Description |32|-----------|------|---------|-------------|33| image_url | string | | Optional image URL for multimodal input. |34| max_tokens | integer | | Maximum number of tokens in the response. |35| model | string | gpt-4o | Model to use. enum: gpt-4.1, gpt-4.1-mini, gpt-4.1-nano, gpt-4o-mini, gpt-4o, gpt-5.1, gpt-5, gpt-5-mini, gpt-5-nano, o3-mini |36| system_prompt | string | | System prompt to set the model's behavior. |37| user_prompt | string | | The user's message to the model. |3839## Examples4041**Vision-enabled query:**42```bash43curl -X POST https://api.eachlabs.ai/v1/prediction \44 -H "Content-Type: application/json" \45 -H "X-API-Key: $EACHLABS_API_KEY" \46 -d '{47 "model": "openai-chat-completion",48 "version": "0.0.1",49 "input": {50 "model": "gpt-4o",51 "user_prompt": "Describe what you see in this image and identify the main objects",52 "image_url": "https://example.com/photo.jpg",53 "max_tokens": 50054 }55 }'56```5758**Reasoning with o3-mini:**59```bash60curl -X POST https://api.eachlabs.ai/v1/prediction \61 -H "Content-Type: application/json" \62 -H "X-API-Key: $EACHLABS_API_KEY" \63 -d '{64 "model": "openai-chat-completion",65 "version": "0.0.1",66 "input": {67 "model": "o3-mini",68 "user_prompt": "Solve this step by step: If a train travels at 60mph for 2.5 hours, then at 80mph for 1.5 hours, what is the total distance?",69 "system_prompt": "Show your work step by step"70 }71 }'72```7374## Related Models7576- [OpenAI ChatGPT](../openai-chatgpt-5/) - Alternative OpenAI chat model7778## Documentation7980- [each::labs Docs](https://docs.eachlabs.ai)81- [API Reference](https://docs.eachlabs.ai/api/overview)