OpenAI's latest flagship model. Delivers exceptional performance across reasoning, coding, and creative tasks with a massive 1M token context window and 32K output tokens. Supports vision, function calling, and JSON mode.
Copy usage instructions for Claude, ChatGPT, or other AI
| Token Type | Credits | USD Equivalent |
|---|---|---|
| Input Tokens | 2,500 | $2.50 |
| Output Tokens | 20,000 | $20.00 |
| Cached Tokens | 625 | $0.63 |
* 1 credit โ $0.001 (actual charges may vary based on usage)
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "system",
"content": "You are an expert analyst. Provide thorough, well-structured analysis."
},
{
"role": "user",
"content": "Analyze the potential impacts of quantum computing on current encryption standards and suggest a migration roadmap for enterprise systems."
}
],
"max_completion_tokens": 4000
}'| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
messages | array | Yes | - | Array of message objects with role and content |
model | string | Yes | gpt-5 | Model identifier |
max_completion_tokens | integer | No | 4096 | Maximum tokens in response (up to 32768). Note: use max_completion_tokens, not max_tokens |
stream | boolean | No | false | Enable Server-Sent Events streaming |
response_format | object | No | - | Format of response: { type: 'json_object' } for JSON mode |
tools | array | No | - | List of tools (functions) the model can call |
reasoning_effort | string | No | medium | Reasoning effort level: low, medium, or high |
Multi-step reasoning and analysis with GPT-5
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "system",
"content": "You are an expert analyst. Provide thorough, well-structured analysis."
},
{
"role": "user",
"content": "Analyze the potential impacts of quantum computing on current encryption standards and suggest a migration roadmap for enterprise systems."
}
],
"max_completion_tokens": 4000
}'Generate production-quality code with GPT-5
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "system",
"content": "You are an expert software engineer. Write clean, well-documented code."
},
{
"role": "user",
"content": "Create a TypeScript rate limiter middleware for Express.js that uses a sliding window algorithm with Redis for distributed rate limiting."
}
],
"max_completion_tokens": 4000
}'Extract structured data from unstructured text
curl -X POST "https://api.core.today/llm/openai/v1/chat/completions" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer cdt_your_api_key" \
-d '{
"model": "gpt-5",
"messages": [
{
"role": "system",
"content": "Extract structured data from the given text. Always respond with valid JSON."
},
{
"role": "user",
"content": "Parse this invoice: 'Invoice #2025-0842 from Acme Corp to Beta LLC, dated August 15 2025. Items: 10x Widget A at $25.00, 5x Widget B at $50.00. Tax: 10%. Shipping: $15.00'"
}
],
"response_format": {
"type": "json_object"
},
"max_tokens": 1000
}'POST /llm/openai/v1/chat/completions