Skip to main content
Back to Gateway
aiOperational

OpenAI

GPT-4, embeddings, image generation, and more via OpenAI API

Cost per call
$0.012
Base $0.010 + 20% gateway fee · per_call
Rate limit60 req/min
Auth typebearer
Actions3
Uptime99.9%
Added Mar 28, 2026

Usage Statistics

Total Calls
--
All time
Revenue Generated
--
All time
Avg Response Time
--
Last 24h

Usage statistics will populate once calls flow through this service.

Available Actions(3)

POSTchat_completion
/chat/completions

Generate text with GPT-4 or GPT-3.5

$0.0203 params
{
  "type": "object",
  "required": [
    "messages"
  ],
  "properties": {
    "model": {
      "type": "string",
      "default": "gpt-4o-mini"
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "max_tokens": {
      "type": "number",
      "default": 1000
    },
    "temperature": {
      "type": "number",
      "default": 0.7
    }
  }
}
POSTembedding
/embeddings

Generate text embeddings

$0.00103 params
{
  "type": "object",
  "required": [
    "input"
  ],
  "properties": {
    "input": {
      "type": "string"
    },
    "model": {
      "type": "string",
      "default": "text-embedding-3-small"
    }
  }
}
POSTimage_generation
/images/generations

Generate images with DALL-E

$0.0403 params
{
  "type": "object",
  "required": [
    "prompt"
  ],
  "properties": {
    "n": {
      "type": "number",
      "default": 1
    },
    "size": {
      "type": "string",
      "default": "1024x1024"
    },
    "model": {
      "type": "string",
      "default": "dall-e-3"
    },
    "prompt": {
      "type": "string"
    }
  }
}

Try It

Call this service through the AgentHermes gateway. One API key handles auth, billing, and logging.

MCPJSON-RPC via MCP Server

jsoncall_service tool
{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "call_service",
    "arguments": {
      "service_id": "fe52a3eb-732a-4041-901f-e4959687c7ee",
      "action": "chat_completion",
      "params": {
            "...": "your params"
      },
      "wallet_id": "YOUR_WALLET_ID"
    }
  },
  "id": 1
}

RESTcURL

bash/api/v1/gateway/call
curl -X POST https://agenthermes.ai/api/v1/gateway/call \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": "fe52a3eb-732a-4041-901f-e4959687c7ee",
    "action": "chat_completion",
    "params": {},
    "wallet_id": "YOUR_WALLET_ID"
  }'

PythonSDK

pythonpip install hermes-sdk
from hermes import AgentHermes

client = AgentHermes(api_key="YOUR_API_KEY")

result = client.call_service(
    service_id="fe52a3eb-732a-4041-901f-e4959687c7ee",
    action="chat_completion",
    params={},
    wallet_id="YOUR_WALLET_ID",
)

print(result.data)
print(f"Cost: {result.billing.total_charged{'}'}")
print(f"Latency: {result.meta.response_ms{'}'}ms")

How to Use This Service

Recommended

Through AgentHermes Gateway

Use our MCP server or REST API. We handle authentication, billing, and logging for every call.

Cost: $0.012/call
One API key for all services
Built-in usage tracking & budgets
Encrypted credential vault
Get Started

Direct Connection

Visit OpenAI directly to get your own API key. Use their API without the gateway.

Cost: $0.010/call (base rate)
You manage your own API keys
You handle auth and billing
No unified agent dashboard
Visit OpenAI

Response Format

json200 OK
{
  "success": true,
  "data": { "..." },
  "billing": {
    "cost": 0.0100,
    "margin": 0.0020,
    "total_charged": 0.0120
  },
  "meta": {
    "service_name": "OpenAI",
    "action_name": "chat_completion",
    "status_code": 200,
    "response_ms": 142
  }
}