curl --request POST \ --url https://geoff.ai/api/v1/text/chat \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "magma", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Hello!"} ], "max_tokens": 1024 }'
{ "id": "chatcmpl-abc123", "object": "chat.completion", "created": 1700000000, "model": "magma", "choices": [ { "index": 0, "message": { "role": "assistant", "content": "Hello! How can I help you today?" }, "finish_reason": "stop" } ], "usage": { "prompt_tokens": 20, "completion_tokens": 10, "total_tokens": 30 } }
Send a chat completion request.
Bearer API_key
magma
role
content
1
false