Reasoning with o1-preview and o1-mini API

Get OpenAI o1 API that uses reinforcement learning to engage in complex reasoning, problem-solving, scientific and coding tasks. Try OpenAI o1, o1-preview and o1-mini models in the Playground.

Cost comparison to OpenAI

OnepAI o1 Capabilities

The o1 models demonstrate exceptional scientific and mathematical prowess, outperforming most human competitors in competitive programming and PhD-level science problems.

Speak with ChatGPT
Reasoning tokens
Chat about images
Context window control
Real-time translation
Cost-control

Advanced ReasoningUtilizes invisible "thinking" tokens for in-depth analysis
Context Window ControlProcesses up to 128,000 tokens for comprehensive understanding
Cost ManagementGenerates responses up to 65,536 tokens
Efficient Resource AllocationAutomatic balancing of reasoning and visible output

ChatGPT has voice and image capabilities

Open AI o1 API Endpoints

OpenAI o1 API

Gain instant access to OpenAI o1 through production API: AI/ML API provides direct connectivity to OpenAI o1.

Read more: OpenAI o1 Technical Model Card.
Try models in the Playground.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aimlapi.com/v1",
    api_key="<YOUR_API_KEY>",    
)

response = client.chat.completions.create(
    model="o1",
    messages=[
        {
            "role": "user",
            "content": "Tell me, why is the sky blue?"
        },
    ],
)

message = response.choices[0].message.content

print(f"Assistant: {message}")
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aimlapi.com/v1",
    api_key="<YOUR_API_KEY>",    
)

response = client.chat.completions.create(
    model="o1-preview",
    messages=[
        {
            "role": "user",
            "content": "Tell me, why is the sky blue?"
        },
    ],
)

message = response.choices[0].message.content

print(f"Assistant: {message}")

OpenAI o1-preview API

Gain instant access to OpenAI o1-preview through AI/ML API.

Read more: OpenAI o1-preview Technical Model Card.

OpenAI o1-mini API

Gain instant access to OpenAI o1-mini through AI/ML API.

Read more: OpenAI o1-mini Technical Model Card.
Join our Discord to share your experiences with OpenAI o1 API.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aimlapi.com/v1",
    api_key="<YOUR_API_KEY>",    
)

response = client.chat.completions.create(
    model="o1-mini",
    messages=[
        {
            "role": "user",
            "content": "Tell me, why is the sky blue?"
        },
    ],
)

message = response.choices[0].message.content

print(f"Assistant: {message}")

How to Get an OpenAI o1 API Key with AI/ML API

Sign Up

Begin by signing up on our AI/ML API platform. Create your account to gain access to a wide range of powerful AI models and tools.

SignUP page  image

Create API Key

In the Playground, navigate to the Key Management section and click on Create API Key. You can easily activate or deactivate your keys as needed.

API key management page Image

Integrate AI

After creating your API key, you can integrate AI models into your application by following the guidelines provided in our API reference.

AI APP integration image
Get OpenAI o1 API Key

Use Cases

The o1-preview model leverages its advanced reasoning capabilities to perform thorough data validation, enhancing the accuracy and reliability of routine generation tasks.

routine generation

O1-mini

The o1 model excels at zero-shot conversion of complex articles into structured routines, enabling LLMs to efficiently execute tasks with minimal prompting by breaking down workflows into specific actions and integrating function calls, resulting in more effective and scalable automated solutions.

Falcon-7B

Function Definitions

The AI creates specific function calls for common tasks, allowing seamless integration with external systems during customer interactions.

Discrete Steps

The AI breaks down complex tasks into simple steps, like guiding a user through password reset: "1. Click 'Forgot Password', 2. Enter your email, 3. Check your inbox for a reset link."

Sample Responses

The AI model generates user-friendly instructions for common scenarios, such as guiding a customer through a purchase: "Please confirm and buy your chosen credit amount."

data validation

O1-Preview

Advanced AI models like o1 - preview can enhance data quality in critical fields such as finance by applying contextual understanding and reasoning to validate complex financial records, potentially catching subtle inconsistencies that traditional rule-based systems might miss.

Falcon-7B

Enhanced Results Analysis

AI reasoning elevates data validation, offering nuanced insights beyond traditional methods.

Classify Issue

Advanced models categorize data anomalies with context-aware, intelligent pattern recognition.

Determine Accuracy

Precise issue identification and pinpointing demonstrate the model's validation capabilities.

Learn how you can transform your company with AI/ML APIs