Spiral gives your agent every tool with one account. Browse the tools →

OpenAILLMAvailable now

openai/gpt-4o-mini-2024-07-18

Generate and analyse text with OpenAI: GPT-4o-mini (2024-07-18) through one Spiral API key. It runs in the background and returns text and structured JSON. Pay as you go, with no subscription.

Pricing

Up to $0.003202 per run at the default inputs. $0.195 per 1M input tokens, $0.0975 per 1M cached input tokens, $0.78 per 1M output tokens.

Limits

Runs
In the background
Returns
text, json
Longest queue wait
1 hour
Run deadline
30 minutes
Longest run, end to end
225 minutes
Largest inline input
1 MB
Largest input file
500 MB
Largest output
5 GB
Outputs per run
16

Input

FieldKindDefaultDescription
messages requiredJSON—

The conversation so far, oldest first.

seednumber (whole)—
stopJSON—
toolsJSON—
top_pnumber
0 to 1
—
logprobstrue or false—
max_tokensnumber (whole)
16 to …
—

The most output tokens to generate.

temperaturenumber
0 to 2
—
tool_choiceJSON—
top_logprobsnumber (whole)
0 to 20
—
response_formatJSON—
presence_penaltynumber
-2 to 2
—
frequency_penaltynumber
-2 to 2
—
parallel_tool_callstrue or false—

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "openai",
    "model": "openai/gpt-4o-mini-2024-07-18",
    "input": {
      "messages": {}
    }
  }'

Frequently asked questions

How much does OpenAI: GPT-4o-mini (2024-07-18) cost?

Up to $0.003202 per run at the default inputs. $0.195 per 1M input tokens, $0.0975 per 1M cached input tokens, $0.78 per 1M output tokens. You pay as you go from one Spiral balance, with no subscription, and a failed run is not charged.

How do I use OpenAI: GPT-4o-mini (2024-07-18) through an API?

Send `POST /v1/runs` with `"provider": "openai"`, `"model": "openai/gpt-4o-mini-2024-07-18"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

Do I need an account with OpenAI to use OpenAI: GPT-4o-mini (2024-07-18)?

No. Spiral runs it on its own OpenAI account and charges your Spiral balance.

Can my AI agent use OpenAI: GPT-4o-mini (2024-07-18)?

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.