cURL
curl --request POST \ --url https://api.fortytwo.network/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "messages": [ { "content": "<string>", "role": "user" } ], "model": "<string>", "max_completion_tokens": 123, "max_tokens": 123, "stream": false, "response_format": {} } '
{ "choices": [ { "finish_reason": "stop", "index": 123, "message": { "content": "<string>", "role": "user" } } ], "usage": { "prompt_tokens": 123, "completion_tokens": 123, "total_tokens": 123 }, "id": "<string>", "created": 123, "model": "fortytwo-preview", "object": "chat.completion" }
Generates text responses using the Swarm Inference of the Fortytwo network. Read more.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Show child attributes
Successful Response
fortytwo-preview
"chat.completion"