Explore

openai / gpt / chat-completions

GPT API

OpenAI's GPT API, resold: point the OpenAI SDK at SFAIE and pay in credits.

chat-completions

POST/openai/gpt/v1/chat/completions1 credit / call

Sends a chat completion request to a GPT model and returns its reply.

Parameters

model
required · gpt-6-astra, gpt-6.1-sol or gpt-6-luna
messages
required · at least one
max_completion_tokens
optional · 1 up to the model's output limit, which applies when unset
stream
optional · server-sent events instead of one JSON body
stream_options
optional · include_usage adds a last chunk with the token counts

Request

curl -X POST https://api.sfaie.com/openai/gpt/v1/chat/completions \
  -H "Authorization: Bearer $SFAIE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "gpt-6-astra", "max_completion_tokens": 64, "messages": [{ "role": "user", "content": "Say hi." }] }'

Response

{
  "id": "chatcmpl-SampleSampleSampleSample",
  "object": "chat.completion",
  "created": 1792300000,
  "model": "gpt-6-astra",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hi. What can I help with?",
        "refusal": null
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 9,
    "total_tokens": 18
  }
}

Try it

Sign in to try this endpoint.

Calls are real. Accepted calls cost 1 credit.