GPT API
OpenAI's flagship LLM for chat, code generation, and multi-step reasoning tasks.
# Base URL
https://runapi.ai
# Endpoints
POST /v1/chat/completions
POST /v1/responses
POST /v1/messages
POST /v1beta/models/{model}:generateContent
POST /v1beta/models/{model}:streamGenerateContent
curl https://runapi.ai/v1/chat/completions \
-H "Authorization: Bearer $RUNAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-terra",
"messages": [
{
"role": "user",
"content": "Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."
}
]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://runapi.ai/v1",
api_key="your-runapi-key"
)
response = client.chat.completions.create(
model="gpt-5.6-terra",
messages=[{"role": "user", "content": "Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations."}]
)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://runapi.ai/v1",
apiKey: "your-runapi-key"
});
const response = await client.chat.completions.create({
model: "gpt-5.6-terra",
messages: [{ role: "user", content: "Analyze this quarterly revenue data and produce a summary with key trends, anomalies, and three recommendations." }]
});
GPT is OpenAI's flagship large language model series, with the GPT-5 family delivering state-of-the-art performance in chat, code generation, and multi-step reasoning. Available in multiple capability tiers.
- Più varianti per diversi livelli di velocità / qualità
- Il model skill include documentazione, schema e note di setup
- Funziona con workflow di sviluppo app
- Le generazioni fallite non vengono addebitate
Confronta tutte le varianti API
| Variant | Billing | From | |
|---|---|---|---|
| codex-auto-review | 1K tokens | $0.150 | Visualizza → |
| gpt-5.2 | 1K tokens | $0.070 | Visualizza → |
| gpt-5.2-pro | 1K tokens | $0.840 | Visualizza → |
| gpt-5.3-codex | 1K tokens | $0.070 | Visualizza → |
| gpt-5.3-codex-spark | 1K tokens | $0.070 | Visualizza → |
| gpt-5.4 | 1K tokens | $0.120 | Visualizza → |
| gpt-5.4-mini | 1K tokens | $0.030 | Visualizza → |
| gpt-5.4-nano | 1K tokens | $0.010 | Visualizza → |
| gpt-5.4-pro | 1K tokens | $1.35 | Visualizza → |
| gpt-5.5 | 1K tokens | $0.230 | Visualizza → |
| gpt-5.5-pro | 1K tokens | $1.35 | Visualizza → |
| gpt-5.6-luna | 1K tokens | $0.050 | Visualizza → |
| gpt-5.6-sol | 1K tokens | $0.230 | Visualizza → |
| gpt-5.6-terra | 1K tokens | $0.120 | Visualizza → |
Endpoint API GPT
Usa l'SDK OpenAI o Anthropic con la tua chiave RunAPI. Nessun SDK aggiuntivo necessario.
| Endpoint | Protocol |
|---|---|
| /v1/chat/completions | OpenAI compatible |
| /v1/responses | OpenAI Responses |
| /v1/messages | Anthropic compatible |
| /v1beta/models/{model}:generateContent | Gemini generateContent |
| /v1beta/models/{model}:streamGenerateContent | Gemini streamGenerateContent |
Dal model skill al primo risultato in quattro passaggi
Scegli il modello
Seleziona modello e variante adatti al tipo di output, al livello qualità e alla latenza target.
Configura
Imposta la tua chiave RunAPI e installa il model skill nel workspace di codice.
Implementa
Usa le istruzioni dello skill per aggiungere la feature modello dentro la tua applicazione.
Ricevi
Interroga per task ID, usa streaming dove supportato o gestisci il callback webhook.
Che cos'è l'API GPT?
GPT is OpenAI's frontier LLM family, spanning standard and mini variants for different cost-performance trade-offs. Through RunAPI, all GPT models share the same API shape and billing.
Perché usare l'API GPT tramite RunAPI
Un’unica autenticazione, tutti i provider
Una sola chiave RunAPI sblocca l’intero catalogo. Niente account separati, niente rotazione delle chiavi per integrazione.
Prezzi e billing unificati
Prezzi per chiamata in USD, fatturati mensilmente. Le generazioni fallite non vengono addebitate.
Skill con schema
Schema tipizzati e note di setup sono inclusi nel model skill, così l'implementazione parte dal contratto corretto.
Domande frequenti
Which GPT variant should I choose?
GPT-5.6 — the sol, terra, and luna tiers — is the current flagship generation. GPT-5.4 remains a strong choice for coding and agentic workflows, GPT-5.5 for long-horizon autonomous tasks, and GPT-5.4-mini is the cost-effective option for simpler tasks.
Does GPT support tool use and function calling?
Yes — all GPT-5 variants support structured function calling with JSON schemas, enabling agentic tool-use workflows.
What is Thinking mode?
Thinking mode lets GPT reason step-by-step before responding. Available on GPT-5.2 and above, it improves accuracy on complex reasoning tasks.
What is the context window size?
Context windows vary by variant. GPT-5.4 and above support large context windows suitable for multi-file code analysis and long documents.
What is GPT-5.3 Codex optimized for?
Codex is specialized for multi-file code generation, editing, and analysis — purpose-built for developer workflows and CI/CD integration.
Da quale variante dovrei iniziare?
Scegli la variante più economica che soddisfa il tuo livello di qualità. La maggior parte dei team inizia con la variante veloce e passa alla pro per la produzione.
C’è un piano gratuito?
I nuovi account ricevono le prime chiamate gratuite su ogni modello. Dopo, paghi per chiamata.
Trasmettete i risultati in streaming?
Dove lo streaming è disponibile, RunAPI trasmette end-to-end.
Come vengono addebitati i fallimenti?
Le generazioni non riuscite non vengono addebitate.
Gli output vengono memorizzati nella cache?
Gli output generati vengono salvati e recuperabili tramite ID del task. Gli input non vengono memorizzati nella cache.
Posso usarlo a fini commerciali?
Sì — l’uso commerciale è incluso per ogni variante, salvo che una licenza del modello lo limiti esplicitamente; in tal caso è indicato nella pagina della variante.
E i limiti di rate limit?
I rate limit per chiave scalano in base al tier di utilizzo. Vedi la pagina prezzi per i limiti aggiornati.
Dove posso segnalare problemi?
Apri un issue nel repo GitHub pubblico oppure scrivi al supporto.