Skip to content

Llama 3.1 8B Instruct

POST
/project/p-{Project_Id}/genai/llama3_1_8b_instruct/v1/chat/completions
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/project/p-{Project_Id}/genai/llama3_1_8b_instruct/v1/chat/completions?project_id=<PROJECT_ID>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"temperature": 0.5,
"max_tokens": 1024,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 1,
"stream": false,
"model": "llama3_1_8b_instruct",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}'

Llama 3.1 represents Meta’s most advanced language model to date. It integrates state-of-the-art techniques in natural language processing to deliver unparalleled performance in various tasks.

Project_Id
required
string

Path parameter Project_Id.

project_id
required
integer

Project ID

Media typeapplication/json
object
temperature
number
default: 0.5
max_tokens
integer
default: 1024
top_p
number
default: 1
frequency_penalty
number
0
presence_penalty
number
default: 1
stream
boolean
model
string

Example

llama3_1_8b_instruct
messages
Array<object>
object
role
string

Example

user
content
string

Example

Hello

Successful response (Non-streaming)

Media typeapplication/json
object
id
string
object
string
created
integer
model
string
choices
Array<object>
object
index
integer
message
object
role
string
content
string
tool_calls
Array<string>
logprobs
string
nullable
finish_reason
string
stop_reason
string
nullable
usage
object
prompt_tokens
integer
completion_tokens
integer
total_tokens
integer

Example

{
"id": "chat-a8fa533f74b346688f780c3b2e14638f",
"object": "chat.completion",
"created": 1738753122,
"model": "llama3_1_8b_instruct",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "It looks like we're saying hello twice. How's your day going so far?",
"tool_calls": []
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 56,
"completion_tokens": 18,
"total_tokens": 74
}
}