Download OpenAPI specification:Download
Use kaiwa to create freely
You can use this service to generate images from text
The usual response
prompt | string Invoke the prompt used by the AI model |
seed | integer The random number seed used by the AI model is invoked |
{- "prompt": "string",
- "seed": 0
}
llama3-7b was selected as the machine learning model.
The usual response
prompt | string Invoke the prompt used by the AI model |
seed | integer The random number seed used by the AI model is invoked |
{- "prompt": "string",
- "seed": 0
}
{- "model": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "response": "string"
}
mistral-7b was selected as the machine learning model
from datetime import datetime import requests from pydantic import BaseModel class defRequestBody(BaseModel): prompt: str seed: int class defResponse(BaseModel): model: str created_at: datetime response: str response: defResponse = requests.post( url = 'https://api.kaiwa.dev/v1/kaiwa/mistral-7b', headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer <YOUR_API_KEY>'}, data = defRequestBody( prompt = 'Hello, how are you?', seed = 42).model_dump_json() ) print(response['response'])
{- "model": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "response": "string"
}