How do I use the API?
The API can only be used in the "PUT" call method via the endpoint: https://openrouter.ai/api/v1/chat/completions
Example call for the basic model (Ghonk-v3)
curl https://openrouter.ai/api/v1/chat/completions \
-H "Authorization: Bearer $OPENROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "@preset/ghonk-v3",
"messages": [
{
"role": "user",
"content": "Hello! How are you today?"
}
]
}'
Only one API can be used for Ghonk model calls, and the free public API Key is: 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
* It has a daily limit of 100,000 credits.
Hello
ResponderExcluir