LLM API
GoAPI now allows Large Language Model Inference, referred to as LLM Inference. This service allows you access to APIs of endpoints for some exciting models available. Our service and pricing model best fit users who want high throughput scenarios.
Available models:
- uncensored-small-32k-20240717
- gpt-3.5-turbo
- gpt-4o-mini
- gpt-auto*
- gpt-4o-plus**
- gpt-4o**
- claude-3-5-sonnet-20240620***
*Note: gpt-auto
is a reverse engineered version of the Dynamic
tab in ChatGPT: OpenAI determines when to use gpt-4o
or gpt-3.5-turbo
internally. In our test, most of the responses will be generated by gpt-4o
.
**Note: gpt-4o-plus
and gpt-4o
are available on Developer plan or above. gpt-4o-plus
is a reverse engineered version of the gpt-4o
tab in ChatGPT. Whereas gpt-4o
remains the original OpenAI's API model gpt-4o
.
***Note: claude-3-5-sonnet-20240620
are available on Developer plan or above.
Pricing
All models are cheaper than OpenAI official prices, check LLM API | PPU Quota | Endpoint Usage.
Special Note
Due to Cloudflare's setting, we recommend using Stream method for openai's completions api whenever possible.
2023/11/28 Update: If you are determined to use Non-Stream method, you can change your domain to https://proxy.goapi.xyz
Basic Completions
NO STREAMING
Request Example
curl https://api.goapi.xyz/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer GOAPI_KEY" \ -d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ] }'
Response Example
{ "id": "chatcmpl-83jZ61GDHtdlsFUzXDbpGeoU193Mj", "object": "chat.completion", "created": 1695900828, "model": "gpt-3.5-turbo", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! How can I assist you today?" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 19, "completion_tokens": 9, "total_tokens": 28 } }
STREAMING
Request Example
curl https://api.goapi.xyz/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer GOAPI_KEY" \ -d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ], "stream": true }'
Response Example
data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"role":"assistant","content":""},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":"Hello"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":"!"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":" How"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":" can"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":" I"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":" assist"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":" you"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":" today"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{"content":"?"},"finish_reason":null}]} data: {"id":"chatcmpl-83jctesyk8nEkPytXDNLz1oV5dIQK","object":"chat.completion.c hunk","created":1695901063,"model":"gpt-3.5-turbo-0613","choices":[{"index":0,"d elta":{},"finish_reason":"stop"}]} data: [DONE]